首页 > 系统服务 > 详细

Linux_简单快速配置linux

时间:2019-06-25 13:51:38      阅读:122      评论:0      收藏:0      [点我收藏+]

本目录为登陆后简介文件

# /etc/motd

装机准备工作

    1. 关闭selinux防火墙
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config 
sync&&reboot
    1. 配置网络
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0  # 指定网卡标识
BOOTPROTO=none # static /dhcp  指定网络模式,静态还是动态的
ONBOOT=yes   # 开机自动启动网卡
IPADDR=192.168.1.2
GATEWAY=192.168.1.1
NETMASK=255.255.255.0

systemctl restart network
    1. 配置yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl  -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo  # -o 下载重命名
yum clean all && yum makecache

-- 3.1 配置eprl库,第三方软件nginx,pip等,Apache

yum install epel-release

-- 3.2 配置ius仓库,python3u

yum install https://centos7.iuscommunity.org/ius-release.rpm

---yum 安装python3

yum groupinstall devolpment
yum install -y python36u
    1. 配置root通过公钥登陆
# 在服务器端生成公钥[本方案适用Linux系统]
ssh-keygen
# 配注复制秘钥到远程主机[在自动化运维ansible可用到]
ssh-copy-id ip

在Windows上通过xshell连接

1. 通过xshell建立公钥
2. 将公钥服务到root目录下的.ssh目录中的文件authorized_keys文件中
3. systemctl restart sshd
3. 配置xhsell客户端登陆使用公钥

Linux_简单快速配置linux

原文:https://www.cnblogs.com/sunxiuwen/p/11082186.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!