为了账号安全,请及时绑定邮箱和手机立即绑定

【CentOS】How to setup PHP env

标签:
PHP

////// apache

# yum install httpd httpd-devel

# systemctl start httpd

# systemctl status httpd

# systemctl enable httpd


////// php

# yum install php php-devel

# systemctl restart httpd


////// error

[root@wode013 sbin]# systemctl status httpd.service

● httpd.service - The Apache HTTP Server

   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

   Active: failed (Result: exit-code) since 二 2016-03-08 11:22:49 EST; 6min ago

     Docs: man:httpd(8)

           man:apachectl(8)

  Process: 30009 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)

  Process: 29986 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

 Main PID: 29986 (code=exited, status=1/FAILURE)


3月 08 11:22:49 wode013 httpd[29986]: (13)Permission denied: AH00072: make_sock: could not bind to...6000

3月 08 11:22:49 wode013 httpd[29986]: (13)Permission denied: AH00072: make_sock: could not bind to...6000

3月 08 11:22:49 wode013 httpd[29986]: no listening sockets available, shutting down

3月 08 11:22:49 wode013 httpd[29986]: AH00015: Unable to open logs

3月 08 11:22:49 wode013 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE

3月 08 11:22:49 wode013 kill[30009]: kill: cannot find process ""

3月 08 11:22:49 wode013 systemd[1]: httpd.service: control process exited, code=exited status=1

3月 08 11:22:49 wode013 systemd[1]: Failed to start The Apache HTTP Server.

3月 08 11:22:49 wode013 systemd[1]: Unit httpd.service entered failed state.

3月 08 11:22:49 wode013 systemd[1]: httpd.service failed.

Hint: Some lines were ellipsized, use -l to show in full.


////// port

[root@wode013 sbin]# firewall-cmd --add-service=http --permanent

success

[root@wode013 sbin]# firewall-cmd --reload

success

[root@wode013 sbin]# firewall-cmd --list-all

public (default, active)

  interfaces: enp3s0f0 enp3s0f1

  sources:

  services: dhcpv6-client http ssh

  ports: 5000/tcp

  masquerade: no

  forward-ports:

  icmp-blocks:

  rich rules:


[root@wode013 sbin]# semanage port -l | grep 80

http_cache_port_t              tcp      8080, 8118, 8123, 10001-10010

http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000



点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消