LAMT架构

LAMT架构

实验环境
系统 主机IP 服务
Centos Stream 8 192.168.10.40 httpd-2.4.43
mysql-5.7
tomcat-9.0.45
关闭防火墙和selinux
[root@happy ~]# systemctl stop firewalld 
[root@happy ~]# setenforce 0
安装httpd
//创建apache服务的用户和组
[root@happy ~]# groupadd -r apache
[root@happy ~]# useradd -r -M -s /sbin/nologin -g apache apache

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

//下载和安装apr以及apr-util
[root@happy ~]# wget https://archive.apache.org/dist/apr/apr-1.7.0.tar.gz
[root@happy ~]# wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz
[root@happy ~]# tar xf apr-1.7.0.tar.gz 
[root@happy ~]# tar xf apr-util-1.6.1.tar.gz 
[root@happy ~]# cd apr-1.7.0
[root@happy apr-1.7.0]# vim configure
...
    cfgfile=${ofile}T
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
    $RM "$cfgfile"    //将此行注释或者删除
...
[root@happy apr-1.7.0]# ./configure --prefix=/usr/local/apr
[root@happy apr-1.7.0]# make && make install
[root@happy apr-1.7.0]# cd ../apr-util-1.6.1
[root@happy apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
[root@happy apr-util-1.6.1]# make && make install

//下载和安装httpd
[root@happy ~]# wget https://archive.apache.org/dist/httpd/httpd-2.4.43.tar.gz
[root@happy ~]# tar xf httpd-2.4.43.tar.gz 
[root@happy ~]# cd httpd-2.4.43
[root@happy httpd-2.4.43]# ./configure --prefix=/usr/local/apache \
--sysconfdir=/etc/httpd24 \
--enable-proxy \
--enable-proxy-connect \
--enable-so \
--enable-ssl \
--enable-cgi \
--enable-rewrite \
--with-zlib \
--with-pcre \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/ \
--enable-modules=most \
--enable-mpms-shared=all \
--with-mpm=prefork
[root@happy httpd-2.4.43]# make && make install

//安装后配置
[root@happy ~]# echo 'export PATH=/usr/local/apache/bin:$PATH' > /etc/profile.d/httpd.sh
[root@happy ~]# source /etc/profile.d/httpd.sh
[root@
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值