笔记内容:
7.6 yum更换国内源
7.7 yum下载rpm包
7.8/7.9 源码包安装
扩展
一、yum更换国内源
image.png还原repo
删除CentOS-Base.repo
1.1#yum install –y wget
1.2#curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo
image.pngimage.png
二、yum下载rpm包
image.png2.1#yum install –y epel-release
2.2#yum list
image.pngimage.png
image.png
2.3#yum install –y zsh --downloadonly //仅下载不安装
2.4#ls /var/cache/yum/x86_64/7/base/packages //下载的rpm存放位置
image.pngimage.png
image.png
2.5# yum install –y zsh --downloadonly --downloaddir=/tmp //指定下载rpm的路径/tmp
2.6# yum reinstall –y vim-enhanced --downloadonly --downloaddir=/tmp //重新安装vim-enhanced到/tmp
image.pngimage.png
image.png
image.png
三、 源码包安装
image.png源码包放置位置:/usr/local/src
3.1#wget http://archive.apache.org/dist/httpd/httpd-2.2.9.tar.gz
3.2#tar –zxvf httpd-2.2.9.tar.gz
image.png3.3#more README //源码包说明文档
3.4#more INSTALL //源码包安装文档
image.pngimage.png
3.5源码包编译安装:
3.5.1 #./configure --prefix=/usr/local/apache2 //安装目录
image.pngimage.png
3.5.1.1#echo $? //值非0表示上条命令执行出错
3.5.1.2#yum install –y gcc
image.png3.5.2#make //编译
image.png3.5.3#make install //将编译的二进制文件放到prefix指定路径
image.pngimage.png
网友评论