Nginx is an http and reverse proxy server. in high-concurrency environments, the performance is better than apache, so we also install nginx in ubuntu. Download nginx-0.8.54.tar.gz, decompress and compile the installation command instructions: tar (z-use gzip to compress or decompress the archive; x-expand the file from the archive; v-detailed display...
Nginx is an http and reverse proxy server. in high-concurrency environments, the performance is better than apache, so we also install nginx in ubuntu. Download nginx-0.8.54.tar.gz, decompress and compile the installation command instructions: tar (z-use gzip to compress or decompress the archive; x-expand the archive; v-display the processed files in detail; f-specifies the archive or device) Java code tar-zxvf nginx-0.8.54.tar.gz to enter the relevant directory Java code. /configure make sudo make install if you are lucky, everything is OK, but I believe no one is lucky, haha. Ubuntu does not install any libraries by default. all dependent libraries must be manually installed. It is estimated that CentOS and other linux will be better. Generally, errors occur. let's take a look at the possible problems. The pcre library is missing. /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. solution: Download and install the pcre-8.12 to solve the problem, decompress the package and perform the following operations on the pcre Java code. /configure make sudo make install: If you are lucky, make pcre will encounter errors and the gcc-c ++ and libtool are missing, that is, the c ++ compiling package libtool: compile: unrecognized option '-DHAVE_CONFIG_H 'libtool: compile: Try 'libtool -- help' for more information. make [1]: *** [pcrecpp. lo] Error 1 www.2cto.com make [1]: Leaving directory '/home/guangbo/work/pcre-8.12' make: *** [all] Error 2 guangbo @ guan Gbo-laptop :~ /Work/pcre-8.12 $ libtool-help-DHAVE_CONFIG_H The program 'libtool' is currently not installed. You can install it by typing: sudo apt-get install libtool guangbo @ guangbo-laptop :~ /Work/pcre-8.12 $ solution: install libtool and gcc-c ++ Java code sudo apt-get install libtool sudo apt-get install gcc-c ++ error guangbo @ guangbo-laptop: ~ /Soft/pcre-8.12 $ sudo apt-get install gcc-c ++ Reading package lists... done Building dependency tree Reading state information... done E: Couldn't find package gcc-c solution: update the source and reinstall gcc-c ++. Java code sudo apt-get install build-essential sudo apt-get update # it takes a long time to update the source sudo apt-get install gcc-c ++ www.2cto.com upgrade, if no error is reported, skip this step. Sudo apt-get upgrade # Update installed packages. the openssl library is missing for a long time. /configure: error: the HTTP cache module requires md5 functions from OpenSSL library. you can either disable the module by using -- without-http-cache option, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using -- with-http_ssl_module -- with-openssl = Options. solution: Java code sudo apt-get install openssl lacks the zlib library. /configure: error: the HTTP gzip module requires the zlib library. you can either disable the module by using -- without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using -- with-zlib = Option. solution: Download a libssl-dev package to install openssl. java code sudo apt-get install libssl-dev does not have nginx, and the logs Directory has access permission [alert]: cocould not open error log file: open () "/usr/local/nginx/logs/error. log "failed (13: Permission denied) 06:09:33 [emerg] 24855 #0: mkdir ()"/usr/local/nginx/client_body_temp "failed (13: Permission denied) www.2cto.com solution: Java code sudo chmod a + rwx-R logs sudo chmod a + rwx-R/usr/local/nginx to test whether nginx is successfully installed, install and run the Java code sudo apt-get install nginx/usr/local/nginx/sbin/nginx http://localhost . The welcome page is displayed. Disable nginx Java code. /sbin/nginx-s stop Ubuntu Linux Utility command tar (z-use gzip to compress or decompress the archive; x-expand the file from the archive; v-display the processed file in detail; f-specify the archive or device) tar-zxvf nginx-0.8.54.tar.gz ip view ifconfig compile make install compiled source package make install edit File sudo gedit/etc/profile modify root limit: chmod description (u: the same permissions as the file owner [a: Everyone]; +: added permissions; rwx: readable, writable, and executable)-R: recursive all directories and files sudo chmod a + rwx-R logs check whether the library is successfully installed dpkg -- list | grep openssl download and installation Library sudo apt-get install libtool check whether the service is started properly ps -ef | grep: openssl installation path whereis openssl update source sudo apt-get update installed package sudo apt-get upgrade author peterwei
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.