REDHAT7 is a Centos7 release, because the copyright issue in the use of Yum will prompt the need to register (is to spend money ing);
Instead, we use the CENTOS7 source instead;
Announcement ***************************************
The following content is purely personal writing, do not use for commercial purposes, reproduced please indicate the source, there are errors and questions please leave a message or private messages, thank you
########################## #仅供参考, if copyright is involved, please direct messages ###########################
Preparation: Win host * 1, redhat Minimum Installation Enterprise Edition * *
1, Xshell ssh link redhat, and switch to the root account (follow-up operations are performed in the Xshell interface)
#这个比较简单, General redhat SSH boot, ps command can be directly viewed
Last Login:tue Nov 09:59:08 from **********supassword:ps-e|grep ssh 1674? 00:00:00 sshd 5814? 00:00:00 sshd 5818? 00:00:00 sshd
2, win host open Http://mirrors.163.com/centos/7/os/x86_64/Packages/,Ctrl+F find wget and download to local, direct link: wget-1.14-10.el7_0.1.x86_ 64.rpm
3. Use WINSCP to log in as root Redhat
4. Upload the downloaded wget-1.14-10.el7_0.1.x86_64.rpm to the/tmp directory
5, installation wget
CD/TMPRPM-IVH wget-1.14-10.el7_0.1.x86_64.rpm
6. Uninstall the Yum that comes with Redhat
Rpm-qa | grep Yum | Xargs rpm-e--nodeps
Note: A, xargs is a common command for UNIX and UNIX-like operating systems. It does this by converting the argument list to small pieces to pass to other commands to avoid the problem of too long argument lists
b 、--nodeps forced unloading, regardless of dependencies
7, download the CentOS Yum installation package, the path with 2, you can directly use the following links
wget Http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpmwget/HTTP Mirrors.163.com/centos/7/os/x86_64/packages/yum-3.4.3-125.el7.centos.noarch.rpmwget http://mirrors.163.com/ Centos/7/os/x86_64/packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpmwget http://mirrors.163.com/centos/7/os/ x86_64/packages/yum-plugin-fastestmirror-1.1.31-29.el7.noarch.rpm
Note: The installation package is constantly updated, please match the package name itself, currently available 2015-11.
8. Install the above download package
RPM-IVH PYTHON-INIPARSE-0.4-9.EL7.NOARCH.RPMRPM-IVH YUM-METADATA-PARSER-1.1.4-10.EL7.X86_64.RPMRPM-IVH yum-3.4.3-125.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-29.el7.noarch.rpm
[note]: The last 2 need to be installed together, or there will be a dependency error
9, download the repo file, pay attention to switch directory
Of course you can simply, copy the repo in 10 directly and create a new *******.repo file in the YUM.REPOS.D directory
Cd/etc/yum.repos.d/wget Http://mirrors.163.com/.help/CentOS7-Base-163.repo
10. Edit the Centos7-base-163.repo file and change the $releasever to the CentOS version number 7
This step is recommended to download to this machine, use Notepad or Notepad to open a key replacement, and then use WINSCP to upload to Redhat
Repo reference:
# centos-base.repo## the mirror system uses the connecting ip Address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client. you should use this for centos Updates# unless you are manually picking other mirrors.## if the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead.##[base]name= centos-7 - base - 163.com#mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$ basearch&repo=osbaseurl=http://mirrors.163.com/centos/7/os/$basearch/gpgcheck=1gpgkey=http:// Mirrors.163.com/centos/rpm-gpg-key-centos-7#released updates[updates]name=centos-7 - updates - 163.com#mirrorlist=http:// Mirrorlist.centos.org/?release=7&arch= $basearch &repo=updatesbaseurl=http://mirrors.163.com/centos/7/ updates/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7#additional packages that may be useful[extras]name=centos-7 - extras - 163.com#mirrorlist =http://mirrorlist.centos.org/?release=7&arch= $basearch &repo=extrasbaseurl=http://mirrors.163.com/ centos/7/extras/$basearch/gpgcheck=1gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7#additional Packages that extend functionality of existing packages[centosplus]name=centos-7 - plus - 163.combaseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/gpgcheck= 1enabled=0gpgkey=http://mirrors.163.com/centos/rpm-gpg-key-centos-7
11. Yum Clean all clears the original cache
12. Yum Makecache get Yum list
The following prompt indicates that the Yum change is complete:
Metadata Cache Created
13. Yum Repolist can view the source data
yum repolistrepo id repo name status!base/x86_64 CentOS-7 - Base - 163.com 8,652!extras/x86_64 CentOS-7 - Extras - 163.com 275!updates/x86_64 CentOS-7 - Updates - 163.com 1,707repolist: 10,634
Accessories: Repo7
This article is from the "Wang Xiaofu Diary" blog, make sure to keep this source http://wangn.blog.51cto.com/10410653/1711306
REDHAT7 Replace Centos7 Yum source