- 编译安装
- rpm安装:包
- yum安装:仓库
编译安装
tengine:nginx淘宝的开源版
1、上传
2、解压:
tar xf tengine-2.1.0.tar.gz
3、源码编译
make命令使用的前置文件:makefile
查看readme文件:Installation
4、安装步骤
step1:
查看参数说明
./configure --help | more
安装目录(usr:安装程序目录 opt:第三方软件安装目录)
./configure --prefix=/opt/darren/nginx
报错:
C compiler cc is not found:C编译器未找到
安装C编译环境
yum install gcc
报错:the http rewrite module requires the pcre library.
yum search pcre:查看是否有pcre这个库
yum install pcre-devel:安装pcre这个库
报错:ssl modules require the openssl library.
yum install openssl-devel
step2:
make:默认是build
step3:
make install
查看objs/Makefile文件:判断是否有darren/nginx这个目录,没有则创建
step4:
启动
cd /opt/darren/nginx/sbin
./nginx
step5:
访问:192.168.217.11:80