permission denied make_sock could not bind to address 81问题解决

在apache中绑定非http标准端口时,一直出现如下的错误提示:

[[email protected] ~]# /etc/init.d/httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to
address 0.0.0.0:888
no listening sockets available, shutting down
Unable to open logs
[FAILED]
解决方案:
增加selinux中http的端口

semanage port -l|grep http #查看SELinux下http相关端口
semanage port -a -t http_port_t -p tcp 888 #增加这个非标准端口即可
[[email protected] ~]# /etc/init.d/httpd restart 或者 service httpd
start
Stopping httpd: [ OK  ]

Starting httpd: [  OK  ]

CentOS下安装semanage

安装:

# yum -y install policycoreutils-python

semanage使用方法:

/usr/sbin/semanage:

semanage [ -S store ] -i [ input_file | - ]

semanage [ -S store ] -o [ output_file | - ]

semanage {boolean|login|user|port|interface|module|node|fcontext} -{l|D|E} [-n]

semanage login -{a|d|m} [-sr] login_name | %groupname

semanage user -{a|d|m} [-LrRP] selinux_name

semanage port -{a|d|m} [-tr] [ -p proto ] port | port_range

semanage interface -{a|d|m} [-tr] interface_spec

semanage module -{a|d|m} [--enable|--disable] module

semanage node -{a|d|m} [-tr] [ -p protocol ] [-M netmask] addr

semanage fcontext -{a|d|m} [-efrst] file_spec

semanage boolean -{d|m} [--on|--off|-1|-0] -F boolean | boolean_file

semanage permissive -{d|a|l} type

semanage dontaudit [ on | off ]

Primary Options:

-a, --add        Add a OBJECT record NAME

-d, --delete     Delete a OBJECT record NAME

-m, --modify     Modify a OBJECT record NAME

-i, --input      Input multiple semange commands in a transaction

-o, --output     Output current customizations as semange commands

-l, --list       List the OBJECTS

-E, --extract    extract customizable commands

-C, --locallist  List OBJECTS local customizations

-D, --deleteall  Remove all OBJECTS local customizations

-h, --help       Display this message

-n, --noheading  Do not print heading when listing OBJECTS

-S, --store      Select and alternate SELinux store to manage

Object-specific Options (see above):

-f, --ftype      File Type of OBJECT

"" (all files)

-- (regular file)

-d (directory)

-c (character device)

-b (block device)

-s (socket)

-l (symbolic link)

-p (named pipe)

-F, --file       Treat target as an input file for command, change multiple settings

-p, --proto      Port protocol (tcp or udp) or internet protocol version of node (ipv4 or ipv6)

-M, --mask       Netmask

-e, --equal      Substitue source path for dest path when labeling

-P, --prefix     Prefix for home directory labeling

-L, --level      Default SELinux Level (MLS/MCS Systems only)

-R, --roles      SELinux Roles (ex: "sysadm_r staff_r")

-s, --seuser     SELinux User Name

-t, --type       SELinux Type for the object

-r, --range      MLS/MCS Security Range (MLS/MCS Systems only)

--enable         Enable a module

--disable        Disable a module

时间: 2024-11-03 05:44:13

permission denied make_sock could not bind to address 81问题解决的相关文章

linux 下apche无法监听端口解决办法(Permission denied: make_sock: could not bind to address)

想建立一个测试用的虚拟主机,遇到了这个问题:[[email protected] html]# service httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.termwikidev for ServerName(13)Permission denied: make_sock: could not bin

httpd 启动报错“”Permission denied: make_sock: could not bind to address [::]:80“”

今天闲来无事复习一下普通用户httpd源码的安装,安装过程不赘述,在启动过程中提示错误 [[email protected] 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 t

apache报Permission denied: make_sock: could not bind to address 解决方案

启动Apache时报错信息: [[email protected] httpd]# /etc/init.d/httpd startStarting httpd: (13)Permission denied: make_sock: could not bind to address [::]:8000(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8000no listening sockets availab

httpd Server not started: (13)Permission denied: make_sock: could not bind to address [::]:8888

Install semanage tools: sudo yum -y install policycoreutils-python Allow port 88 for httpd: sudo semanage port -a -t http_port_t -p tcp 88 Allow port 8445 for httpd: sudo semanage port -a -t http_port_t -p tcp 8445

Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80

1. 启动 Apache 时报错: [[email protected] sh]# service httpd start Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName (98)Address already in use: make_sock: could not bi

apache启动报错(98)Address already in use: make_sock: could not bind to address [::]:80

# /usr/local/apache2/bin/apachectl start Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80no listening sockets available, shutting downU

(98)Address already in use: make_sock: could not bind to address 80 [resolved] (2012-10-11 09:04)

以前遇到一个问题: sudo /etc/init.d/apache2 start * Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName (98)Address already in use: make_sock: could not bind to address 0.0

(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80

(98)address already in use: ah00072: make_sock: could not bind to address 0.0.0.0:80 问题描述: 80端口已经被占用,导致启动不了 解决思路: 一种是比较简单的情况,查看80端口进程号,然后kill -9 该进程号关闭占用该80端口的进程,然后重启即可 另一种是查询不到80端口被占用,但是出现这样的提示,我困惑很久,最后是参考该文得到的思路https://www.digitalocean.com/communit

Address already in use: make_sock: could not bind to address 0.0.0.0:80

显示:80端口的某些进程还是存在的, 可以用 ps -ef | grep httpd 查看进程,然后Kill -9 进程号  杀死进程, 如果没有可能是端口冲突 可以用netstat -nat|grep -i "80"|wc -l  查看有多少个80端口 然后查看netstat -nat|grep -i "80" 终端输入: find / -name ports.conf /etc/apache2/ports.conf 输入: vim '/etc/apache2/p