nginx source code installation notes

nginx has also been installed and updated several times, so I would like to say a few words here. First of all, I am not a linux guru, because I think, for example, the graphical interface of ubuntu is very good. I never type the keyboard where I can use the mouse. . Now it seems that this is obviously an excuse for myself because my level is too low. As soon as I log in to the remote server, the efficiency immediately drops due to unfamiliar commands.

1. Plan to install 1.6 from source code. It is configured directly without first checking which libraries have been installed on the server.
./configure must report an error, see what error is reported, it is said that the pcre library is missing.

The error is as
follows./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.
In fact, you don’t need to install it after reading carefully, --with-pcre= option, this option can be changed to the address of the source code


2. There was an error during make, saying that there was a lack of c++ support, so I ran the command sudo apt-get install build-essential (now I don’t know if this place is inappropriate)


3. 这下问题大了,一make就出下面错误,
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/user/Downloads/pcre-8.36/missing aclocal-1.14 -I m4
/home/user/Downloads/pcre-8.36/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make: *** [aclocal.m4] Error 127


4. I struggled for a long time, and asked the great god leo for help, so I cut a channel and changed the installation method, or apt-get is more reliable. But considering that you want to install a new version, update the source first.
add-apt-repository ppa:nginx/stable

apt-get update

5. It is recommended to install aptitude instead of apt-get, and you can also check the version with aptitude show nginx before installing

Guess you like

Origin blog.csdn.net/cscj2010/article/details/40976767