设为首页 加入收藏

TOP

基于容器的方式做一个apache编译安装的镜像(二)
2023-07-23 13:29:43 】 浏览:73
Tags:于容器 方式做 apache 安装的
0a7f0 yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel* [root@3e493c00a7f0 yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel* //下载epel源

下载包组依赖包

[root@3e493c00a7f0 ~]# dnf -y install openssl-devel pcre-devel expat-devel libtool gcc gcc-c++ wget vim make
[root@3e493c00a7f0 ~]# dnf -y groups mark install 'Development Tools'
[root@3e493c00a7f0 ~]# useradd -r -M -s /sbin/nologin  apache
[root@3e493c00a7f0 ~]# id apache
uid=998(apache) gid=996(apache) groups=996(apache)

下载apr,apr-util,httpd,并解压

[root@3e493c00a7f0 ~]# wget https://downloads.apache.org/apr/apr-1.7.0.tar.gz https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
//在https://downloads.apache.org/官网里面下载
[root@3e493c00a7f0 ~]# tar -xf apr-1.7.0.tar.gz 
[root@3e493c00a7f0 ~]# tar -xf apr-util-1.6.1.tar.gz 
[root@3e493c00a7f0 ~]# tar -xf httpd-2.4.54.tar.gz   
[root@3e493c00a7f0 ~]# ls
anaconda-ks.cfg    apr-1.7.0	   httpd-2.4.54
anaconda-post.log  apr-util-1.6.1  original-ks.cfg
//解压并删除压缩包

编译安装apr

[root@3e493c00a7f0 ~]# cd apr-1.7.0/
[root@3e493c00a7f0 apr-1.7.0]# ls
apr-config.in  build-outputs.mk  helpers       misc	      strings
apr.dep        CHANGES		 include       mmap	      support
apr.dsp        CMakeLists.txt	 libapr.dep    network_io     tables
apr.dsw        config.layout	 libapr.dsp    NOTICE	      test
apr.mak        configure	 libapr.mak    NWGNUmakefile  threadproc
apr.pc.in      configure.in	 libapr.rc     passwd	      time
apr.spec       docs		 LICENSE       poll	      tools
atomic	       dso		 locks	       random	      user
build	       emacs-mode	 Makefile.in   README
build.conf     encoding		 Makefile.win  README.cmake
buildconf      file_io		 memory        shmem
[root@3e493c00a7f0 apr-1.7.0]# vim configure 
#   $RM "$cfgfile"    //删除或者注释掉
[root@3e493c00a7f0 apr-1.7.0]# ./configure --prefix=/usr/local/apr
[root@3e493c00a7f0 apr-1.7.0]# make
[root@3e493c00a7f0 apr-1.7.0]# make install 

编译安装apr-util

[root@3e493c00a7f0 apr-1.7.0]# cd ../apr-util-1.6.1/
[root@3e493c00a7f0 apr-util-1.6.1]# ls
aprutil.dep	  CHANGES	     include	     NWGNUmakefile
aprutil.dsp	  CMakeLists.txt     ldap	     README
aprutil.dsw	  config.layout      libaprutil.dep  README.cmake
aprutil.mak	  configure	     libaprutil.dsp  README.FREETDS
apr-util.pc.in	  configure.in	     libaprutil.mak  redis
apr-util.spec	  crypto	     libaprutil.rc   renames_pending
apu-config.in	  dbd		     LICENSE	     strmatch
buckets		  dbm		     Makefile.in     test
build		  docs		     Makefile.win    uri
build.conf	  encoding	     memcache	     xlate
buildconf	  export_vars.sh.in  misc	     xml
build-outputs.mk  hooks		     NOTICE
[root@3e493c00a7f0 apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@3e493c00a7f0 apr-util-1.6.1]# make
[root@3e493c00a7f0 apr-util-1.6.1]# make install

编译安装httpd

[root@3e493c00a7f0 apr-util-1.6.1]# cd 
[root@3e493c00a7f0 ~]# ls /usr/local/
apr  apr-util  bin  etc  games	include  lib  lib64  libexec  sbin  share  src
[root@3e493c00a7f0 ~]# cd httpd-2.4.54/
[root@3e493c00a7f0 httpd-2.4.54]# ls
ABOUT_APACHE	 CHANGES	  httpd.mak	  Makefile.in	    ROADMAP
acinclude.m4	 changes-entries  httpd.spec	  Makefile.win	    server
Apache-apr2.dsw  CMakeLists.txt   include	  modules	    srclib
Apache.dsw	 config.layout	  INSTALL	  NOTICE	    support
apache_probes.d  configure	  InstallBin.dsp  NWGNUmakefile     test
首页 上一页 1 2 3 4 下一页 尾页 2/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Vim基础用法,最常用、最实用的命.. 下一篇基于容器的方式做一个apache编译..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目