• 安装依赖包
yum install pcre pcre-devel openssl openssl-devel gcc make zlib-devel wget -y
  • 下载和创建用户
mkdir /tools
cd /tools/
wget http://tengine.taobao.org/download/tengine-1.5.1.tar.gz
useradd nginx -s /sbin/nologin
  • 编译安装
tar xf tengine-1.5.1.tar.gz
cd tengine-1.5.1
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx1.5.1 --with-http_stub_status_module --with-http_ssl_module --with-http_upstream_check_module --with-http_gzip_static_module
make && make install
  • 创建软链接和环境变量
ln -sv /usr/local/nginx1.5.1/ /usr/local/nginx
echo "export PATH=/usr/local/nginx/sbin:$PATH" >>/etc/profile
source /etc/profile
  • 开机启动
nginx
cd /usr/local/nginx/conf
egrep -v "#|^$" nginx.conf.default >nginx.conf
  • 命令整理
yum install pcre pcre-devel openssl openssl-devel gcc make zlib-devel -y
mkdir /tools
cd /tools/
wget http://tengine.taobao.org/download/tengine-1.5.1.tar.gz
useradd nginx -s /sbin/nologin
tar xf tengine-1.5.1.tar.gz
cd tengine-1.5.1
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx1.5.1 --with-http_stub_status_module --with-http_ssl_module --with-http_upstream_check_module --with-http_gzip_static_module
make && make install
ln -sv /usr/local/nginx1.5.1/ /usr/local/nginx
echo "export PATH=/usr/local/nginx/sbin:$PATH" >>/etc/profile
source /etc/profile
echo "/usr/local/nginx/sbin/nginx" >>/etc/rc.local
nginx
cd /usr/local/nginx/conf
egrep -v "#|^$" nginx.conf.default >nginx.conf

最新文章

  1. CSS3自适配手机屏幕
  2. 智能指针(一):STL auto_ptr实现原理
  3. 基础组件_Window(窗口)
  4. could not read data from '/Users/xxxx/myapp-Info.plist'
  5. Git CMD - config: Get and set repository or global options
  6. WPF动画之线性插值动画(1)
  7. java中获得IP地址
  8. 使用linux操作系统的公司服务器有哪些品牌
  9. Eight
  10. springmvc中@PathVariable传Double精度丢失
  11. xtrabackup备份mysql数据库方法
  12. 剑指Offer_编程题_8
  13. SQL Server 触发器demo
  14. Linux QtCreator 编译报错:No rule to make target '.../***' needed by '***.o'.stop
  15. oracle完全恢复数据库
  16. JavaScript中如何将html字符串转化为Jquery对象或者Dom对象
  17. 基于Promise规范的fetch API的使用
  18. MySQL 如何更新某个字段的值为原来的值加1
  19. .Net内存溢出 System.OutOfMemoryException
  20. SchuledExecutorService 使用controller控制线程关闭

热门文章

  1. 子组件通过$emit触发父组件的事件时,参数的传递
  2. delphi保存文件的命名规则
  3. 使用 Redis的SETNX命令实现分布式锁
  4. Android中有哪些好的开发框架?
  5. 高中信息技术《算法与程序设计VB(选修)》知识要点
  6. AGC018D Tree and Hamilton Path(树+树的重心)
  7. AGC016B Colorful Hats(构造)
  8. [bzoj2893] 集合计数
  9. BZOJ1407 [Noi2002]Savage 【扩展欧几里得】
  10. 深入探讨Android异步精髓Handler