CentOS Server Build (5)--Install Ngnix

Source: Internet
Author: User
Tags centos server

The JDK is installed first

1. Download nginx-1.6.2.tar.gz

2. Ensure that the g++, GCC, Openssl-devel, Pcre-devel, and Zlib-devel software are installed before installation

Yum Install GCC
Yum Install zlib zlib-devel OpenSSL openssl--devel pcre pcre-devel

3. Installing Nginx

 [[email protected] ~]# CP /root/nginx- 1.6 . 2 . tar . Gz/opt/[[email protected]  ~] # tar -xzvf nginx-2 . tar  1.6 . 2  [[email protected "Nginx -1.6 . Span style= "color: #800080;" >2 ]#./configure--prefix=/usr/local/nginx #安装到 /usr/local/nginx 
[email protected] nginx-1.6. 2  Make  Make Install

[Email protected] sbin]#/usr/local/nginx/sbin/nginx #启动nginx

4. Common commands

[Email protected] sbin]#/usr/local/nginx/sbin/nginx-Hnginx Version:nginx/1.6.2Usage:nginx [-?HVVTQ] [-s signal] [-c filename] [-p prefix] [-g directives] Options:-?,-h:this Help-v:show version and Exit-v:show Version and configure options ThenExit-t:test Configuration and Exit-q:suppress non-error messages during configuration testing-s signal:send signal to a master process:stop, quit, reopen, reload-P prefix:set Prefix path (default:/usr/local/nginx/)  -C Filename:set Configurationfile(default:conf/nginx.conf)-G Directives:set Global directives out of configurationfile[email protected] sbin]#

CentOS Server Build (5)--Install Ngnix

Related Article

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.