linux就该这么学pdf免费下载
-
1、解压安装包 nginx-1.2.7.tar.gz
gzip -d nginx-1.2.7.tar.gz
tar -xvf nginx-1.2.7.tar
或者执行
tar -zxvf nginx-1.2.7.tar.gz
2、检查安装环境
cd nginx-1.2.7
./configure
若报错,说明系统未安装PCRE未安装pcre包
解决方案:
1)、在ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/获取 pcre-8.21.tar.gz
2)、解压pcre-8.21.tar.gz
gzip -d pcre-8.21.tar.gz
tar -xvf pcre-8.21.tar
cd pcre-8.21
3)、切换到root用户
./configure --检查安装环境
make
make install
有可能缺少libtool和gcc-c++、openssl
sudo apt-get install libtool
sudo apt-get install build-essential
sudo apt-get install openssl libssl-devlibperl-dev
3、继续检查安装环境
cd nginx-1.2.7
./configure
若报错,说明系统未安装zlib包
解决方案:
1)、在http://zlib.net/获取zlib-1.2.7.tar.gz
2)、解压zlib-1.2.7.tar.gz
gzip -d zlib-1.2.7.tar.gz
tar -xvf zlib-1.2.7.tar
cd zlib-1.2.7
3)、切换到root用户
./configure --检查安装环境
make
make install
4、继续检查安装环境
cd nginx-1.2.7
./configure
说明系统已经具备安装nginx的环境
切换到root账号进行安装
make
make install
这样
Configuration summary
+ using system PCRE library
+ OpenSSL library is not used
+ using builtin md5 code
+ sha1 library is not found
+ using system zlib library
nginx path prefix: "/home/stanelylu/tools/nginx3331"
nginx binary file: "/home/stanelylu/tools/nginx3331/sbin/nginx"
nginx configuration prefix: "/home/stanelylu/tools/nginx3331/conf"
nginx configuration file: "/home/stanelylu/tools/nginx3331/conf/nginx.conf"
nginx pid file: "/home/stanelylu/tools/nginx3331/logs/nginx.pid"
nginx error log file: "/home/stanelylu/tools/nginx3331/logs/error.log"
nginx http access log file: "/home/stanelylu/tools/nginx3331/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"安装完成。
转载请注明:谷谷点程序 » 2014 ubuntu安装nginx