安装部署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