在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. 图片碎片化mask动画

    图片碎片化mask动画 效果 源码 https://github.com/YouXianMing/Animations // // TransformFadeViewController.m // A ...

  2. C语言union关键字,union和struct区别

    union 关键字的用法与struct 的用法非常类似. union 维护足够的空间来置放多个数据成员中的“一种”,而不是为每一个数据成员配置空间,在union 中所有的数据成员共用一个空间,同一时间 ...

  3. 卡方检验(Chi-square test/Chi-Square Goodness-of-Fit Test)

    什么是卡方检验 卡方检验是一种用途很广的计数资料的假设检验方法.它属于非参数检验的范畴,主要是比较两个及两个以上样本率( 构成比)以及两个分类变量的关联性分析.其根本思想就是在于比较理论频数和实际频数 ...

  4. 如何利用启明星Portal门户系统的Page模块构建文档库

    利用启明星门户系统的Page模块构架可以搭建企业内部的文档管理系统. (一)应用背景 企业内部通常都会使用共享网盘的方式来存放不同部门之间的文档,例如管理员在服务器上对人事部门增加人事部文档文件夹. ...

  5. 启明星会议室预定系统Outlook版开始支持Exchange2013与Office365版

    版本启明星会议室预定系统支持Exchange2013与微软云服务Office365版.(注意:Exchange2007与Exchange2010也适合此版本) 1.安装 首页,安装类似启明星普通的会议 ...

  6. SQLAlchemy 操作方法汇总

    参考 1.查询: #简单查询 print(session.query(User).all()) print(session.query(User.name, User.fullname).all()) ...

  7. C语言获取系统当前时间

    C语言获取系统当前时间 time_t -- 时间类型 struct tm -- 时间结构 time(&now)函数获取当前时间距1970年1月1日的秒数,以秒计数单位. localtime ( ...

  8. Android动画-帧动画

    Android 平台提供了两种动画一种是 Frame动画,即顺序的播放事先做好的图像,与gif图片或者说跟放电影的原理相似,另一种是Tween动画,就是对场景里的对象不断的进行图像变化来产生动画效果( ...

  9. Evaluate Reverse Polish Notation leetcode java

    题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are + ...

  10. 【反射】Reflect Class Field Method Constructor

    关于反射 Reflection 面试题,什么是反射(反射的概念)? 主要是指程序可以访问,检测和修改它本身状态或行为的一种能力,并能根据自身行为的状态和结果,调整或修改应用所描述行为的状态和相关的语义 ...