环境
虚拟机:VMware 10
Linux版本:CentOS-6.5-x86_64
客户端:Xshell4
FTP:Xftp4
一、编译安装
1.解压 源码文件是压缩包 要先解压
tar -zxvf tengine-2.1.0.tar.gz
2.进入解压包 查看README文件 里面有对软件的介绍和安装指导
3.查看./configure --help 看一下有哪些安装参数,设定参数来安装
4.安装装编译器 检查依赖:是否有对应的编译器
[[email protected] tengine-2.1.0]# ./configure checking for OS + Linux 2.6.32-431.el6.x86_64 x86_64 checking for C compiler ... not found ./configure: error: C compiler cc is not found
报错:提示没有cc编译器
解决方案:yum install -y gcc 安装gcc编译器(GNU cc)
5.安装依赖库PCRE、OpenSSL
再次执行./configure,会提示缺少依赖库
可以通过yum serch PCRE来查询这个库,
然后安装yum install -y pcre-devel
./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=<path> option. ./configure: error: SSL modules require the OpenSSL library. You can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using --with-openssl=<path> option. [[email protected] tengine-2.1.0]# yum search PCRE Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.njupt.edu.cn * extras: mirrors.njupt.edu.cn * updates: mirrors.cqu.edu.cn =================================================== N/S Matched: PCRE =================================================== pcre-devel.i686 : Development files for pcre pcre-devel.x86_64 : Development files for pcre pcre-static.x86_64 : Static library for pcre pcre.x86_64 : Perl-compatible regular expression library pcre.i686 : Perl-compatible regular expression library Name and summary matches only, use "search all" for everything.
6.最后configure配置执行成功
首先做检查依赖,最后生成MakeFile编译文件
7.编译:make
8.安装:make install
9.访问验证
注意关闭防火墙:service iptables stop
二、rpm安装:包
三、yum安装:仓库
原文地址:https://www.cnblogs.com/cac2020/p/10165060.html
时间: 2024-10-08 17:52:28