Home > Backend Development > PHP Tutorial > centos6 install nginx

centos6 install nginx

WBOY
Release: 2016-07-28 08:29:44
Original
1117 people have browsed it

Download the installation package http://nginx.org/packages/centos/6/x86_64/RPMS/ or http://nginx.org/packages/mainline/centos/6/x86_64/RPMS/ to install various versions of nginx downstream. Package

Install rpm -i xxx.rpm

After installation, an nginx user will be created, and nginx will be installed as a service

Switch to the nginx user and execute service nginx start

Note that if you do not use nginx to start, you must modify it. nginx configuration file, and change the owner of the temporary file generated by nginx to the user who started nginx

For example, to start nginx with root

vi /etc/nginx/nginx.conf

Change user nginx to user root root

Modify temporary file owner

chown -R root /var/cache/nginx/

Delete pid file

rm -f /var/run/nginx.pid

Start

service nginx start

The above introduces the installation of nginx on centos6, 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