In ubuntu (linux), how does one install nginx ?, Ubuntung.pdf
I had to install nginx in linux for a long time and finally finished it. Next I will give you a detailed description of the installation process and the installation error solution:
The installation is completed in five steps:
1. go to the src directory (download and storage directory) cd/usr/local/src/2. wget download: http://nginx.org/en/download.html (nginx official website) wget http://nginx.org/download/nginx-1.10.3.tar.gz3.unzip tar zxvf nginx-1.10.3.tar.gz4. enter the cd nginx-1.10.35. set the installation directory (in this case, some errors may be reported, which is also a key step for detecting the problem ). /configure -- prefix =/usr/local/nginx6. Common Errors and solutions for installing make & make install: 1. pcre error means rewrite requires pcre support, and I have not installed pcre, you can add-without-http_rewrite_module parameter shielding rewrite function! Solution: install pcre apt-get install libpcre3 libpcre3-dev 2. zlib library error solution: Install zlib 1. apt-get install ruby 2. apt-get install zlib1g install zlib 3. apt-get install zlib1g-dev install zlib-dev 3. A startup error indicates that port 80 cannot be enabled and port 80 is occupied. Solution: Close the software or service that uses port 80. (You may have installed apache on your own. nginx, etc. It may also be that the system comes with apache and starts) 1. view the port and software netstat-antp 2. kill-9 process no. Or pkill apache2 (httpd)