LAMT部署

安装部署LAMT

首先要部署apache和mysql
httpd安装

安装开发工具包

[root@localhost ~]# yum -y install epel-release

[root@localhost ~]# yum groups mark install 'Development Tools'
安装依赖包

[root@localhost ~]# useradd -r -M -s /sbin/nologin apache
//创建apache用户


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

这里首先查看一下有没有apache残留

[root@localhost ~]# rpm -qa |grep httpd
[root@localhost ~]# which apachectl
/usr/bin/which: no apachectl in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/

把安装httpd的三个包下载并拖进findshell

[root@localhost ~]# ls
anaconda-ks.cfg    apr-util-1.6.1.tar.bz2  initial-setup-ks.cfg
apr-1.7.0.tar.bz2  httpd-2.4.43.tar.bz2
[root@localhost ~]# tar xf apr-1.7.0.tar.bz2 
[root@localhost ~]# tar xf apr-util-1.6.1.tar.bz2 
[root@localhost ~]# tar xf httpd-2.4.43.tar.bz2


修改配置文件

[root@localhost ~]# ls
anaconda-ks.cfg  apr-1.7.0.tar.bz2  apr-util-1.6.1.tar.bz2  httpd-2.4.43.tar.bz2
apr-1.7.0        apr-util-1.6.1     httpd-2.4.43            initial-setup-ks.cfg
[root@localhost ~]# cd apr-1.7.0/
[root@localhost apr-1.7.0]# ls
apr-config.in  build.conf        dso         libapr.rc     NOTICE         support
apr.dep        buildconf         emacs-mode  LICENSE       NWGNUmakefile  tables
apr.dsp        build-outputs.mk  encoding    locks         passwd         test
apr.dsw        CHANGES           file_io     Makefile.in   poll           threadproc
apr.mak        CMakeLists.txt    helpers     Makefile.win  random         time
apr.pc.in      config.layout     include     memory        README         tools
apr.spec       configure //修改这个文件         libapr.dep  misc          README.cmake   user
atomic         configure.in      libapr.dsp  mmap          shmem
build          docs              libapr.mak  network_io    strings
[root@localhost apr-1.7.0]# vim configure
    cfgfile=${
   ofile}T
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
把中间这行删掉
    cat <<_LT_EOF >> "$cfgfile"

编译安装

[root@localhost apr-1.7.0]# ./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.0
checking for chosen layout... apr
checking for gcc... gcc


安装

[root@localhost apr-1.7.0]# make 

sed 's,^\(location=\).*$,\1installed,' < apr-1-config > apr-config.out
sed -e 's,^\(apr_build.*=\).*$,\1/usr/local/apr/build-1,' -e 's,^\(top_build.*=\).*$,\1/usr/local/apr/build-1,' < build/apr_rules.mk > build/apr_rules.out
make[1]: 离开目录“/root/apr-1.7.0[1]+  已完成               make
[root@localhost apr-1.7.0]# make install

/usr/bin/install -c -m 755 /root/apr-1.7.0/build/mkdir.sh /usr/local/apr/build-1
for f in make_exports.awk make_var_export.awk
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值