httpd和apache关系(转)

上一篇 / 下一篇  2012-02-13 16:45:22 / 个人分类:菜鸟学习笔记--Linux


httpd是unix系统(例如Unix,bsd)apache的可执行文件的文件名,一般在这些系统

,httpd指的就是apache

apache tomcat httpd的关系和区别
apache和tomcat都可以作为web服务,像win下面的IIS一样。不同的是tomcat支持jsp

等特定脚本。
apache2以上版本改称为httpd。

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.

Userpm command to install Apacheunder 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 withrpm 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 officialApache 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地址。看是否可以访问到。

» 本文链接地址:http://www.pengpan.cn/699.html» 英雄不问来路,转载请注明出处,谢谢。

TAG:

 

评分:0

我来说两句

日历

« 2024-04-26  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 14402
  • 日志数: 16
  • 建立时间: 2011-07-19
  • 更新时间: 2012-08-13

RSS订阅

Open Toolbar