centos7 docker下kangle镜像安装教程
发布时间:2021-04-11 04:00       
更新时间:2021-04-11 04:05
当前安装脚本适合没有安装docker的centos7使用
- uname -r
- yum -y update
- yum remove dockerdocker-commondocker-selinuxdocker-engine
- yuminstall -yyum-utilsdevice-mapper-persistent-data lvm2
- yum-config-manager --add-repohttp://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- yum installdocker -y
- service docker start
- if [ ! -d "/home/ximijia_cn_docker/etc" ];then \
- wgethttps://v.ximijia.cn/etc.tar.gz -O /home/etc.tar.gz;\
- cd /home/;\
- tar -zxvfetc.tar.gz;\
- cd /root;\
- fi
- if [ ! -d "/home/ximijia_cn_docker/home" ];then \
- mkdir -p /home/ximijia_cn_docker/home;\
- cd /root;\
- fi
- wgethttps://v.ximijia.cn/kangle.tar.gz -O /home/kangle.tar.gz
- tar -xzvfkangle.tar.gz
- dockerimport /home/kangle.tarximijia_cn:kangle
- dockerrun -dit \
- -v /home/ximijia_cn_docker/home:/home \
- -v /home/ximijia_cn_docker/etc:/vhs/etc \
- --net=host \
- --restart=always \
- --privileged=true \
- --name=ximijia_cn_kangleximijia_cn:kangle \
- /bin/bash -c "sh /run.sh"
进入dockerKangle
dockerexec -itximijia_cn_kangle /bin/bash
退出dockerKangle
exit
如果访问不了3312面板请按下面方法检查
- [root@localhost ~]# sysctl net.ipv4.ip_forward
- net.ipv4.ip_forward = 1 #如果显示1说明正常,如果不为1请修改
- ########################
- vi /etc/sysctl.conf
- #添加下面的代码
- net.ipv4.ip_forward=1
- #重启网络
- systemctl restart network