欢迎来到天天文库
浏览记录
ID:37901007
大小:86.00 KB
页数:11页
时间:2019-06-02
《RHCE备考资料修改过》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、RHCE备考资料RHCE部分一搭建两个虚拟主机www.example.com和stu.example.com.要求stu.example.com同时侦听80和8080两个端口,要求访问www.example.com的用户必须是todd,密码是login.首先配置DNS服务器安装包:bind-9.3.3-7.el5vi/etc/named.conf(将named.conf文件chgrp到named用户组)options{directory“/var/named”;};zone“.”IN{typehint;file“named.root”;};zone“localdomain”I
2、N{typemaster;file“localdomain.zone”;};zone“localhost”{typemaster;file“localhost.zone”;};zone“0.0.127.in-addr-arpa”IN{typemaster;file“named.local”;};zone“example.com”IN{typemaster;file“example.zone”;};zone“0.168.192.in-addr.arpa”IN{typemaster;file“0.168.192.zone”;};vi/var/named/example.zone$
3、TTL86400@INSOAexample.com.root.www.example.com.(42;serial(d.adams)3H;refresh15M;retry1W;expiry1D;minimumINNSexample.com.Page11RHCE备考资料example.com.INMX10mail.example.com.mail.INA192.168.0.100wwwINA192.168.0.100stuINA192.168.0.100example.com.INA192.168.0.100vi/var/named/0.168.192.zone$TTL8640
4、0@INSOAexample.com.root.www.example.com.(42;serial(d.adams)3H;refresh15M;retry1W;expiry1D;minimumINNSexample.com.100INPTRmail.example.com.100INPTRstu.example.com.100INPTRwww.example.com./var/named下有文件0.168.192.zoneexample.zonelocalhost.zonenamed.rootlocaldomain.zonenamed.localvi/etc/hosts19
5、2.168.0.100www.example.comvi/etc/resolv.confnameserver192.168.0.100vi/etc/sysconfig/networkHOSTNAME=www.example.com用servicenamedconfigtest命令验证DNS的配置用nslookup命令进行域名解析配置apache服务器安装包:httpd-2.2.3-11.el5依赖包:apr-util-1.2.7-6apr-1.2.7-11postgresql-libs-8.1.9.1.el51.虚拟主机配置vi/etc/httpd/conf/httpd.co
6、nfListen8080NameVirtualHostwww.example.com:80ServerAdminroot@www.example.comDocumentRoot/var/www/virtual/www.example.com/htmlServerNamewww.example.comErrorLoglogs/www.example.com-error_logCustomLoglogs/www.example.com-access_logcommonNameVirtualHo
7、ststu.example.com:80Page11RHCE备考资料ServerAdminroot@stu.example.comDocumentRoot/var/www/virtual/stu.example.com/htmlServerNamestu.example.comErrorLoglogs/stu.example.com-error_logCustomLoglogs/stu.example.com-access_logcommon
此文档下载收益归作者所有