tengine mysql_tengine全自动安装
tengine官方: http://tengine.taobao.org/ #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin #QQ:917611 export PATH if [ $(id -u) != "0" ]; then echo "Error: You must be root to run this script, please use r
tengine官方: http://tengine.taobao.org/
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
#QQ:917611
export PATH
if [ $(id -u) != "0" ]; then
echo "Error: You must be root to run this script, please use root to
install lnmp"
exit 1
else
printf "............................................\n"
printf "............................................\n"
printf "................welcome to tengine...........\n"
printf "............................................\n"
printf "............................................\n"
fi
sleep 3
if [ -s /etc/selinux/config ]; then
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
fi
/etc/init.d/iptables save
iptables -F;iptables -X;iptables -Z;iptables -t nat -F;iptables -t nat
-X;iptables -t nat -Z;
cat >>/etc/security/limits.conf
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
eof
cat >>/etc/sysctl.conf
eof
yum install gcc gcc-c++ autoconf automake make wget openssl openssl-devel
zlib vim zlib-devel -y
tengine="tengine-1.4.2.tar.gz"
PCRE="pcre-8.31.tar.gz"
NGINX="/usr/local/nginx"
NGINX_CONFIG="/usr/local/nginx/conf/nginx.conf"
USER="www"
GROUP="www"
DATE=$(date +%Y%m%d)
VHOST="/usr/local/nginx/conf/vhost"
if [ -d /usr/local/nginx ];then
echo "Nginx already exists:/usr/local/nginx"
exit 0
fi
if [ ! -f ${tengine} ];then
wget http://tengine.taobao.org/download/${tengine}
fi
if [ ! -f ${PCRE} ];then
wget http://sourceforge.net/projects/pcre/files/pcre/8.31/${PCRE}
fi
tar xvf ${tengine};tar xvf ${PCRE} -C /usr/local
cd `echo ${tengine}|sed 's/.tar.gz//g'`
useradd -M -s /sbin/nologin ${USER}
./configure --user=${USER} --group=${GROUP} --prefix=/usr/local/nginx
--with-http_concat_module --with-pcre=/usr/local/pcre-8.31/
--with-http_gzip_static_module --with-http_stub_status_module
make;make install
cat > ${NGINX_CONFIG}
worker_processes 2;
pid logs/nginx.pid;
events {
worker_connections 51200;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_buffers 4 8k;
gzip_http_version 1.0;
gzip_types text/plain application/x-javascript text/javascript
text/css;
include vhost/*.conf;
}
eof
read -p "please input domain :" domain
read -p "please input webdir :" webdir
if [ ! -d ${VHOST} ];then
mkdir ${VHOST} -p
fi
cat > ${VHOST}/${domain}.conf << eof
log_format ${domain} '$remote_addr - $remote_user [$time_local]
"$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /usr/local/nginx/logs/access.log ${domain};
server {
charset utf-8;
listen 80;
server_name ${domain};
location / {
root ${webdir};
concat on;
index index.html index.htm;
}
}
eof
/usr/local/nginx/sbin/nginx
netstat -lnpt |grep nginx
运维随笔” 博客,谢绝转载!
本文原创发布php中文网,转载请注明出处,感谢您的尊重!
tengine mysql_tengine全自动安装相关推荐
- RHEL6 PXE+KickStart全自动安装配置指南
笔者之前也配置过RHEL5.4的PXE+KickStart自动安装,这次在RHEL6上面测试了下PXE+KickStart配置,发现6和5版本对比存在一些细微的差别,因而记录操作步骤如下,在开始操作之 ...
- linux usb全自动安装,制作liveusb实现centos6.2全自动无人职守安装
这几天一直在研究u盘全自动安装centos,把具体过程分享一下供参考,同时也做为我个人的一个备忘 主要准备以下4样东西 1.8G以上u盘一只 2.CentOS镜像CentOS-6.2-x86_64-b ...
- Cobbler全自动安装CentOS(整理)
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://koumm.blog.51cto.com/703525/1340852 环境: ...
- Tengine怎么去安装第三方模块、以及安装源码中的模块
Tengine怎么去安装第三方模块 检查配置文件nginx.conf的内容编辑后是否有错误 nginx -t 有以下错误,需要下载第三方模块 nginx: [emerg] unknown direct ...
- linux全自动安装光盘,CentOS7全自动安装光盘制做详解
CentOS7全自动安装光盘制做详解node 1 复制光盘文件linux 1)挂载iso镜像ios 建立目录用于挂载光盘:redis mkdir /root/centos7 挂载iso镜像vim mo ...
- 全自动安装 linux光盘,CentOS 7.1全自动安装光盘制作详解
安装系统的话,常用方式就是通过U盘,光盘,kickstart网络自动化安装,网络自动化安装固然好,但是有时候在现场做项目的话根本就没有kickstart环境,甚至连基本的网络建设都没有弄好,此时该如何 ...
- 在Nginx/Tengine服务器上安装SSL证书
在Nginx/Tengine服务器上安装SSL证书 阿里云SSL证书服务支持下载证书安装到Nginx/Tengine服务器上,本文介绍了证书安装的具体操作. 背景信息 本文档以CentOS 7.Ngi ...
- python自动安装pip教程_谈谈全自动安装常使用的pip install的原理及作用!!!
正如第一句所说: pip is the package installer for Python. You can use pip to install packages from the Pytho ...
- 如何自动安装linux系统,Linux全自动安装操作实例
手动安装Linux系统费时费力,需要操作的步骤非常多,使用kickstart等工具就能实现Linux系统的全自动安装,下面小编就给大家介绍下Linux全自动安装操作实例,一起来学习下吧. 原理: 使用 ...
最新文章
- ios学习记录 UITextField输入return键监听
- 【C++】源自指针的报错
- m3u8文件在手机上用什么软件看_新技能Get!教你制作m3u8文件 创建属于自己的直播视频列表...
- 深入浅出之虚函数原理篇(笔记三)
- 数组——两个有序数组的合并
- 【译】使用Jwt身份认证保护 Asp.Net Core Web Api
- H5新增的标签和属性
- mysql c api example_The MySQL C API 编程实例
- ssh协议是osi_计算机网络协议分析
- Android笔记 codeUI与html UI
- 创建Session时会把含有Session ID 的Cookie对象加到响应对象上
- 移动电话用户突破6亿大关
- 基于仿真软件multisim14的多路抢答器电路设计
- python房屋租赁管理系统设计与实现报告_房屋租赁管理系统设计毕业论文
- ffmpeg 多个音频合并 截取 拆分
- 教你如何使用关键词获取淘宝和天猫的商品信息
- coco数据集大小分类_COCO数据集使用
- 对青浦区专利工作试点和示范企业给予20万元和30万元资助
- APP2SD图文储存卡分区教程
- 手机邮箱登录腾讯企业邮箱