LAMP+Tomcat+Discuz+WordPress【Apache的安装】

Apache安装

Apache版本:

Server version: Apache/2.2.19 (Unix)
安装包名称:httpd-2.2.19.tar.gz


[root@localhostLAMP]#tar -zxvf  httpd-2.2.19.tar.gz

[root@localhost LAMP]#cd httpd-2.2.19

[root@localhostLAMP]#./configure   --prefix=/usr/local/apache  --enable-shared=max   --enable-module=rewrite   --enable-module=so

[root@localhost LAMP]#make

[root@localhost LAMP]#make install

 

修改配置文件

[root@localhost LAMP]#vim /usr/local/apache/conf/httpd.conf

ServerName127.0.0.1:80

<IfModuledir_module>

DirectoryIndexindex.html index.html.var index.htm index.php

</IfModule>

# If the AddEncodingdirectives above are commented-out, then you

# probably shoulddefine those extensions to indicate media types:

AddTypeapplication/x-compress .Z

AddType application/x-gzip.gz .tgz

AddTypeapplication/x-httpd-php .php

AddTypeapplication/x-httpd-php-source .phps

 

到此结束,启动参数

/usr/local/apache/bin/apachectl   start

/usr/local/apache/bin/apachectl  stop

/usr/local/apache/bin/apachectl  restart

 

后面参考【可能有错误】:

[root@localhost LAMP]# cp /usr/local/apache/bin/apachectl /etc/init.d/apachectl

[root@localhost LAMP]# ln -s /usr/local/apache/bin/apachectl /usr/bin/apachectl

 

进入/etc目录下的rc2.d rc3.d rc4.d rc5.d 目录建立开机自启动服务的软链接文件;

[root@localhost etc]# ln -s../init.d/apachectl S20apache

进入/etc目录下的rc0.d rc1.d rc6.d 目录建立关机自停止服务的软链接文件;

[root@localhost etc]# ln -s../init.d/apachectl K20apache



参考:http://heylinux.com/archives/238.html


【文档下载】http://ishare.iask.sina.com.cn/f/17120832.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值