Home > Article > Operation and Maintenance > How to install nginx offline on Linux server
nginx-1.20.1.tar.gz (the download link includes gcc, g, pcre, libtool, nginx)
Baidu network disk download:
Link: https://pan.baidu.com/s/1avQD-zGYVcj0ttRtnPNTIA Extraction code: 6yhi
(1)Install gcc
rpm -Uvh *.rpm --nodeps --force
##(2)Install g
rpm -Uvh *.rpm --nodeps --force(3) Verify whether gcc and g are installed successfully, execute the command:
gcc -v
g++ -v(4). To install PCRE, first decompress the pcre, tar -zxvf pcre-8.35.tar.gz. After decompressing it, start the installation
cd pcre-8.35 ./configure make make install(5). To install libtool, first decompress libtool :tar -zxvf libtool-2.4.2.tar.gz, after decompressing it, start the installation
cd libtool-2.4.2 ./configure make make install(6). To install nginx, first decompress nginx tar -zxvf nginx-1.20.1. tar.gz, after decompressing it, you will start the installation
cd nginx-1.20.1 ./configure make make install(7). Start nginx: nginx installation directory address -c nginx configuration file address, the path after installation seems to be changed to /usr/local InsideCommon commandsOperation
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
/usr/local/nginx/sbin/nginx -s stop (quit)
/usr/local/nginx/sbin/nginx -s reload
netstat -tunlp
netstat -tunlp grep
The above is the detailed content of How to install nginx offline on Linux server. For more information, please follow other related articles on the PHP Chinese website!