网站首页
手机版

rhel6.3使用yum安装apache的方法(rhel7配置yum源)

更新时间:2024-02-23 00:12:24作者:佚名

rhel6.3使用yum安装apache的方法(rhel7配置yum源)

1、安装httpd软件包:

Yum install httpd

2、启动apache服务:

[root@redhat Desktop]# /etc/init.d/httpd start

Starting httpd: [ OK ]

3、安装mod-ssl软件包

[root@redhat Desktop]# yum install mod_ssl –y

4、创建一个/date/www/html的目录、并且修改安全上下文:

Chcon –t httpd_sys_content_t /date/ -R(l临时修改都行)

5、在/date/www/html下添加一个apache可执行的文件:

6、在/var/www/html下添加一个可执行的文件

7、配置Apache的配置文件:(注意打开80端口)

rhel6.3使用yum安装apache的方法

8、配置ssl的配置文件:(注意添加 加密那2行)

rhel6.3使用yum安装apache的方法

9、重启apache服务:

[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测试是否成功:

rhel6.3使用yum安装apache的方法

rhel6.3使用yum安装apache的方法

本文标签: 方法  可执行  配置文件