今天闲来无事复习一下普通用户httpd源码的安装,安装过程不赘述,在启动过程中提示错误


[coco@cocodb01 bin]$ ./httpd -k start

httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.56.115 for ServerName

(13)Permission denied: make_sock: could not bind to address [::]:80

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs


解决过程:

1、使用httpd -t 命令检查http.conf 是否有问题,结果显示Syntax OK

2、检查selinux等,发现也已经Disable,结果细看一下才发现,已经提示是Permission denied 说明为权限问题

3、经过测试root用户是能够正常启动的,后来查询了一下资料才知道是因为端口权限问题

因为系统在1024端口下为自留端口,使用普通用户需要将端口修改为1024以上,这里就随便写了一个即可


wKiom1ei1__SzxWbAACgYEkdj2g496.jpg-wh_50


4、在使用httpd -k start启动


[coco@cocotdb01 bin]$ ps -ef | grep httpd | grep  coco | grep -v grep

coco      20726   1   0 11:46 ?        00:00:00 ./httpd -k start

coco      20727 20726  0 11:46 ?        00:00:00 ./httpd -k start

coco      20728 20726  0 11:46 ?        00:00:00 ./httpd -k start

coco      20729 20726  0 11:46 ?        00:00:00 ./httpd -k start


总结:

其实端口使用1024为系统自留端口的知识,自己是知道的,但在实际过程中还是没有做到知识的贯通

已后还应勤加实践才是