Home > Backend Development > PHP Tutorial > 我在RedHatlinux6.2下安装Apache-2.0.44的过程_PHP

我在RedHatlinux6.2下安装Apache-2.0.44的过程_PHP

WBOY
Release: 2016-06-01 12:37:21
Original
995 people have browsed it

ApacheRedhat

我是第一次哦。。。花费了我一个通宵,失败了四次,最后安装成功才发现原来是自己粗心大意,现炒现卖,刚装好Apache就上来把成功安装的过程写下来了。。。此文献给象我一样初初接触linux的超级大菜鸟,^_^

我在安装redhat6.2时,ftp和http和数据库都不装,基本上只是装了XFree86。
准备工作:
在命令行下运行lynx下载apache-2.0.44.tar.gz
#cd /usr/local/src
#lynx http://www.apache.org/dist/httpd/httpd-2.0.44.tar.gz
下载结束后保存为/usr/local/src/httpd-2.0.44.tar.gz,按'q'并回答y退出lynx

开始安装:
#cd /usr/local/src
#tar zxvf httpd-2.0.44.tar.gz
#cd /usr/local/src/httpd-2.0.44
#./configure --prefix=/usr/local/servers/apache2
(说明:--prefix=/usr/local/servers/apache2这个选项是自己设定的apache的安装目的目录)
等啊等。。。,配置完了

#make

这个make好象等了n年。。。苦啊

#make install

简单配置:
#cd /usr/local/servers/apache2/conf
#vi httpd.conf

编辑httpd.conf,按键盘上Insert键,翻页,找到#ServerName xxxxx:80,把ServerName前的#号去掉,把xxxxx改成自己的机器全名,如我改成ServerName pig.home.cn ;还有一步最关键的是把Group #-1改成Group nobody,如果漏了改它,则apache是没法启动的。最后按两下Esc键,输入 :wq回车就存盘退出vi编辑器了。

启动Apache:
#cd /usr/local/servers/apache2/bin
#./apachectl start

测试Apache是否工作了,激动人心的时刻到了,命令行下输入:
#lynx http://localhost

哇哇,真的看到主页了耶~~~~

白天要停电。。。java、JSP和PHP只能到晚上再装了。sigh

忘了说一句,停掉apache是
#cd /usr/local/servers/apache2/bin
#./apachectl stop
呵呵
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template