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

CentOS7.6 compiles httpd-2.4.25 manually

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Compile httpd-2.4.25 manually

System: CentOS7.1810

Httpd:2.4.25

Compiler Times error solving skills: if you report anything wrong, install the wrong devel, for example, report a http2 error, yum search http2, find libnghttp2-devel, and then yum install libnghttp2-devel configure again.

Configure EPEL feeds. Some packages have only epel feeds.

[root@centos7 ~] # cat / etc/yum.repos.d/epel.repo

[epel]

Name=aliyun epel

Baseurl= https://mirrors.aliyun.com/epel/7/x86_64/

Gpgcheck=1

Gpgkey= https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7

Enabled=1

1. Download address:

Https://www.lanzous.com/i5csh0h

Http://archive.apache.org/dist/httpd/httpd-2.4.25.tar.bz2

Second, installation dependence

[root@imooc-nginx ~] # yum install gcc openssl-devel pcre-devel apr-devel apr-util-devel libnghttp2-devel ncurses-devel

3. Decompression

[root@imooc-nginx] # bzip2-d httpd-2.4.25.tar.bz2

[root@imooc-nginx ~] # tar xf httpd-2.4.25.tar

IV. Start compiling

[root@imooc-nginx ~] # cd httpd-2.4.25/

[root@imooc-nginx httpd-2.4.25] #. / configure\

-- prefix=/apps/httpd24\

-- sysconfdir=/etc/httpd\

-- enable-http2\

-- disable-auth-basic\

-- enable-ssl\

-- enable-so

Build the application according to Makefile

[root@imooc-nginx httpd-2.4.25] # make

Make-j 2 # can be compiled with multiple threads and written according to the number of CPU

VI. Make install

Copy a file

[root@imooc-nginx httpd-2.4.25] # make install

7. Start apache

You can consider adding PATH variables or making soft links.

[root@imooc-nginx httpd-2.4.25] # / apps/httpd24/bin/apachectl start

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe4d:5986. Set the 'ServerName' directive globally to suppress this message

VIII. Test access

Home page content: / apps/httpd24/htdocs/index.html

Root@ubutnu:~# curl-Q http://172.18.145.106

It works!

9. Let httpd boot automatically

[root@imooc-nginx httpd-2.4.25] # vim / etc/rc.d/rc.local

[root@imooc-nginx httpd-2.4.25] # tail-1 / etc/rc.d/rc.local

/ apps/httpd24/bin/apachectl start

[root@imooc-nginx httpd-2.4.25] # chmod + x / etc/rc.d/rc.local

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