7月29日

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值