7.6 yum更换国内源
cd /etc/yum.repos.d/
rm -r dvd.repo
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
或者
curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum list
cp -r /etc/yum.repos.d.bak/* /etc/yum.repos.d/
7.7 yum 下载rpm包
安装扩展源epel
yum install -y epel-release
yum list|grep epel
yum下载rpm包
yum install -y 包名 --downloadonly
ls /var/cache/yum/x86_64/7/
yum install -y 包名 --downloadonly --downloaddir=路径
yum reinstall -y 包名 --downloadonly --downloaddir=路径
[[email protected] yum.repos.d]# yum install -y zsh --downloadonly
[[email protected] yum.repos.d]# ls /var/cache/yum/x86_64/7/base/packages/
zsh-5.0.2-28.el7.x86_64.rpm
[[email protected] yum.repos.d]# yum install -y zsh --downloadonly --downloaddir=/tmp
[[email protected] yum.repos.d]# ls /tmp/
11.txt
....................
zsh-5.0.2-28.el7.x86_64.rpm
[[email protected] yum.repos.d]# yum reinstall -y ppp --downloadonly --downloaddir=/tmp
[[email protected] yum.repos.d]# ls /tmp/
.......................
ppp-2.4.5-33.el7.x86_64.rpm
7.8 源码包安装-上
cd /usr/local/src/
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.32.tar.gz
tar -zxvf httpd-2.2.32.tar.gz
cd httpd-2.2.32
./configure --prefix=/usr/local/apache2 //指定安装路径
echo $?
make
make install
卸载就是删除安装的文件
7.9 源码安装-下
安装完,再用 echo $? 检查有没有成功
原文地址:http://blog.51cto.com/9298822/2083644
时间: 2024-10-31 00:21:18