1. 建立centos
2. 登陆,切换到root,或用root登陆
3. 关闭所有防火墙。
chkconfig iptables off
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld.service
yum remove firewalld
然后重启server
4. yum install libtool zlib-devel autoconf readline-devel readline libuuid-devel zlib-devel mysql-devel automake libuuid readline-devel readline ncurses-devel.x86_64 ncurses.x86_64 gcc-c++ vim wget net-tools svn libstdc++.so.6 glibc.i686 unzip make lrzsz libtool zlib-devel autoconf readline-devel readline libuuid-devel zlib-devel mysql-devel automake libuuid readline-devel readline ncurses-devel.x86_64 ncurses.x86_64 gcc-c++ vim wget net-tools svn libstdc++.so.6 glibc.i686 unzip docker
5. mkdir /root/czq_tfs_data
创建tfs存储的目录
6. mkdir /usr/local/docker
7. cd /usr/local/docker
8. rz 选择打包好的tfs.tar上传
9. docker load < tfs.tar
10. docker images查看会有一个image出来了
11. docker run --privileged=true -d --net=host --restart=always --name=tfsnameserver -e NS_IP=172.20.10.9 -e UNUSED_IP=192.168.0.166 -e DEV_NAME=eth0 10.213.42.254:10500/caozhiqiang1/tfs:v2.2 ns
运行nameserver。
12. docker run --privileged=true -d --net=host --restart=always --name=tfsdataserver -e NS_IP=172.20.10.9 -e UNUSED_IP=192.168.0.166 -e MOUNT_MAXSIZE=1000000 -e DEV_NAME=bond0 -v /root/czq_tfs_data:/data 10.213.42.254:10500/caozhiqiang1/tfs:v2.2 ds
运行dataserver
13. docker ps查看一下2个服务起来了没有
14. systemctl enable docker 让docker自启动。
15. 然后用别的机器telnet一下,看看端口通了没。