Install nginx under centos6.5

WBOY
Release: 2016-08-08 09:30:34
Original
888 people have browsed it

1.Install pcre-8.36.tar.gz

tar -zxvf pcre-8.36.tar.gz
cd pcre-8.36
./configure --prefix=/usr/local/pcre
make
make install
Copy after login

2.Install zlib-1.2.8.tar.gz

tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make
make install
Copy after login

3.Install openssl-1.0.2.tar.gz

tar -zxvf openssl-1.0.2.tar.gz 
Copy after login

4.Install nginx-1.6.2.tar.gz

./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid --with-http_ssl_module --with-pcre=/usr/local/soft/pcre-8.36 --with-zlib=/usr/local/soft/zlib-1.2.8 --with-openssl=/usr/local/soft/openssl-1.0.2
make
make install
Copy after login

--with-pcre=/usr/local/soft/pcre-8.36 refers to the source code path of pcre-8.36. --with-zlib=/usr/local/soft/zlib-1.2.8 Refers to the source code path of zlib-1.2.8.

--with-openssl=/usr/local/soft/openssl-1.0.2 Refers to the source code path of openssl-1.0.2.

5. Start nginx and verify whether it is started

Start nginx

/usr/local/nginx/sbin/nginx 
Copy after login
visit nginx

Access via browser http://Your IP If the following interface appears, it proves that the startup is successful


The above introduces the installation of nginx under centos6.5, 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!