Install Nginx in the Linux tar package
Install Nginx in the Linux tar package
1. First install the dependency package (there are a lot of dependency packages. We use yum to install them)
Yum-y install zlib-devel openssl-devel pcre-devel
2.upload nginx-1.7.6.tar.gz to/usr/local/
Tar-zxvf nginx-1.7.6.tar.gz
3. Rename the package name and change the nginx-1.7.6 to nginx
Music nginx-1.7.6 nginx
3. Compile
Cd nginx
./Configure
Make
Make install
4. Test
/Usr/local/nginx-t
5. Problem:
Nginx: [alert] cocould not open error log file: open () "/usr/local/nginx/logs/error. log" failed (2: No such file or directory)
15:16:28 [emerg] 13663 #0: open () "/usr/local/nginx/logs/access. log" failed (2: No such file or directory)
6. Solution
6.1 create a logs folder
Mkdir logs
6.2 create a file
Cd logs/
Touch error. log
Touch nginx. pid
7. Start
/Usr/local/nginx
See
Welcome to nginx!
It indicates that the nginx initial STARTUP configuration is successful!
Deployment of Nginx + MySQL + PHP in CentOS 6.2
Build a WEB server using Nginx
Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5
Performance Tuning for Nginx in CentOS 6.3
Configure Nginx to load the ngx_pagespeed module in CentOS 6.3
Install and configure Nginx + Pcre + php-fpm in CentOS 6.4
Nginx installation and configuration instructions
Nginx log filtering using ngx_log_if does not record specific logs
Nginx details: click here
Nginx: click here
This article permanently updates the link address: