Download Compile and install is very simple, several common dependencies must be installed first, so in order not to repeatedly look at the results of configure and then install the missing dependencies, directly This script can be installed. Save this script to any text format, sh can successfully install Nginx on Amazon's cloud host
#!bin/bashsudo yum install updatesudo yum install gcc pcre pcre-devel zlib-devel zlib openssl -ywget http: //nginx.org/download/nginx-1.2.8.tar.gztar -xzvf nginx-1.2.8.tar.gzcd nginx-1.2.8sudo ./configuresudo make &make install
NginxStart
sudo /usr/local/nginx/sbin/nginx
NginxControl
sudo /usr/local/nginx/sbin/nginx -s stop Stop the daemon immediately (with TEAM signal) sudo /usr/local/nginx/sbin /nginx -s quit Moderate stop daemon (with QUIT signal) sudo /usr/local/nginx/sbin/nginx -s reopen reopen log file sudo /usr/local/nginx/sbin/nginx -s reload reload Configuration file
If the configuration file is changed and the configuration file is invalid, you may not be able to terminate the Nginx daemon. At this time, you can use this method to terminate
sudo killall nginx to terminate the process. In an emergency, use
to test the configuration file. Br>sudo /usr/local/nginx/sbin/nginx -t [-c configuration file path]
Why do you want to test the configuration file? Because of a configuration error, it is likely to lose control of Nginx. As mentioned above, even if you can't stop the running service, you can only end the process in a mandatory way. This is not good, so you can First use this command to test whether the configuration file is correct, and then decide whether to use the configuration file.
After setting up the configuration file, you don't have to restart Nginx, just reload (see the reload command above), this is the same as Apache (many people say that changing the configuration file to restart Apache, in fact, no need, Just reload the configuration file to take effect, very quickly, and will not cause service interruption).
One of the benefits of learning Linux is that you can understand how the hardware works and the pri
For ease of use, we will save the Xshell session. How to transfer the session information saved on
The network is often dropped. Many technicians think that the router is unstable. The ac
Record your favorite Linux system commands for easy reference later, and find that memory is getting
Linux system management and maintenance - scp command
Linux loses Grub.conf file to start server
How to use the SOFTETHER server under the Linux operating system
Log all IP user operation logs by login IP
Sed mode space and reserved space
Two common startup failure resolution methods for Linux operation
Linux disk space occupation view
How Linux uses commands to generate bounce SHELL
Java in Chinese linux system folder appears Chinese garbled problem
How to use the gamepad in the win7 system
Idle the mobile disk Experience Windows 10
How to solve the exclamation mark on the Win7 system network connection?
Windows 10 set the network location method
The language bar of the XP system is solved for no reason missing
Windows 7 operating system how to format C drive
How does the Win10 system retrieve lost personalization settings?
Win 2003 distribution function to reduce the network management