Apache和Linux的关系,httpd和apache关系(转)

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地址。看是否可以访问到。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值