全部博文(1015)
分类: 系统运维
2019-06-05 13:29:53
###############centos7 安装apache2.4.39 可以执行####################
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++ -y
yum install make -y
yum install openssl-devel -y
#yum install wget -y
yum install libxml2-devel -y
yum install expat-devel -y
cd /data/taapp/tools
tar -zxf apr-1.7.0.tar.gz
tar -zxf apr-util-1.6.1.tar.gz
tar -zxf httpd-2.4.39.tar.gz
tar -zxf pcre-8.43.tar.gz
今天编译安装 apr-1.7.0 抛出错误提示 rm: cannot remove 'libtoolT': No such file or directory
解决办法
使用如下命令打开configure文件
sudo vi /data/taapp/tools/apr-1.7.0/configure
找到RM='$RM'修改为RM='$RM -f'
cd /data/taapp/tools/apr-1.7.0 ############
./configure --prefix=/data/taapp/apr-1.7.0
make && make install
cd /data/taapp/tools/apr-util-1.6.1 #############
./configure --prefix=/data/taapp/apr-util-1.6.1 --with-apr=/data/taapp/apr-1.7.0/
make && make install
cd /data/taapp/tools/pcre-8.43 ###############
./configure --prefix=/data/taapp/pcre-8.43
make && make install
cp -r /data/taapp/tools/apr-1.7.0 /data/taapp/tools/httpd-2.4.39/srclib/apr ##############
cp -r /data/taapp/tools/apr-util-1.6.1 /data/taapp/tools/httpd-2.4.39/srclib/apr-util
cp -r /data/taapp/tools/pcre-8.43 /data/taapp/tools/httpd-2.4.39/srclib/pcre
cd /data/taapp/tools/httpd-2.4.39
./configure --prefix=/data/taapp/httpd-2.4.39 --with-apr=/data/taapp/apr-1.7.0/ --with-apr-util=/data/taapp/apr-util-1.6.1/ --with-pcre=/data/taapp/pcre-8.43 --enable-so --enable-deflate --enable-expires --enable-headers --enable-ssl --enable-rewrite --enable-mpms-shared=all --with-mpm=prefork --enable-mods-shared=most --with-inclued-apr
make && make install
cd /data/taapp/tools/httpd-2.4.39
make clean
./configure --prefix=/data/taapp/apache2.4.39 --with-apr=/data/taapp/apr-1.7.0/ --with-apr-util=/data/taapp/apr-util-1.6.1/ --with-pcre=/data/taapp/pcre-8.43 --enable-so --enable-deflate --enable-expires --enable-headers --enable-ssl --enable-rewrite --enable-mpms-shared=all --with-mpm=prefork --enable-mods-shared=most --with-inclued-apr
make && make install
cd /data/taapp/apache2.4.39 /bin
chown root httpd
chmod u+s httpd