Linode VPS的配置文章收录

星期四, 三月 18, 2010 0:33
文章发表自: 心得技巧
204次浏览 暂无评论
Linode VPS配置
Linode VPS配置

从diahosting搬迁到linode了,学习到很多VPS的知识,这里把网上收集的VPS配置知识做一个摘抄。

Linode系统安装完后,升级一下系统,使系统保持在最新的状态。
在windows系统中用SSH
windows用户可以下载 PuTTY一个win2000及以后系统的SSH客户端,在第一次使用PuTTY,你将看到一个登录对话框在”Host Name”输入框中输入你的Linode IP地址,点击”Open”,你将收到一个关于主机key不知道的警告,点击”Yes”继续进行,它将缓存SSH key。

运行安全更新
一旦你登录,你将想立即运行安全更新,这样做有助于抵挡因为在包中未解决的安全漏洞而对你Linode未经授权的访问。

  1. Debian
  2.  
  3. apt-get update
  4. apt-get upgrade --show-upgraded
  5. Ubuntu
  6.  
  7. sudo apt-get update
  8. sudo apt-get upgrade --show-upgraded
  9. CentOS/Fedora
  10. yum update

设置主机名
现在你将为你的系统设置主机名,你可以选择任何你喜欢的名字,但是一些独特的有描述性的可能更好些,主机名是你机器的自称,你可以选择任何你想的,比如在这个例子中,我们叫它”squire”

echo “squire” > /etc/hostname
hostname -F /etc/hostname
安装CentOS系统后,安装Kloxo后台,就可以得到完美的运行环境了。包括Apache+Mysql+zend+FTP+Mail。很方便。

一.首先先升级下系统:
yum update
yum install gcc* automake* make*
yum install lib* python* perl*
mkdir -p /home/software
cd /home/software

然后下载kloxo系统,安装:
wget http://download.lxlabs.com/download/kloxo/production/kloxo-install-master.sh
sh ./kloxo-install-master.sh
安装完成啦!!
现在可以登录拉。
二.但是登陆进去加dns的时候会出现no_ip_address的错误,修改一下这里
/etc/sysconfig/network-scripts/ifcfg-eth0
Linode VPS默认情况下是通过DHCP自动获取IP的,所以在安装Kloxo完成设置Kloxo的时候会出现no_ip_address的提示,这个时候就需要手动设置上IP,这样才能添加域名。
如果你设置Kloxo的时候出现no_ip_address的提示你可以按照下面步骤修改:
使用编辑器编辑:/etc/sysconfig/network-scripts/ifcfg-eth0

# Configuration for eth0
DEVICE=eth0
BOOTPROTO=none

# This line ensures that the interface will be brought up during boot.
ONBOOT=yes

# eth0 – This is the main IP address that will be used for most outbound connections.
# The address, netmask and gateway are all necessary.
IPADDR=12.34.56.78 #你的IP地址
NETMASK=255.255.255.0 #子网掩码
GATEWAY=12.34.56.1 #网关
一般这样设置好,再执行命令:service network restart 重启网络就好了。

添加第2个IP,可以创建 /etc/sysconfig/network-scripts/ifcfg-eth0:0
# Configuration for eth0:0
DEVICE=eth0:0
BOOTPROTO=none

# This line ensures that the interface will be brought up during boot.
ONBOOT=yes

# eth0:0
IPADDR=34.56.78.90
NETMASK=255.255.255.0
添加第3个IP,创建 /etc/sysconfig/network-scripts/ifcfg-eth0:1 按上面的内容添加到这个文件中,以此类推。
以上办法都是在CentOS或者Fedora下添加IP的方法,如果是在Debian/Ubuntu下添加IP的方法(注,当然Kloxo没有Debian下的版本):
修改 /etc/network/interfaces

# The loopback interface
auto lo
iface lo inet loopback
# Configuration for eth0 and aliases

# This line ensures that the interface will be brought up during boot.
auto eth0 eth0:0 eth0:1

# eth0 – This is the main IP address that will be used for most outbound connections.
# The address, netmask and gateway are all necessary.
iface eth0 inet static
address 12.34.56.78
netmask 255.255.255.0
gateway 12.34.56.1

# eth0:0
iface eth0:0 inet static
address 34.56.78.90
netmask 255.255.255.0

# eth0:1 – Private IPs have no gateway (they are not publicly routable) so all you need to
# specify is the address and netmask.
iface eth0:1 inet static
address 192.168.133.234
netmask 255.255.128.0
保存,重启网络,/etc/init.d/networking restart 即可。

你可以对这篇文章 发表评论, 或者 trackback 到你的网站.

请发表您的意见: