lamp安装

  1. httpd安装

[root@localhost ~]# yum -y install epel-release vim
Last metadata expiration check: 0:07:19 ago on Tuesday, February 21, 2023 AM12:44:53 CST.
Dependencies resolved.
=======================================================================================
 Package               Architecture  Version                    Repository        Size
=======================================================================================
Installing:
 epel-release          noarch        8-11.el8                   extras            24 k
 vim-enhanced          x86_64        2:8.0.1763-16.el8          AppStream        1.4 M
Installing dependencies:
 gpm-libs              x86_64        1.20.7-17.el8              AppStream         39 k
 vim-common            x86_64        2:8.0.1763-16.el8          AppStream        6.3 M
 vim-filesystem        noarch        2:8.0.1763-16.el8          AppStream         49 k

Transaction Summary
=======================================================================================
Install  5 Packages

Total download size: 7.8 M
Installed size: 30 M
Downloading Packages:
(1/5): epel-release-8-11.el8.noarch.rpm                 60 kB/s |  24 kB     00:00    
(2/5): gpm-libs-1.20.7-17.el8.x86_64.rpm                93 kB/s |  39 kB     00:00    
(3/5): vim-filesystem-8.0.1763-16.el8.noarch.rpm        93 kB/s |  49 kB     00:00    
(4/5): vim-enhanced-8.0.1763-16.el8.x86_64.rpm         128 kB/s | 1.4 MB     00:10    
(5/5): vim-common-8.0.1763-16.el8.x86_64.rpm           128 kB/s | 6.3 MB     00:50    
---------------------------------------------------------------------------------------
Total                                                  157 kB/s | 7.8 MB     00:50     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                               1/1 
  Installing       : vim-filesystem-2:8.0.1763-16.el8.noarch                       1/5 
  Installing       : vim-common-2:8.0.1763-16.el8.x86_64                           2/5 
  Installing       : gpm-libs-1.20.7-17.el8.x86_64                                 3/5 
  Running scriptlet: gpm-libs-1.20.7-17.el8.x86_64                                 3/5 
  Installing       : vim-enhanced-2:8.0.1763-16.el8.x86_64                         4/5 
  Installing       : epel-release-8-11.el8.noarch                                  5/5 
  Running scriptlet: epel-release-8-11.el8.noarch                                  5/5 
  Running scriptlet: vim-common-2:8.0.1763-16.el8.x86_64                           5/5 
  Verifying        : epel-release-8-11.el8.noarch                                  1/5 
  Verifying        : gpm-libs-1.20.7-17.el8.x86_64                                 2/5 
  Verifying        : vim-common-2:8.0.1763-16.el8.x86_64                           3/5 
  Verifying        : vim-enhanced-2:8.0.1763-16.el8.x86_64                         4/5 
  Verifying        : vim-filesystem-2:8.0.1763-16.el8.noarch                       5/5 

Installed:
  epel-release-8-11.el8.noarch                gpm-libs-1.20.7-17.el8.x86_64            
  vim-common-2:8.0.1763-16.el8.x86_64         vim-enhanced-2:8.0.1763-16.el8.x86_64    
  vim-filesystem-2:8.0.1763-16.el8.noarch    

Complete!
[root@localhost ~]# yum groups mark install 'Development Tools'    //安装开发工具包
Extra Packages for Enterprise Linux 8 - x86_64         918 kB/s |  13 MB     00:14    
Extra Packages for Enterprise Linux Modular 8 - x86_64 453 kB/s | 733 kB     00:01    
Last metadata expiration check: 0:00:01 ago on Tuesday, February 21, 2023 AM12:54:06 CST.
Dependencies resolved.
=======================================================================================
 Package             Architecture       Version              Repository           Size
=======================================================================================
Installing Groups:
 Development Tools                                                                    

Transaction Summary
=======================================================================================

Is this ok [y/N]: y
Complete!
[root@localhost apr-1.7.2]# yum -y install make
Last metadata expiration check: 0:19:07 ago on Tuesday, February 21, 2023 AM12:54:06 CST.
Dependencies resolved.
=======================================================================================
 Package          Architecture       Version                    Repository        Size
=======================================================================================
Installing:
 make             x86_64             1:4.2.1-10.el8             base             498 k

Transaction Summary
=======================================================================================
Install  1 Package

Total download size: 498 k
Installed size: 1.4 M
Downloading Packages:
make-4.2.1-10.el8.x86_64.rpm                           243 kB/s | 498 kB     00:02    
---------------------------------------------------------------------------------------
Total                                                  242 kB/s | 498 kB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                               1/1 
  Installing       : make-1:4.2.1-10.el8.x86_64                                    1/1 
  Running scriptlet: make-1:4.2.1-10.el8.x86_64                                    1/1 
  Verifying        : make-1:4.2.1-10.el8.x86_64                                    1/1 

Installed:
  make-1:4.2.1-10.el8.x86_64                                                           

Complete!

[root@localhost ~]# yum -y install openssl-devel pcre-devel expat-devel libtool gcc gcc-c++
    //安装依赖包

[root@localhost ~]# groupadd -r apache
[root@localhost ~]# useradd -r -M -s /sbin/nologin -g apache apache   //创建apache服务的用户和组
[root@localhost src]# ls
apr-1.7.2.tar.gz       httpd-2.4.55.tar.gz                         php-8.2.3.tar.gz
apr-util-1.6.3.tar.gz  kernels
debug                  mysql-5.7.40-linux-glibc2.12-x86_64.tar.gz     //从官网下载所需要的软件包

[root@localhost src]# tar xf apr-1.7.2.tar.gz 
[root@localhost src]# tar xf apr-util-1.6.3.tar.gz 
[root@localhost src]# tar xf httpd-2.4.55.tar.gz     //解压软件包

[root@localhost src]# cd apr-1.7.2
[root@localhost apr-1.7.2]# vim configure
    cfgfile=${ofile}T
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
#   $RM "$cfgfile"   //注释这行

[root@localhost apr-1.7.2]# vim configure     //编译安装
[root@localhost apr-1.7.2]# ./configure --prefix=/usr/local/apr
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
Configuring APR library
Platform: x86_64-pc-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.7.2
....
config.status: creating test/internal/Makefile
config.status: creating include/arch/unix/apr_private.h
config.status: executing libtool commands
config.status: executing default commands

[root@localhost apr-1.7.2]# make && make install
make[1]: Entering directory '/usr/src/apr-1.7.2'
/bin/sh /usr/src/apr-1.7.2/libtool --silent --mode=compile --tag=CC gcc -g -O2 -pthread   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I./include -I/usr/src/apr-1.7.2/include/arch/unix -I./include/arch/unix -I/usr/src/apr-1.7.2/include/arch/unix -I/usr/src/apr-1.7.2/include -I/usr/src/apr-1.7.2/include/private -I/usr/src/apr-1.7.2/include/private  -o encoding/apr_encode.lo -c encoding/apr_encode.c && touch encoding/apr_encode.lo
/usr/src/apr-1.7.2/build/mkdir.sh tools
....
    if test -f ${f}; then /usr/bin/install -c -m 755 ${f} /usr/local/apr/build-1; fi; \
done
/usr/bin/install -c -m 755 /usr/src/apr-1.7.2/build/mkdir.sh /usr/local/apr/build-1
for f in make_exports.awk make_var_export.awk; do \
    /usr/bin/install -c -m 644 /usr/src/apr-1.7.2/build/${f} /usr/local/apr/build-1; \
done
/usr/bin/install -c -m 644 build/apr_rules.out /usr/local/apr/build-1/apr_rules.mk
/usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config

[root@localhost apr-1.7.2]# cd /usr/src/apr-util-1.6.3
[root@localhost apr-util-1.6.3]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
....
config.status: creating include/apu.h
config.status: creating include/apu_want.h
config.status: creating test/Makefile
config.status: creating include/private/apu_config.h
config.status: executing default commands
[root@localhost apr-util-1.6.3]# make && make install
make[1]: Entering directory '/usr/src/apr-util-1.6.3'
/bin/sh /usr/local/apr/build-1/libtool --silent --mod
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值