This article describes how to install apache using yum in rhel6.3. For more information, see RHELApache.
1. install the httpd software package:
Yum install httpd
2. start the apache service:
[Root @ redhat Desktop] #/etc/init. d/httpd start
Starting httpd: [OK]
3. install the mod-ssl package
[Root @ redhat Desktop] # yum install mod_ssl-y
4. create a/date/www/html directory and modify the security context:
Chcon-t httpd_sys_content_t/date/-R (l can be modified temporarily)
5. add an apache executable file under/date/www/html:
6. add an executable file under/var/www/html.
7. configure the Apache configuration file: (open port 80)
8. configure the ssl configuration file: (add the two lines for encryption)
9. restart the apache service:
[Root @ redhat conf. d] #/etc/init. d/httpd restart
Stopping httpd: [OK]
Starting httpd: [OK]
[Root @ redhat conf. d] #
10. configure domain name resolution:/etc/hosts
Apache.example.com 192.168.0.1
Redhat.example.com 192.168.0.1
11 test successful: