7.6 yum更换国内源
[root@aming-01 yum.repos.d]# rm -f CentOS-Base.repo
[root@aming-01 yum.repos.d]# curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
[root@aming-01 yum.repos.d]# yum list
7.7 yum下载rpm包
[root@aming-01 yum.repos.d]# yum reinstall -y bash --downloadonly --
downloaddir=/usr/local/src
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* epel: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 bash.x86_64.0.4.2.46-30.el7 将被 已重新安装
--> 解决依赖关系完成
依赖关系解决
====================================================================
Package 架构 版本 源 大小
====================================================================
重新安装:
bash x86_64 4.2.46-30.el7 base 1.0 M
事务概要
====================================================================
重新安装 1 软件包
总下载量:1.0 M
安装大小:3.5 M
Background downloading packages, then exiting:
bash-4.2.46-30.el7.x86_64.rpm | 1.0 MB 00:01
exiting because "Download Only" specified
[root@aming-01 yum.repos.d]# ls /usr/local/src
bash-4.2.46-30.el7.x86_64.rpm
7.8/7.9 源码包安装
[root@aming-01 src]# yum install -y gcc
[root@aming-01 src]# cd /usr/local/src/
[root@aming-01 src]# wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.35.tar.gz
[root@aming-01 src]# ls
httpd-2.4.35.tar.gz
[root@aming-01 src]# tar -zxvf httpd-2.4.35.tar.gz
[root@aming-01 src]# ls
httpd-2.4.35 httpd-2.4.35.tar.gz
[root@aming-01 httpd-2.4.35]# ./configure
[root@aming-01 httpd-2.4.35]# ./configure --prefix=/usr/local/apache2
[root@aming-01 httpd-2.4.35]# echo $?
1
下载apr-1.6、apr-util-1.6以及httpd-2.4,分别解压三个源码包
把apr-1.6.3 放到httpd源码包的/srclib/下,改名apr
把apr-util-1.6.1 放到httpd源码包的/srclib/下,改名apr-util
4)编译参数./configure --prefix=/dir/ --enable-so --enable-mpms-shared=all --with-mpm=event --enable-mods-shared=most --with-included-apr
说明:这里的/dir/为apache安装路径,根据需求定目录
安装pcre-devel即可。
[root@aming-01 httpd-2.4.34]# yum install pcre-devel
[root@aming-01 httpd-2.4.34]# ./configure --prefix=/dir/ --enable-so --enable-mpms-shared=all --with-mpm=event --enable-mods-shared=most --with-included-apr
[root@aming-01 httpd-2.4.34]# make
[root@aming-01 httpd-2.4.34]# make install