Home  >  Article  >  Backend Development  >  CentOS yum install nginx

CentOS yum install nginx

WBOY
WBOYOriginal
2016-08-08 09:28:02805browse

CentOS yum installation nginx

If there is no need for custom modules for nginx, you can install it in this simple way.
Generally used for testing and servers that only need simple web applications.

The method is to add the official source in CentOS and install it with yum.

Steps:

  1. Open the terminal and enter the commands in sequence:

    <code>cd /etc/yum<span>.repos</span><span>.d</span>/
    vi nginx<span>.repo</span></code>
  2. Paste the following content in the open editor:

    <code><span>[nginx]</span><span>name=<span>nginx repo</span></span><span>baseurl=<span>http://nginx.org/packages/centos/$releasever/$basearch/</span></span><span>gpgcheck=<span><span>0</span></span></span><span>enabled=<span><span>1</span></span></span></code>

    vi Enter wq to save and exit.

  3. Execute the yum installation command:

    <code>yum <span>install</span> nginx -y</code>

    Wait for the installation to complete.

The above introduces CentOS yum installation nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn