1.配置使用ssl完成https访问apache服务器
[root@server etc]# yum install mod_ssl -y
[root@server www]# mkdir myssl
[root@server www]# cd myssl
[root@server myssl]# echo "This is my first https" > index.html
[root@server ~]# systemctl restart httpd
2.配置访问apache的cgi程序
创建文件/usr/local/apache/cgi-bin/test.cgi
[root@server bin]# chmod a+x /usr/local/bin/cgi-bin/test.cgi
写入文件内容:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";
3.nfs挂载
a、开放/nfs/shared目录,供所有用户查询资料;
[root@server ~]# yum install nfs-utils -y
[root@server ~]# yum install rpcbind -y
[root@server ~]# systemctl start rpcbind , nfs-server
[root@server ~]# mkdir nfs
[root@server ~]# cd nfs
[root@server nfs]# mkdir shared
[root@server nfs]# vim /etc/exports
[root@server nfs]# systemctl restart nfs-server
[root@client ~]# mkdir client
[root@client ~]# cd client
[root@client client]# mkdir SJ
[root@server nfs]# showmount -e 192.168.111.129
[root@client client]# mount 192.168.102.131:/nfs/shared /client/SJ
b、开放/nfs/upload目录,该目录为192.168.xxx.0/24网段的主机的数据上传目录,
并将所有该网段主机上传文件的所属者和所属组映射为nfs-upload,其UID和GID为2001;
[root@server ~]# vim etc/exports
[root@server ~]# mkdir -p /nfs/shared
[root@server ~]# echo text > /nfs/shared/text
[root@server ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daem>
Loaded: loaded (/usr/lib/systemd/system/firewalld.se>
Active: inactive (dead)
Docs: man:firewalld(1)
[root@server ~]# setenforce 0
[root@server ~]# getenforce
[root@server ~]# systemctl restart rpcbind
[root@server ~]# systemctl restart nfc-server
[root@server ~]# ll /nfs/up;oad -d
[root@server ~]# vim /etc/auto.nfs
shared 192.168.111.140:/nfs/shared
upload 192.168.111.140:/nfs/upload
[root@server ~]# cd /nfs/upload
c、将/home/tom(该目录为uid=1111,gid=1111的tom用户的家目录)目录仅共享
给192.168.xxx.128这台主机上的jerry用户,jerry对该目录具有访问、新建和
删除文件的权限。
/nfs/shared *(ro)
/nfs/upload 192.168.111.0/24(rw,all_squash,anonuid=2001,anongid=2001)
/home/tom 192.168.111.129(rw)
[root@server ~]# setenforce 0
[root@server ~]# getenforce
shared 192.168.111.140:/nfs/shared
upload 192.168.111.140:/nfs/upload
tom 192.168.111.140:/home/tom