码迷,mamicode.com
首页 > Web开发 > 详细

nginx和apache安装

时间:2015-08-28 16:58:30      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:

 

#tar xf tengine-1.4.2.tar.gz
#cd tengine-1.4.2
#./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf
#make
#make install
#/usr/local/tengine/sbin/nginx 或者声明到/etc/profile 中

 

apache同理

 

注:安装的时候报错:直接去掉http重写功能模块就可以了 湖综合装一下pcre--devel

技术分享

重新执行

#./configure --prefix=/usr/local/tengine --conf-path=/etc/tengine/tengine.conf  --without-http_rewrite_module

 

将nginx的执行路径声明到全局变量里面来

vim /etc/profile  在export上面增加这一句

技术分享

重读一下配置文件或者新开一个shell就可以看到

技术分享

 然后nginx就可以直接执行nginx程序了 

netstat -tnlp查看nginx端口

技术分享

 

表示已经启动成功  在浏览器输入本机IP即可访问nginxweb页面

index页面默认存放于cd /usr/local/tengine/html 里面的index.html

 

技术分享

 

以上所有配置apache同理

 

nginx和apache安装

标签:

原文地址:http://www.cnblogs.com/sysk/p/4766692.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!