安装Apache HTTP服务器程序
yum –y install httpd
开启Apache服务并检查Apache服务的运行状态
重启Apache服务,不用start用restart是为了不读者以前启动过Apache服务且没有关闭
systemctl restart httpd
检查Apache服务的运行状态,有running字样说明启动成功
systemctl status httpd
设置Apache服务开机自启动
systemctl enable httpd
yum install -y openssl openssh-server
用 vi 打开配置文件 /etc/ssh/sshd_config
修改配置文件,将PermitRootlogin yes,RSAAuthentication yes,PubkeyAuthentication yes,AuthorizedKeysFile .ssh/authorized_keys前面的#去掉
rpm -qa | grep openssh-server查看是否有ssh服务
systemctl start sshd.service启动ssh服务
设置开机自动启动ssh服务
systemctl enable sshd.service
systemctl status sshd.service查看ssh服务状态