Docker host debian8全配置

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 ~

Uvim.tar.gz

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值