1、配置ssh免密登陆:客户端主机通过redhat用户基于秘钥验证方式进行远程连接服务器的root用户。
2、综合练习:请给openlab搭建web网站
网站需求: 1.基于域名www.openlab.com可以访问网站内容为 welcome to openlab!!! 2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,基于www.openlab.com/student 网站访问学生信息,www.openlab.com/data网站访问教学资料,www.openlab.com/money网站访问缴费网站。
3、配置dns服务的正向解析
1、配置ssh免密登陆:客户端主机通过redhat用户基于秘钥验证方式进行远程连接服务器的root用户。
创密钥:
[root@localhost ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? n
传密钥给服务器root用户:
[root@localhost ~]# ssh-copy-id root@192.168.72.128
尝试在本地服务器上登陆对端服务器
[root@localhost ~]# ssh root@192.168.72.128
2、综合练习:请给openlab搭建web网站
网站需求: 1.基于域名www.openlab.com可以访问网站内容为 welcome to openlab!!! 2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,基于www.openlab.com/student 网站访问学生信息,www.openlab.com/data网站访问教学资料,www.openlab.com/money网站访问缴费网站。
1、
更新配置文件[root@localhost ~]# vim /etc/httpd/conf.d/vhosts.conf
利用本机的/etc/hosts文件做域名解析
[root@localhost ~]# vim /etc/hosts
创建网页根目录
[root@localhost ~]# mkdir -p /www/openlab
编辑网页内容
[root@localhost ~]# echo 'welcome to openlab!!!' > /www/openlab/index.html
重启hppd服务
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# setenforce 0
2.给该公司创建的三个子页面分别显示学生信息,教学资料和缴费网站,基于www.openlab.com/stdent网站访问学生信息,www.openlab.com/data网站访问教学资料,www.openlab.com/money网站访问缴费网站。要求:学生信息网站只有tian和song两人可以访问,其他用户不能访问;访问缴费网站实现数据加密基于https访问。
更改配置文件
[root@localhost ~]# vim /etc/httpd/conf.d/vshots.conf
重启httpd服务
[root@localhost ~]# systemctl restart httpd
创建/data网页根目录
[root@localhost ~]# mkdir /www/openlab/data
编辑网页内容
[root@localhost ~]# echo 'this is openlab data' > /www/openlab/data/index.html
安装bind软件
[root@localhost ~]# yum install bind -y