- 换Yum源
- 1提权
[usera@centos79 yum.repos.d]$ sudo -i
[sudo] usera 的密码: // 输入的密码不显示 Pwd@123.com
[root@centos79 ~]#
- 2备份(阿里开源镜像站)
[root@centos79 ~] mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@centos79 ~]# cd /etc/yum.repos.d/
[root@centos79 yum.repos.d]# ls
- 3下载新的配置文件
[root@centos79 yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
[root@centos79 yum.repos.d]# ls
2 .SSH
2.1查看是否已经安装openssh
[root@centos79 yum.repos.d]# yum list installed | grep openssh
openssh.x86_64 7.4p1-21.el7 @anaconda
openssh-clients.x86_64 7.4p1-21.el7 @anaconda
openssh-server.x86_64 7.4p1-21.el7 @anaconda
[root@centos79 yum.repos.d]# cd /etc/ssh
[root@centos79 ssh]# ls
moduli ssh_host_ecdsa_key ssh_host_ed25519_key.pub
ssh_config ssh_host_ecdsa_key.pub ssh_host_rsa_key
sshd_config ssh_host_ed25519_key ssh_host_rsa_key.pub
[root@centos79 ssh]# cat sshd_config
** 默认已经安装了,如果没有安装,需要yum install openssh-server 进行安装
2.2 查看sshd是否正在运行
[root@centos79 ssh]# ps -e | grep sshd
1442 ? 00:00:00 sshd
<