centos安装LAMP

来源:互联网 发布:中国软件邮箱地址 编辑:程序博客网 时间:2024/05/21 09:13
一、安装Apache  


yum install httpd   #根据提示,输入Y安装即可成功安装 


/etc/init.d/httpd start  #启动Apache  


备注:Apache启动之后会提示错误:


   正在启动 httpd:httpd: Could not reliably determine the server's fully qualifdomain name, using ::1 for ServerName     


解决办法:


    vi/etc/httpd/conf/httpd.conf   #编辑


   找到  #ServerNamewww.example.com:80


   修改为 ServerName localhost:80


    :wq!   #保存退出


chkconfig httpd on   #设为开机启动 


/etc/init.d/httpd restart  #重启Apache

关闭防火墙

#/etc/init.d/iptables stop

现在可以通过局域网访问了。

原创粉丝点击