【linux】新机配置
开启网络
cd /etc/sysconfig/network-scripts/
vi ifcfg-ens33
...
BOOTPROTO=dhcp
...
ONBOOT=yes
systemctl restart network
关闭防火墙
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
安装网络查看工具
yum search ifconfig
yum install net-tools.x86_64
开启ssh
yum install openssh-server
vim /etc/ssh/sshd_config
...
Port 22 #将改行前面的#键去掉,开启22端口
ListenAddress 0.0.0.0 #将改行前面的#键去掉
ListenAddress :: #将改行前面的#键去掉
...
PermitRootLogin yes #将改行前面的#键去掉 允许远程登录
...
PasswordAuthentication yes #将改行前面的#键去掉,这是开启用户名和密码登录
sudo service sshd start
netstat -an | grep 22
安装docker
安装
yum isntall -y docker
systemctl enable docker # 开机自启动
systemctl start docker # 启动docker
yum install -y epel-release
yum install -y docker-compose
yum install -y docker-compose
镜像加速
vi /etc/docker/daemon.json
{
"registry-mirrors": ["xxx"]
}
sudo systemctl daemon-reload
sudo systemctl restart docker
作者:小魁jking
出处:https://www.cnblogs.com/wangjinkui/
版权:本文版权归作者和博客园共有
转载:欢迎转载,但未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任
出处:https://www.cnblogs.com/wangjinkui/
版权:本文版权归作者和博客园共有
转载:欢迎转载,但未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任