In Linux, services such as apachemysql cannot be started properly after the default port is modified.

Source: Internet
Author: User
Tags least privilege
In Linux, apachemysql and other services cannot be started after the default port is modified. solution: two webservers are installed on the server, and one is nginx on port 80, with no exception. Another port is Port 8001 bound to apache, but the error "Starting..." is reported when the service is started...
In Linux, apache mysql and other services cannot be started normally after the default port is modified. solution: two webservers are installed on the server, and one is nginx on port 80, with no exception. The other is the port 8001 bound to apache, but the error "Starting httpd: (13) Permission denied: make_sock: cocould not bind to address" is returned when the service is started, the original culprit was selinux. A brief introduction to SELinux, short for Security-Enhanced Linux, is the implementation of mandatory access control, the purpose is to explicitly specify the resources (files, network ports, etc.) that a process can access ). It is based on the principle of least privilege principle and uses the Linux Security module in the Linux kernel ). It is not a Linux release, but a group of modifications that can be applied to Unix-like operating systems (such as Linux and BSD. Its developers are the National Security Administration of America. Www.2cto.com: Method 1: disable SELinux. this is the fastest and most direct method that many people use. The disadvantage is that it sacrifices system security. You can disable SELinux or set SELinux mode to tolerant mode. How to completely close: $ vim/etc/selinux/config add a # sign before SELINUX = enforcing to comment out it # SELINUX = enforcing and add a new line of SELINUX = disabled to save and exit, restart the system to set the tolerance mode: $ setenforce 0 www.2cto.com Method 2: modify SELinux rules to view the current http-supported ports $ semanage port-l | grep http adds a new port number for the http service $ semanage port-a-t http_port_t-p tcp 8001 view added result $ semanage port-l | grep http from Miao Yushun's column
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.