在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. powerdesigner 设置字段显示comment注释

    在Columns标签下,一排按钮中找到这个按钮:Customize Columns and Filter

  2. andriod 文本居中: android:gravity="center"

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...

  3. 使用msm配置分布式tomat,实现session共享

    一,环境说明 操作系统是Windows7家庭版(有点不专业哦,呵呵!),JDK是1.6的版本, Tomcat是apache-tomcat-6.0.35-windows-x86,下载链接:http:// ...

  4. 阿里春招Android面经

    作者:淘萄桃 链接: https://www.jianshu.com/p/a07ccaad832d 本文由作者授权发布. 笔者参加18年阿里春招,有幸最终拿到阿里offer,base杭州,岗位客户端开 ...

  5. Python Post img

    from poster.encode import multipart_encode from poster.streaminghttp import register_openers import ...

  6. 列出Windows域中所有的机器

    我所在的部门大概管理了300+台Windows终端,最近开始采用域的方式来进行管理.(别笑我们土,原来手工修改Windows口令太痛苦了.) 现在的任务是想在域控服务器中列出纳入域管理的所有机器,以及 ...

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

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

  8. 把Scala代码当作脚本运行

    1. 在类UNIX系统上作为脚本运行 在类Unix系统上,你可以设置一个shell前导词来执行脚本.如下例: Script.scala #!/usr/bin/env scala !# println( ...

  9. Informatica 常用组件Lookup之三 关系和平面文件查找

    创建查找转换时,您可以选择使用关系表或平面文件作为查找源. 关系查找 使用关系表作为查找源来创建查找转换时,您可以使用 ODBC 连接到查找源并导入表定义作为查找转换的结构. 仅可对关系查找使用以下选 ...

  10. Mybatis映射实体改造和异常问题

    现在WEB开发经常使用 Mybatis 作为持久化框架,在开发过程中,会在Java代码中构建实体类与数据库表字段相互映射, 下面提出一个关于映射实体优化的方案:通过链式编程实现给实例对象赋值. 参考代 ...