您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

ubuntu12.1下安装nginx

2025/12/25 12:18:26发布28次查看
1、安装前准备
1)gcc编译器
执行以下命令:
sudo apt-get update sudo apt-get install gcc-4.8 sudo apt-get install g++-4.8sudo apt-get install gcc-4.8-multilib sudo apt-get install g++-4.8-multilib sudo apt-get install gcc-4.8-doc sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20 sudo update-alternatives --config gcc sudo update-alternatives --config g++
此期间如出现缺少依赖库,则使用sudo apt-get install 安装。然后使用gcc -v 查看是否安装成功。2)pcre库
在线安装时失败,然后使用了离线安装。如下:
sudo wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz sudo tar -xzvf pcre-8.36.tar.gz cd /usr/local/src/pcre-8.36 (解压目录)sudo ./configure sudo make sudo make install
3)zlib库在线安装如下:
sudo apt-get install zlib1g-dev
离线安装如下:下载地址:http://zlib.net
cd /usr/local/src tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8 sudo ./configure sudo make sudo make install
4)openssl(在线安装可用)在线安装如下:
sudo apt-get install openssl sudo apt-get install libssl-dev
离线安装如下:下载地址:http://www.openssl.org/source
cd /usr/local/src tar -zxvf openssl-1.0.1e.tar.gz
2、nginx安装
离线安装:
sudo wget http://nginx.org/download/nginx-1.7.10.tar.gz sudo tar -xzvf nginx-1.7.10.tar.gzcd nginx-1.7.10/sudo ./configuresudo makesudo make install
以上就介绍了ubuntu12.1下安装nginx,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product