First, to account for an environmental problem, compile installation pcre often because did not install GCC and reported C compiler cc is not found
Build yum source, yum Install-y gcc*
It is recommended that the environment of the LNMP architecture be built together to prevent errors during compilation and then pack all kinds of packages
Therefore, we directly adopt Yum installation. Configure the environment required for compilation
Yum-y Install autoconf bzip2 bzip2-devel Curl curl-devel e2fsprogs e2fsprogs-devel freetype freetype-devel GCC gcc-c++ GC C-g77 gd gd-devel glib2 glib2-devel glibc glibc-devel krb5 krb5-devel libevent libevent-devel libidn libidn-devel libjpeg Libjpeg-devel libpng libpng10 libpng10-devel libpng-devel libtool libtool-libs libxml2 libxml2-devel make ncurses ncurses -devel nss_ldap openldap openldap-clients openldap-devel openldap-servers OpenSSL openssl-devel patch pspell-devel zlib z Lib-devel 2
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$$$$$$$$$$$$$$$$$
Second, the compilation of NIGNX installation
In order to prevent errors before installing Nginx, it is recommended
Yum-y groupinstall "Development Tools" "Development Libraries"
[Root@kissing nginx-1.0.13]#./configure--prefix=/usr/local/nginx--sbin-path=/usr/sbin/nginx--conf-path=/usr
/local/nginx/etc/nginx.conf--error-log-path=/var/log/nginx/error.log--pid-path=/var/run/nignx/nginx.pid-- Lock-path=/var/lock/nginx.lock--user=nginx--group=nginx--with-http_ssl_module--with-http_flv_module--with-http _gzip_static_module--with-http_stub_status_module--http-log-path=/var/log/nginx/access.log-- Http-client-body-temp-path=/var/tmp/nginx/client--http-proxy-temp-path=/tmp/nginx/proxy-- http-fastcgi-temp-path=/var/tmp/nginx/fcgi--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi--http-scgi-temp-path=/ var/tmp/nginx/scgi--with-pcre
Make && make install
[Root@kissing nginx]# MV nginx/etc/init.d/
[Root@kissing nginx]# chmod +x/etc/init.d/nginx
[Root@kissing nginx]#/etc/init.d/nginx start
Sed:-E expression #1, char 14:unterminated ' s ' command
Starting Nginx:/usr/sbin/nginx:error while loading shared libraries:libpcre.so.1:cannot open shared object File:no su ch file or directory [FAILED]
[Root@kissing nginx]# UpdateDB
[Root@kissing nginx]# Locate Libpcre.so.1
/usr/local/lib/libpcre.so.1
/usr/local/lib/libpcre.so.1.2.0
[Root@kissing nginx]# ln-s/usr/local/lib/libpcre.so.1/lib
[Root@kissing nginx]# ln-s/usr/local/lib/libpcre.so.1/lib64
[Root@kissing nginx]#/etc/init.d/nginx start
Sed:-E expression #1, char 14:unterminated ' s ' command
chown:missing operand after '/var/tmp/nginx/fcgi '
Try ' Chown--help ' for the more information.
chown:missing operand after '/var/tmp/nginx/uwsgi '
Try ' Chown--help ' for the more information.
chown:missing operand after '/var/tmp/nginx/scgi '
Try ' Chown--help ' for the more information.
Starting nginx: [OK]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@