Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Apache source code installation

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Steps to install apache with source code

1. Download the source code

Wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.6.1.tar.gzwget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.5.tar.gzwget http://mirrors.shu.edu.cn/apache//httpd/httpd-2.4.35.tar.gz

Note: Apr is an Apache project called Apache Protable runtime that creates or maintains software libraries that provide predictable and consistent interfaces for underlying platform-specific implementations. The goal is to provide an API. Project address: https://apr.apache.org/

Where apr.tar.gz is the library and apr-util.tar.gz is the tool component

two。 Extract to / usr/local/src

Tar-zxvf apr-1.6.5.tar.gz-C / usr/local/apr. / configure-- prefix=/usr/local/apr then make&&make installtar-zxvf apr-util-1.6.1.tar.gz-C / usr/local/apr-util/. / configure-- with-apr=/usr/local/apr-- prefix=/usr/local/apr-util then make&&make installtar-zxvf httpd-2.4.35.tar.gz-C / usr/local/src

3. Using configure to generate makefile file

/ configure-- prefix=/usr/local/httpd/-- sysconfdir=/etc/httpd/-- with-include-apr-- disable-userdir-- enable-headers-- with-mpm=worker-- enable-modules=most-- enable-so-- enable-deflate-- enable-defate=shared-- enable-expires-shared-- enable-rewrite=shared-- enable-static-support-- with-apr=/usr/local/apr/-- with-apr-util=/usr/local/apr-util/bin-- with-ssl

Because the linux I installed minimizes the installation of multiple errors at compile time, because many dependent libraries are not installed to operate according to the error content

Yum install pcre-devel-7.8-6.el6.x86_64.rpm-yyum install zlib-devel-1.2.3-29.el6.x86_64.rpm-y

4. Compile, compile and install

Make & & make install

5. Make startup script and self-startup

[root@www1 ~] # cp / usr/local/httpd/bin/apachectl / etc/init.d/httpd# copy the startup script of apache to / etc/init.d [root@www1 ~] # vim / EtcUnip init.dqhttpdAccordThink chkconfig: 345 61 # startup level, startup sequence, shutdown order at shutdown [root@www1 ~] # chkconfig-- add httpd [root@www1 ~] # chkconfig-- level 2345 httpd on

6. Modify environment variabl

[root@www1 ~] # cat > > / etc/profile

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report