redhat6.7的yum配置

前言

实验目的:
为刚装完的rh6.7更新安装源(有的资料上的url失效了,我找了一个新的url)
在更新安装源后, 为新安装的rh6.7安装开发和调试软件,然后编译一个开源软件试试水。

实验

mkdir -p /home/dev
cd /home/dev

rpm-aq | grep yum|xargs rpm -e--nodeps

wget http://vault.centos.org/6.7/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://vault.centos.org/6.7/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://vault.centos.org/6.7/os/x86_64/Packages/yum-3.2.29-69.el6.centos.noarch.rpm
wget http://vault.centos.org/6.7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-3.2.29-69.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

open http://mirrors.163.com/.help/centos.html, download centos6's repo
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[root@localhost dev]# ls /etc/yum.repos.d/
redhat.repo  rhel-source.repo

cd /etc/yum.repos.d/
mv ./redhat.repo ./redhat.repo.bk
mv ./rhel-source.repo ./rhel-source.repo.bk

cd /home/dev/
cp ./CentOS6-Base-163.repo /etc/yum.repos.d/

vi /etc/yum.repos.d/CentOS6-Base-163.repo
/$releasever
n
将全部的$releasever都替换成6

yum clean all
yum makecache

// 开始安装开发和调试的软件

yum install gcc
yum install gdb

cd /home/dev/
wget https://sourceforge.net/projects/bashdb/files/bashdb/4.4-0.94/bashdb-4.4-0.94.tar.bz2/download
mv ./download ./bashdb-4.4-0.94.tar.bz2
bzip2 -dk ./bashdb-4.4-0.94.tar.bz2
tar -xvf ./bashdb-4.4-0.94.tar
cd ./bashdb-4.4-0.94
./configure --prefix=/usr
make all
make install

// 安装要参考的开源软件

cd /home/dev/
wget http://www.tcpdump.org/release/tcpdump-4.9.2.tar.gz
tar -xzvf ./tcpdump-4.9.2.tar.gz

wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
tar -xzvf ./libpcap-1.8.1.tar.gz

// 编译开源软件
cd ./libpcap-1.8.1
yum install flex
yum install bison

./configure
make all
make install

cd /home/dev/tcpdump-4.9.2
./configure --prefix=/home/dev/tcpdump_4.9.2_release
make all
make install

// 运行编译完的开源软件
cd /home/dev/tcpdump_4.9.2_release/sbin
./tcpdump

做实验的虚拟机

下载点: vm_img_rh6_7_dev_ok.7z.001
用7zip压缩的vmware14虚拟机,解压后用vmware14载入就能做实验。

你可能感兴趣的:(redhat6.7的yum配置)