Home > Article > Operation and Maintenance > How to install nginx offline on Linux
yum install -y gcc-c++``yum install -y pcre pcre-devel``yum install -y zlib zlib-devel``yum install -y openssl openssl-devel
http://nginx.org/download/
cd nginx-1.9.9 ./configure --prefix=/usr/local/nginx
After configure is completed, there will be the following information, such as log files, configuration files, etc.
make && make install
First check whether the nginx configuration is correct
./nginx/sbin/nginx -t
If the above two sentences appear, it means that the nginx configuration is ok and can be started.
cd nginx/sbin ./nginx
There is no log output, indicating that the startup is normal. If an exception occurs, please refer to the error log path prompted during configuration to view the error message
You can view the nginx process
ps -ef | grep nginx
The default port is 80, so you can directly enter the ip to access
The above is the detailed content of How to install nginx offline on Linux. For more information, please follow other related articles on the PHP Chinese website!