Install Nginx on CentOS7 and nginx on centos7

Source: Internet
Author: User

Install Nginx on CentOS7 and nginx on centos7

Due to practical needs, I learned a little bit about "nginx" during this period ". We will not discuss nginx any more. http://wiki.nginx.org/mainwill provide a detailed introduction to zookeeper installation.

I am used to downloading the source code from the official website. http://nginx.org/, we can see that nginxis still very popular. Today, it is, and the latest version is already 07-14, mainly including stable and mainline versions.

The stable version I selected for 1.8.0. The software is a little smaller than kb. Download to the host directly on the webpage. You can also download wget at http://nginx.org/download/nginx-1.8.0.tar.gz

tar -xf nginx-1.8.0.tar.gz

Use tar unzip, unzip after, enter the directory can install according to the instructions of the official website (http://wiki.nginx.org/Install)

I also manually paste the text version operation steps. If you are too lazy to do so, press ctrl + C:

./configure

make

sudo make install

Some configuration can be performed for./configure, and I have not studied it in detail. I will add it when I use it later. First fill in a hole here.

Nginx installation is complete. Some minor errors may occur in some earlier versions of linux, but there is nothing to roll back. You may need to install openssl, pure, and CentOS7, the installation is also simple. After the installation is complete, there are four more directories under the directory you specified. We will start nginx in sbin:

The "Permission denied" error occurs, which is obviously a Permission issue. If you are familiar with Linux, you will not be surprised because Linux has strict permissions. In the figure, port 80 is used for bind, linux requires the root permission to use the port lower than 1024. The solution is also very simple. Find the configuration file nginx below. conf: Change the port.

Use nginx-s reload to reload the configuration file. A welcome page is displayed when you access the browser.

The entire process is very simple, enjoy!

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.