Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deploy nginx under centos7.2

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

# nginx is a powerful, open source software

1. System version and kernel version

[root@node06 ~] # uname-r

3.10.0-327.el7.x86_64

[root@node06 ~] # cat / etc/redhat-release

CentOS Linux release 7.2.1511 (Core)

[root@node06 ~] #

2. Software package version nginx-1.11.10.tar.gz (the address of the package is in the introduction)

3. Installation dependency

[root@nginx ~] # yum install-y gcc pcre-devel openssl-devel

4. Create the nginx startup user, the required directory, and extract the installation package.

[root@nginx ~] # useradd nginx

[root@nginx] # mkdir-p / usr, local/nginx/ {client,proxy,fastcgi,uwsgi,scgi}

[root@nginx ~] # tar zxf nginx-1.11.10.tar.gz

[root@nginx ~] # cd nginx-1.11.10/

5. Configure the installation parameters and compilation of nginx

[root@nginx nginx-1.11.4] #. / configure\

-- prefix=/usr/local/nginx\

-- user=nginx\

-- group=nginx\

-- with-http_ssl_module\

-- with-http_flv_module\

-- with-http_stub_status_module\

-- with-http_gzip_static_module\

-- http-client-body-temp-path=/usr/local/nginx/client\

-- http-proxy-temp-path=/usr/local/nginx/proxy\

-- http-fastcgi-temp-path=/usr/local/nginx/fastcgi\

-- http-uwsgi-temp-path=/usr/local/nginx/uwsgi\

-- http-scgi-temp-path=/usr/local/nginx/scgi\

-- with-pcre\

-- with-file-aio\

-- with-http_secure_link_module

[root@nginx nginx-1.11.10] # make & & make install

6. Verify that the installation is successful

[root@nginx ~] # cd / usr/local/nginx/

[root@nginx ~] # ls sbin/

Nginx certifies that the installation is successful

7. Start nginx and set self-boot.

[root@nginx ~] # / usr/local/nginx/sbin/nginx

[root@nginx ~] # vim / etc/rc.d/rc.local

/ usr/local/nginx/sbin/nginx

[root@nginx ~] # chmod adepx / etc/rc.d/rc.local-> centos7.2 requires this step

8. Verify that nginx starts normally

Open a web page and enter http://

You can see the page provided by nginx indicating that the installation was successful.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report