安装Tengine
发表于:2025-02-05 作者:千家信息网编辑
千家信息网最后更新 2025年02月05日,1.安装VMware2.安装CentOS6.53.配置网络a.修改 /etc/sysconfig/network-scripts/ifcfg-eth0配置文件,添加如下内容 DEVICE=eth
千家信息网最后更新 2025年02月05日安装Tengine
1.安装VMware
2.安装CentOS6.5
3.配置网络
a.修改 /etc/sysconfig/network-scripts/ifcfg-eth0配置文件,添加如下内容 DEVICE=eth0 HWADDR=00:0C:29:96:01:6B TYPE=Ethernet UUID=41cbd943-024b-4341-ac7a-e4d2142b4938 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=xxx.xxx.x.xxx #例如:IPADDR=192.168.2.140 NETMASK=255.255.255.0 GATEWAY=192.168.2.2b.修改/etc/resolv.conf配置文件,添加如下内容 nameserver 192.168.2.2c.service network restartd.ifconfige.ping www.baidu.com 如果能拼通表示可以连接外部网络
4.修改yum源为Aliyun yum源
a.备份原有的源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backupb.下载新的CentOS-Base.repo 到/etc/yum.repos.d/这个目录下 CentOS 5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoc.运行yum makecache命令生成缓存
5.安装编译环境
yum -y install gcc openssl-devel pcre-devel zlib-devel
6.安装Tengine
a.下载或上传tengine-2.1.0.tar.gz到/opt下 ls /opt cd /optb.解压 tar -zxvf tengine-2.1.1.tar.gz ls cd tengine-2.1.0 lsc.检查依赖 ./configure \ --prefix=/opt/sxt/soft/tengine-2.1.0/ \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --with-http_ssl_module \ --with-http_flv_module \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --http-client-body-temp-path=/var/tmp/nginx/client/ \ --http-proxy-temp-path=/var/tmp/nginx/proxy/ \ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \ --http-scgi-temp-path=/var/tmp/nginx/scgi \ --with-pcre d.编译并安装 make && make install
7.安装添加到启动文件
a.在/etc/init.d下面建立nginx文件,内容如下 #!/bin/bash # # chkconfig: - 85 15 # description: nginx is a World Wide Web server. It is used to serve # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ "$NETWORKING" = "no" ] && exit 0 nginx="/usr/tengine-2.1/sbin/nginx" prog=$(basename $nginx) NGINX_CONF_FILE="/usr/tengine-2.1/conf/nginx.conf" #[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx lockfile=/var/lock/subsys/nginx #make_dirs() { # # make required directories # user=`nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*--user=\([^ ]*\).*/\1/g' -` # options=`$nginx -V 2>&1 | grep 'configure arguments:'` # for opt in $options; do # if [ `echo $opt | grep '.*-temp-path'` ]; then # value=`echo $opt | cut -d "=" -f 2` # if [ ! -d "$value" ]; then # # echo "creating" $value # mkdir -p $value && chown -R $user $value # fi # fi # done #} start() { [ -x $nginx ] || exit 5 [ -f $NGINX_CONF_FILE ] || exit 6 # make_dirs echo -n $"Starting $prog: " daemon $nginx -c $NGINX_CONF_FILE retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval } stop() { echo -n $"Stopping $prog: " killproc $prog -QUIT retval=$? echo [ $retval -eq 0 ] && rm -f $lockfile return $retval } restart() { configtest || return $? stop sleep 1 start } reload() { configtest || return $? echo -n $"Reloading $prog: " # -HUP是nginx平滑重启参数 killproc $nginx -HUP RETVAL=$? echo } force_reload() { restart } configtest() { $nginx -t -c $NGINX_CONF_FILE } rh_status() { status $prog } rh_status_q() { rh_status >/dev/null 2>&1 } case "$1" in start) rh_status_q && exit 0 $1 ;; stop) rh_status_q || exit 0 $1 ;; restart|configtest) $1 ;; reload) rh_status_q || exit 7 $1 ;; force-reload) force_reload ;; status) rh_status ;; condrestart|try-restart) rh_status_q || exit 0 ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}" exit 2 esacb.修改nginx配置文件 将nginx="/usr/tengine-2.1/sbin/nginx"修改为nginx="/opt/sxt/soft/tengine-2.1.0/sbin/nginx" 将NGINX_CONF_FILE="/usr/tengine-2.1/conf/nginx.conf"修改为NGINX_CONF_FILE="/opt/sxt/soft/tengine-2.1.0/conf/nginx.conf" 保存退出:wqc.给nginx添加执行权限 chmod 755 nginxd.启动服务 service nginx starte.在d步时会报错,需要手动创建/var/tmp/nginx/client/这个目录 mkdir -p /var/tmp/nginx/client/ service nginx startf.关闭防火墙 service iptables stop
8.在浏览器中访问tengine
http://192.168.2.140/
文件
配置
内容
a.
目录
网络
编译
平滑
参数
命令
备份
手动
权限
浏览器
环境
缓存
防火墙
d.
会报
服务
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
微信无限网络技术有限公司
技术团队软件开发
贵州友拓互联网科技
中国高校网络安全学院
安全的建云服务器租用及托管
底层数据库的默认隔离级别
数据库的三级映射模式
使用u盘安装服务器系统教程
宽城区智能网络技术口碑推荐
cash 数据库
网络安全试卷五答案
网络安全法开始实施是哪一年
无规则服务器
天噜啦服务器出现异常
ftp服务器定时php
软件开发的最佳实践
大数据网络技术安全题库
强调公司网络安全通知
软件开发过程中qa qc
数据库是与
腾讯在哪些国家有服务器
几百条数据怎么建立数据库
云浩软件开发
安卓app数据库用什么好
电脑软件开发怎么收费
六年级关于网络安全的手抄报
软件开发团成员英文
社交电商软件开发费用
网络安全与保密有关系吗
c 数据库操作详