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

[root@localhost ~]# /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 #增加这个非标准端口即可
[root@localhost ~]# /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

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

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

    想建立一个测试用的虚拟主机,遇到了这个问题:[root@localhost html]# service httpd startStarting httpd: httpd: Could not rel ...

  2. centos Permission denied: make_sock: could not bind to address

    CentOS 下启动Httpd 失败,报 (13)Permission denied: make_sock: could not bind to address [::]:8000 因为 小于1024 ...

  3. centos中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 sem ...

  4. (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 d ...

  5. apache——(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : AH00072: make_sock: could not bind to address [::]:443

    问题:命令行运行httpd.exe时报错 (OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次.  : AH00072: make_sock: could not bind t ...

  6. Address already in use: make_sock: could not bind to address [::]:80

    **********************************************************处理办法:# ps -aux | grep httpWarning: bad syn ...

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

    ubuntu上安装Apache2时出现错误 Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0: ...

  8. (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端口已经被占用 ...

  9. Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80

    netstat -tulpn| grep :80 killall -9 httpd /etc/init.d/httpd start  or service httpd start

随机推荐

  1. springboot2.X 在项目启动后执行一段自定义代码

    场景: 项目需要在项目启动后从数据库初始化一些数据进入redis , 但是没有很适合 的监听器去实现 , 监听 老是在dao初始化之前触发. 解决方法:自定义类实现 ApplicationRunner ...

  2. C++常用排序法、随机数

    C++常用排序法研究 2008-12-25 14:38 首先介绍一个计算时间差的函数,它在<time.h>头文件中定义,于是我们只需这样定义2个变量,再相减就可以计算时间差了. 函数开头加 ...

  3. strstr实现

    // strstr.c查找完全匹配的子字符串 #include<stdio.h> #include<string.h> char *my_strstr(const char * ...

  4. 读书笔记之:C语言深度剖析

    读书笔记之:C语言深度剖析 <C 语言深度解剖>这本书是一本“解开程序员面试笔试的秘密”的好书.作者陈正冲老师提出“以含金量勇敢挑战国内外同类书籍”,确实,这本书中的知识点都是一些在面试中 ...

  5. opencv2.4中SVD分解的几种调用方法

    原帖地址: http://blog.sina.com.cn/s/blog_6109b5d00101ag7a.html       在摄影测量和计算机视觉中,考虑最优解问题时,经常要用到SVD分解.奇异 ...

  6. 我所遭遇过的游戏中间件--PhysX

    我所遭遇过的游戏中间件--PhysX PhysX现在是Nvidia的物理中间件.其特点是简练且功能强大.当我最初拿到PHYSX的SDK时,就发现这个物理中间件比Havok要小很多,但该有的功能都有,甚 ...

  7. 上下变换中 aspect的选择

    在电视制作还没有完全整转到高清之前,有很多原来的SD素材需要转到HD信号进入高清切换或者编辑平台,电视台是电视节目的发射源端 ,所以上变换过程不能引入额外的噪声或者失真: 上变换使用的方式一般有4种: ...

  8. Flatten Binary Tree to Linked List leetcode java

    题目: Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 ...

  9. SQL基础(二):SQL命令

    1.SQL SELECT TOP 子句 SELECT TOP 子句用于规定要返回的记录的数目.SELECT TOP 子句对于拥有数千条记录的大型表来说,是非常有用的(或者比如选取某个最新的数据:我们可 ...

  10. URAL 1748

    题目大意:找出T组不大于ni(i=1,2,3,...,T)的因子数最多的数mi(i=1,2,3,...,T),有多个数时输出最小的. KB     64bit IO Format:%I64d & ...