nginx test report

Nginx test report

Nginx Easy Installation Process Analysis

Experimental preparation : a computer with Linux system computer virtual machines

And this has set up a local yum source

 

Experimental Procedure:

systemctl stop firewalld  

(Temporarily turn off the firewall)

systemctl disable firewalld

(Permanently turn off the firewall)

sed -i 's/enforcing/disabled/' /etc/selinux/config  

(Permanently closed security mechanisms)

setenforce 0  

(Temporarily turn off security mechanisms)

 

 

 

If not turn off the firewall, 80 request port will be rejected, hindered three-way handshake, affecting the connection.

Do not turn off security will affect the installation.

Whether it is shut off or firewall security mechanisms, need to be temporarily shut down permanently closed at the same time, because the permanent closure of the command needs to take effect the next restart, the current state is still not closed. 

df -hT

View mounted state , Ruoyi mount proceed, without the mount. Then to mount mount / dev / sr0 / media /

 

 

 

yum -y install pcre-devel zlib-devel gcc gcc-c++ make

(Free interactive installation PCRE-devel, , zlib-devel C language, C ++ programming language, and make the compiler installation tool)

 

 

 

The installation is successful, then add users

useradd -M -s /sbin/nologin nginx

(Add nginx for the users of the system, but will not identify the host directory, while not allowing login)

 

 

 

The nginx-1.12.2.tar.gz packages directly drag xshell lower, thereby directly obtaining the package.

 

 

 

XF-1.12.2.tar.gz -C Nginx the tar / usr / the src / (directed released into the decompression application program source)

 

 

 

/usr/src/nginx-1.12.2/ CD   (switching paths to the application source Nginx-1.12.2 , direct execution configure preparation)

  

Started preconfigured

./configure --prefix=/usr/local/nginx --user=nginx --group=nginx

( By configuring configure doing preconfigured documents, custom installation path / usr / local / Nginx , user name and user group definitions)

 

 

 

Configuration is complete, begin to compile and install

make -j 2 && make install

( Call two units running compiler and compiler installation, && with the operation, it said that only make successful execution can execute make install)

 

 

ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/

 ( Create a soft link, LN -s means creating a soft link. Create a soft link can be nginx command in the environment variable can be called directly, easy start)

Nginx

Start nginx

 

 

 

 

Verify that the installation was successful

Open the Web page, search ip , view the installation was successful.

 

 

Guess you like

Origin www.cnblogs.com/a1972/p/11576289.html