1.sudoers
配置/etc/sudoers, 添加sudo权限给指定用户。
root@cloud4:/# nano /etc/sudoers
#添加sudo权限给stewar
# User privilege specification
root ALL=(ALL:ALL) ALL
stewar ALL=(ALL:ALL) ALL
2.时区设置
root@cloud4:/# tzselect
#.....
#依次选择5 9 1 1
#.....
root@cloud4:/# nano /etc/profile
#添加如下信息
export TZ='Asia/Shanghai'
root@cloud4:/# . /etc/profile
3.修改apt源
root@cloud4:/# nano /etc/apt/sources.list
#删除已存在的所有源,然后添加如下源
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian jessie main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian jessie main contrib non-free
deb http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-free
root@cloud4:/# apt-get update
4.调整时间
root@cloud4:/# apt-get install ntpdate
root@cloud4:/# ntpdate ntp.api.bz
root@cloud4:/# hwclock --utc --systohc
root@cloud4:/# hwclock --show
5.vim
root@cloud4:/# apt-get --purge remove vim-tiny
root@cloud4:/# apt-get install vim
stewar@cloud4:~/software$ tar zxvf Uvim.tar.gz -C ~
6.tree
stewar@cloud4:~/software$ sudo apt-get install tree
7.配置网络
stewar@cloud4:~$ sudo apt-get install bridge-utils
stewar@cloud4:~/software$ sudo vi /etc/network/interfaces
#添加以下信息,然后reboot
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.224
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0
bridge_stp off
dns-nameservers 192.168.0.1
8.设置开机command line
stewar@cloud4:~$ sudo vi /boot/grub/grub.cfg
#找到如下menu entry
menuentry 'Debian GNU/Linux' --class debian
#在其启动参数后添加启动级别3
linux /vmlinuz-3.16.0-4-amd64 root=UUID=794c5c56-986a-46d4-9c07-3123971a33fe ro initrd=/install/initrd.gz quiet 3
9.安装Docker 1.9.1
stewar@cloud4:~$ sudo apt-get install apt-transport-https
stewar@cloud4:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
stewar@cloud4:~$ sudo bash -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
stewar@cloud4:~$ sudo apt-get update
stewar@cloud4:~$ sudo apt-get install lxc-docker