rhel6.3使用yum安裝apache的方法
1、安裝httpd軟件包:
Yum install httpd
2、啟動(dòng)apache服務(wù):
[root@redhat Desktop]# /etc/init.d/httpd start
Starting httpd: [ OK ]
3、安裝mod-ssl軟件包
[root@redhat Desktop]# yum install mod_ssl –y
4、創(chuàng)建一個(gè)/date/www/html的目錄、并且修改安全上下文:
Chcon –t httpd_sys_content_t /date/ -R(l臨時(shí)修改都行)
5、在/date/www/html下添加一個(gè)apache可執(zhí)行的文件:
6、在/var/www/html下添加一個(gè)可執(zhí)行的文件
7、配置Apache的配置文件:(注意打開(kāi)80端口)
8、配置ssl的配置文件:(注意添加 加密那2行)
9、重啟apache服務(wù):
[root@redhat conf.d]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@redhat conf.d]#
10、配置域名解析:/etc/hosts
apache.example.com 192.168.0.1
redhat.example.com 192.168.0.1
11測(cè)試是否成功:
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。