CentOS yum install nginx

WBOY
Release: 2016-08-08 09:28:02
Original
811 people have browsed it

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>
    Copy after login
  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>
    Copy after login

    vi Enter wq to save and exit.

  3. Execute the yum installation command:

    <code>yum <span>install</span> nginx -y</code>
    Copy after login

    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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template