Installing Nginx via Yum on CENTOS

Source: Internet
Author: User
Installing Nginx with Yum is easy. Simple configuration is all you need!

The first step is to configure the Nginx source

Create a source profile Nginx.repo under the/etc/yum.repos.d/directory:
cd /etc/yum.repos.d/
vim nginx.repo

Fill in the following content:

[Nginx]
Name=nginx Repo
baseurl=http://nginx.org/packages/centos/ Releas eveR/ basearch/
Gpgcheck=0
Enabled=1

Saved, a/etc/yum.repos.d/nginx.repo file is generated.

Step two, install Nginx

The following instructions are executed to automatically install Nginx:
yum install nginx -y
The installation is complete, the following directly can start Nginx:
/etc/init.d/nginx start
Now Nginx has been launched, direct access to the server will be able to see the Nginx Welcome page.

Nginx command and configuration file location:

/etc/init.d/nginx start # 启动Nginx服务
/etc/init.d/nginx stop # 停止Nginx服务
/etc/nginx/nginx.conf # Nginx配置文件位置

'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
  • '). Text (i)); }; $numbering. FadeIn (1700); }); });

    The above describes the CENTOS installation Nginx through Yum, including aspects of the content, I hope to be interested in PHP tutorial friends helpful.

  • 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.