标签:
1.虚拟机: 选择桥接
2.设置静态IP
sudo vi /etc/network/interfaces
修改为:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static #注意静态(static)
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
修改DNS
sudo vi /etc/resolv.conf
重启网卡
sudo ifdown eth0
sudo ifup eth0
3.ssh配置
a.安装
sudo apt-get update
sudo apt-get install openssh-server
b.开启root
vi /etc/ssh/sshd_config
将PermitRootLogin without-password 改为
PermitRootLogin yes
重启ssh
restart ssh
4. 启用root
sudo passwd root
设置密码
5.如果安装是中文环境
请设置回英文:sudo vi /etc/default/locale
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
安装zhcon:apt-get install zhcon
6.修改apt源(选择aliyun)
vi /etc/apt/source.list(建议ssh登陆后在window环境修改后覆盖这样比较方便)
源如下:
deb http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main multiverse restricted universe
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main multiverse restricted universe
替换之后,apt-get update一下
标签:
原文地址:http://www.cnblogs.com/luyang08/p/5456673.html