cp station.html /var/www/html/index.html
service httpd restart
chkconfig httpd on
7、配置web服务器,实现虚拟主机。 http://www.77cn.com.cn能访问到/www/virtual目录下的页面,页面从http://ip/dir/example.html下载。并保证,http://www.77cn.com.cn同样能被访问到之前的内容。
8、从http://ip/dir/restircted.html下载文件,能被本地用户harry通过路径http://www.77cn.com.cn/restircted访问到,但是不可以被http://www.77cn.com.cn域访问。
9、配置nfs服务器,将/common目录共享给http://www.77cn.com.cn域,并允许客户端以root用户访问时,也拥有root用户权限
vim /etc/exports /common *http://www.77cn.com.cn(rw,sync) service nfs restart chkconfig nfs on
10.配置samba服务器,将/common共享为share,能被浏览到。用户harry对此共享只读,如果需要,harry用户密码为harryuser。组群为STAFF
yum –y install samba*
vim /etc/samba/smb.conf
workgroup=STAFF
[share]
path=/common
public=no
browseable=yes
write list=harry
service smb restart
chkconfig smb on
smbpasswd –a harry
chcon –R –t samba_share_t /common
chmod o+w /common
smbclient –U harry //172.24.30.5/share
11.配置一台http://www.77cn.com.cn域的邮件服务器,要求可以在服务器本地或者通过harry用户从网络上连接到服务器收发邮件。harry用户的邮箱是/var/spool/mail/harry。注意DNS服务器已经帮你做好MX记录的解析。
vim /etc/postfix/main.cf
myhostname=http://www.77cn.com.cn
mydomain=http://www.77cn.com.cn
myorigin=$mydomain
inet_interface=all(把inet_interface=localhost注释上)\
mydestination=加入$mydomain
service postfix restart
chkcofig postfix on