ubuntu 7.10安装apache2

来源:互联网 发布:ei数据库检索 编辑:程序博客网 时间:2024/05/17 09:28

1.安装Apache 2.2.3
-------------下载软件包httpd-2.2.3.tar.gz,地址http://www.apache.org-------------
# tar zvxf httpd-2.2.3.tar.gz
# cd httpd-2.2.3
# ./configure --prefix=/usr/local/apache /
--enable-module=most /
--enable-shared=max
# make
# make install
----------------------------------启动Apache服务----------------------------------
# /usr/local/apache/bin/apachectl start
----------------------------------关闭Apache服务----------------------------------
# /usr/local/apache/bin/apachectl stop
----------------------------------重启Apache服务----------------------------------
# /usr/local/apache/bin/apachectl restart

册除apache2:

apache2

先卸载了
首先sudo apt-get remove apache2
再sudo apt-get autoremove

问题已经解决了,先卸载了,然后命令行安装
sudo aptitude -r install apache2
这样安装的组件比较完整,也把apache2-mpm-worker装上就可以启动了
看来还是命令行稳妥啊

 

 

启动报错:(httpd restart出現錯誤 Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

vi /etc/httpd/conf/httpd.conf
找到 ServerName
可能已經被註解了,這時只要將註解符號拿掉,再取個適當的名稱即可解決!

ServerName localhost

原创粉丝点击