一般ubuntu server在安装的时候,都会在ui中让你输入vip地址和网关dns等信息。

一般搬迁服务器的时候,都会重新配置服务器的ip信息。那么,在shell下怎么修改呢。今天,正好给宠物导航搬迁服务器,顺便整理记录一下。

打开/etc/network/interfaces,如果没有配置过ip,比如安装过程中跳过,则会看到

auth lo
iface lo inet loopback

如果,已经配置过,会看到类似如下的eth0 或 eth1配置

#from iu1u.com
auth eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
dns-nameservers 202.106.0.20

修改其中的信息为自己的,修改dns还要同时修改/etc/resolv.conf文件里面的dns地址。

然后重启机器,或者执行命令sudo /etc/init.d/networking restart,刷新网络接口信息即可。

Posted in 未分类 at 04月 27th, 2009. 1 Comment.

安装ubuntu时,如果选择了,中文环境,则正常情况下,putty操作终端时,一旦有错误,都会以中文提示,因为ubuntu默认编码为utf8,所以反应在putty上就是一堆乱码了。按如下操作即可搞定

1. Window–>Appearance->Font settings->Change… ->新宋体,常规,10,字符集CHINESE_GB2312

2. Window –> Translation–>Received data……………set:–>UTF-8

Posted in 未分类 at 01月 3rd, 2009. No Comments.

如何安装ubuntu:
http://wiki.ubuntu.org.cn/Install_Ubuntu_server

ubuntu 上装nginx:
http://www.linuxidc.com/Linux/2008-05/12962.htm

ubuntu中文论坛:
http://forum.ubuntu.org.cn

 

Posted in 未分类 at 12月 23rd, 2008. No Comments.