httpd的rpm包及源碼安裝配置

來源:互聯網
上載者:User

標籤:apache httpd安裝

1、rpm包安裝

系統內容:

[[email protected] ~]# cat /etc/issueCentOS release 6.4 (Final)Kernel \r on an \m[[email protected] ~]# uname -r2.6.32-358.el6.x86_64[[email protected] ~]# ifconfig | grep Bcast:          inet addr:192.168.0.200  Bcast:192.168.0.255  Mask:255.255.255.0

查看當前yum源中可用的httpd安裝包:

[[email protected] ~]# yum list all *httpd*Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.btte.net * updates: mirrors.btte.netAvailable Packageshttpd.x86_64                        2.2.15-31.el6.centos                 updateshttpd-devel.i686                    2.2.15-31.el6.centos                 updateshttpd-devel.x86_64                  2.2.15-31.el6.centos                 updateshttpd-manual.noarch                 2.2.15-31.el6.centos                 updateshttpd-tools.x86_64                  2.2.15-31.el6.centos                 updates

安裝httpd:

[[email protected] ~]# yum -y install all httpd

查看產生的設定檔:

[[email protected] ~]# rpm -qc httpd/etc/httpd/conf.d/welcome.conf/etc/httpd/conf/httpd.conf/etc/httpd/conf/magic/etc/logrotate.d/httpd……

httpd配置相關的目錄結構:

[[email protected] httpd]# pwd/etc/httpd[[email protected] httpd]# tree.├── conf│   ├── httpd.conf│   ├── httpd.conf.back│   └── magic├── conf.d│   ├── README│   └── welcome.conf├── logs -> ../../var/log/httpd├── modules -> ../../usr/lib64/httpd/modules└── run -> ../../var/run/httpd

配置hosts檔案:

[[email protected] httpd]# vim /etc/hosts192.168.1.200   zhaochj    #增加此行

配置主設定檔,啟用ServerName:

[[email protected] httpd]# vim conf/httpd.confServerName 192.168.1.200:80    #啟用ServerName,並修改為

查看httpd的使用的MPM,預設是prefork:

[[email protected] httpd]# httpd -lCompiled in modules:  core.c  prefork.c  http_core.c  mod_so.c

修改MPM為worker,並驗證:

[[email protected] httpd]# vim /etc/sysconfig/httpdHTTPD=/usr/sbin/httpd.worker    #啟用此行[[email protected] httpd]# service httpd restart[[email protected] httpd]# ps aux | grep httpd

本文出自 “SNAIL” 部落格,請務必保留此出處http://357742954.blog.51cto.com/368705/1603702

httpd的rpm包及源碼安裝配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.