Ubuntu下安装Apache2.0 -- 源码tar包安装
2010-02-03 16:35
483 查看
本文采用tar包源码方式安装,适用于各个linux系统,但是在Ubuntu下推荐apt方式
去官方下载apache2.0 : httpd-2.0.63.tar.gz
1.解压缩httpd-2.0.63.tar.gz到临时目录如~/httpd-2.0.63
2.进入~/httpd-2.0.63目录,执行
#./configure --prefix=/usr/local/apache2 --enable-module=so
#make
#make install
实际执行过程中可能要求你有root权限,所以要求使用sudo.
如果需要mod_rewrite模块,需要加参数: --enable-rewrite
3.启动和停止apache
启动:sudo /usr/local/apache2/bin/httpd -k start
启动时提示:
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.
解决办法是在http.conf中加一行:
ServerName 127.0.0.1:80
停止:sudo /usr/local/apache2/bin/httpd -k stop
4.让Ubuntu开机自动启动apache.
1). 复制 /usr/local/apache2/bin/apachectl到/etc/init.d
2). 加载为服务
sudo update-rc.d apachectl defaults
开机重启访问http://localhost/如果显示apache的网页,就说明自动启动成功了。
去官方下载apache2.0 : httpd-2.0.63.tar.gz
1.解压缩httpd-2.0.63.tar.gz到临时目录如~/httpd-2.0.63
2.进入~/httpd-2.0.63目录,执行
#./configure --prefix=/usr/local/apache2 --enable-module=so
#make
#make install
实际执行过程中可能要求你有root权限,所以要求使用sudo.
如果需要mod_rewrite模块,需要加参数: --enable-rewrite
3.启动和停止apache
启动:sudo /usr/local/apache2/bin/httpd -k start
启动时提示:
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.
解决办法是在http.conf中加一行:
ServerName 127.0.0.1:80
停止:sudo /usr/local/apache2/bin/httpd -k stop
4.让Ubuntu开机自动启动apache.
1). 复制 /usr/local/apache2/bin/apachectl到/etc/init.d
2). 加载为服务
sudo update-rc.d apachectl defaults
开机重启访问http://localhost/如果显示apache的网页,就说明自动启动成功了。
相关文章推荐
- 在Ubuntu中使用源码编译安装Apache+MySQL+PHP+phpMyAdmin
- Ubuntu 16.04源码编译安装Apache 2.4.25教程
- [置顶] Ubuntu Apache从源码安装
- ubuntu下使用源码安装apache 服务器
- ubuntu安装Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_zh-CN.tar.gz
- Ubuntu 源码安装gtk+-2.0
- ubuntu apache 源码安装错误 configure: error: C compiler cannot create executables 解决
- 【Ubuntu 16】源码包安装Apache Httpd
- Ubuntu9。04下使用源码安装apache
- ubuntu下源码包方式安装apache+mysql+php
- Ubuntu14.04.*源码安装MySQL数据库mysql-5.6.*.tar.gz
- ubuntu 源码安装apache和nginx
- Ubuntu13.10源码安装Apache2.4
- Ubuntu下安装PHP5.2.6 -- 源码tar包安装
- ubuntu 下 安装php模块--源码tar包安装
- ubuntu下源码安装apache
- ubuntu 11.10下面安装apache+php+mysql+phpadmin搭建web环境
- ubuntu下源码安装tensorflow
- 【Apache Nutch系列】Nutch2.0配置安装异常集锦
- Linux入门之源码编译安装配置apache---“风一样的软件安装“