linux下的apache安装(不支持ssl)
2012-08-03 23:09
696 查看
#tar zxvf httpd-2.2.11.tar.gz
解压apache包,在当前目录下生成httpd-2.2.11
#cd httpd-2.2.11.tar.gz
进入httpd-2.2.11目录
#./configure –prefix=/usr/local/apache2 –enable-so -enable-mods-shared=most –enable-rewrite –enable-cache
其中的-enable要用空格连起来写
–prefix指定安装目录
–enable-so选项:让Apache可以支持DSO模式,注意,这里采用的是Apache2.0的语法。使用1.3版本的将其改为–enable-module=so。
–enable-mods-shared=most选项:告诉编译器将所有标准模块都编译为DSO模块。使用1.3版本的将其改为–enable-shared=max。此方式是动态加载所有模块,如果去掉-shared话,是静态加载所有模块。”most”表示大部分常用的模块,”all”表示所有模块(–enable-mods-shared=all)
–enable-rewrite(实现对动态网页地址的重写)选项:支持地址重写功能,使用1.3版本的将其改为–enable-module=rewrite。
#make;make install 编译并且安装
#cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
#service httpd start/stop
立即启动apache服务,重启后无效
开机自启动apache服务器
a:
echo “/usr/local/apache2/bin/apachectl start” >> /etc/rc.local
b:
vi /etc/rc.d/init.d/httpd (就是上面复制的文件)
添加入下code
# Comments to support chkconfig on Centos
# chkconfig: 2345 50 90
# description: Activates/Deactivates Apache Web Server
#description一定要有,否则httpd脚本就会出错
这样就可以通过chkconfig配置自启动了
解压apache包,在当前目录下生成httpd-2.2.11
#cd httpd-2.2.11.tar.gz
进入httpd-2.2.11目录
#./configure –prefix=/usr/local/apache2 –enable-so -enable-mods-shared=most –enable-rewrite –enable-cache
其中的-enable要用空格连起来写
–prefix指定安装目录
–enable-so选项:让Apache可以支持DSO模式,注意,这里采用的是Apache2.0的语法。使用1.3版本的将其改为–enable-module=so。
–enable-mods-shared=most选项:告诉编译器将所有标准模块都编译为DSO模块。使用1.3版本的将其改为–enable-shared=max。此方式是动态加载所有模块,如果去掉-shared话,是静态加载所有模块。”most”表示大部分常用的模块,”all”表示所有模块(–enable-mods-shared=all)
–enable-rewrite(实现对动态网页地址的重写)选项:支持地址重写功能,使用1.3版本的将其改为–enable-module=rewrite。
#make;make install 编译并且安装
#cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
#service httpd start/stop
立即启动apache服务,重启后无效
开机自启动apache服务器
a:
echo “/usr/local/apache2/bin/apachectl start” >> /etc/rc.local
b:
vi /etc/rc.d/init.d/httpd (就是上面复制的文件)
添加入下code
# Comments to support chkconfig on Centos
# chkconfig: 2345 50 90
# description: Activates/Deactivates Apache Web Server
#description一定要有,否则httpd脚本就会出错
这样就可以通过chkconfig配置自启动了
相关文章推荐
- linux安装apache支持https(ssl)
- linux下安装apache支持ssl
- Linux环境安装Apache与PHP,支持SSL
- 在Ubuntu 13.10 下安装支持SSL的Apache
- (转帖)Linux下面PHP开发环境源码安装-php,mysql,apache以及图形支持库GD的安装
- RPM 安装mod_encoding,linux下apache支持中文名
- linux下安装apache svn ssl
- 在Apache服务器上安装SSL支持的教程
- linux下安装redmine,附加apache支持
- Linux apache配备ssl支持https
- linux下安装apache svn ssl
- 在Ubuntu 13.10 下安装支持SSL的Apache
- CentOS 下编译安装 Apache 并配置 SSL 模块以支持 HTTPS
- Linux 源码安装subversion+apache,支持https访问
- linux下apache安装ssl步骤
- 【转】linux下apache支持中文名的解决方法!(mod_encoding安装手册)
- 如何在Ubuntu 14.04 上为Apache 2.4 安装SSL支持
- Linux Apache SSL安装与配置
- Linux下Apache配置SSL支持https
- Linux下安装apache和php,支持Google的SPDY协议