注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

学无止境

一点积累,与大家分享

 
 
 

日志

 
 

How to install and start the Apache or httpd service under Linux  

2011-05-30 11:07:37|  分类: linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

Q. How do I install and start the Apache or httpd web server under Fedora core or Cent OS?

A. Apache HTTP Server is a free software/open source web server for Unix-like systems and other oses.

Apache features configurable error messages, DBMS-based authentication databases, and content negotiation. It is also supported by several graphical user interfaces (GUIs) which permit easier, more intuitive configuration of the server.

Use rpm command to install Apache under Linux. You can also use up2date or yum command to install the same.

Task: Install Apache/httpd under Fedroa Core/Cent OS Linux

Type the following command if you are using Fedora or Cent OS Linux:

# yum install httpd
Now, start the Apache/httpd
# chkconfig httpd on
# /etc/init.d/httpd start

Task: Install Apache/httpd under Red Hat Enterprise Linux

Type the following command
# up2date httpd
Start the Apache/httpd
# chkconfig httpd on
# /etc/init.d/httpd start

Task: Debian Linux httpd/Apache installation

Use apt-get command:
# apt-get install apache2
# /etc/init.d/apache2 start

Task: Verify that port 80 is open

# netstat -tulpn | grep :80

You can also install httpd from CDROM with rpm command:
# rpm -ivh httpd*

Configuration

Your server is started but you need to configure and use Apache as per your requirement. /etc/httpd/conf/httpd.conf (RHEL/Cent OS/Fedora Core Linux) or /etc/apache2/httpd.conf (Debian / Ubuntu Linux) configuration file. Use text editor such as vi to edit file. This file is very well documented or read official Apache configuration documentation for more information.


手工安装:

1.       下载apache, http://httpd.apache.org/download.cgi  通过这个官方网站,我们可以下到最新的版本。现在版本都是以这样的方式表达的:httpd-*.*.*.tar.gz

2.       例如,你现在去官网下载的就是最新版本:httpd-2.2.9.tar.gz

3.       好了,下载到你的家目录/root里面。

4.       [root@hostlocal~]# ls    // 你会看到你下载的httpd-2.2.9.tar.gz.

5.       [root@hostlocal~]# tar –zxvf  httpd-2.2.9.tar.gz // 解压后为httpd-2.2.9

6.       [root@hostlocal~]# mkdir –p /usr/local/web/apache/   //在这个目录下建立文档,利于管理

7.       [root@hostlocal~]# mv /root/httpd-2.2.9 /usr/local/src/  //将安装包放到/src下,利于管理

8.       [root@hostlocal~]# cd httpd-2.2.9

9.       [root@httpd-2.2.9]#./configure  --prefix=/usr/local/web/apache \    //安装路径

?       --enable-shared=max \

?       --enable-module=rewirte \

?       --enable-module=so

10.   [root@httpd-2.2.9]# make  //编译

11.   [root@httpd-2.2.9]# make install

12.   [root@hostlocal~]# service httpd start            //开启httpd服务

安装成功后,apache将会安装到/usr/local/web/apache下面。然后在windows主机的IE中输入apache服务器的IP地址。看是否可以访问到。

  评论这张
 
阅读(1134)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018