ITPub博客

首页 > 数据库 > Oracle > centos6 下的apache安装

centos6 下的apache安装

Oracle 作者:peng163fj 时间:2015-07-24 10:59:27 0 删除 编辑

二、安装 Apache 组件

  由于 CentOS 已经封装了 Apache,直接运行安装:

[root@localhost ~]# yum install httpd

同样配置系统让 Apache 随系统启动:

[root@localhost ~]# chkconfig --levels 235 httpd on

配置完毕,启动 Apache:

[root@localhost ~]# /etc/init.d/httpd start

  此时已经可以访问你的服务器,不出意外的话,能够看到 “Apache 2 Test Page powered by CentOS” 的测试页面。注意,如果其他机器访问这台服务无法显示这个页面,而直接在这台服务器上可以访问的话,一般情况下是 CentOS 自带的防火墙禁止了。你只需要进入防火墙,将 “WWW” 对应的 “80” 端口打开即可。

注意:在 CentOS 中 Apache 的默认根目录是 /var/www/html,配置文件 /etc/httpd/conf/httpd.conf。其他配置存储在 /etc/httpd/conf.d/ 目录。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21302630/viewspace-1749366/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-11-20

  • 博文量
    155
  • 访问量
    440169