Home Operation and Maintenance CentOS How to add NetEase 163 source in CentOS6

How to add NetEase 163 source in CentOS6

Mar 10, 2021 pm 03:33 PM
centos 6

The following tutorial column from centos will introduce to you how to add NetEase 163 source in CentOS 6. I hope it will be helpful to friends in need!

CentOS 6 Add NetEase 163 source

Reference website http://mirrors.163.com/.help/centos.html

1. First back up CentOS -Base.repo, if the 163 source has not been added before, this step can be omitted

cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.backup
Copy after login

2. Download the 163 source

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
Copy after login

3. Change the downloaded file to the source file

mv CentOS6-Base-163.repo CentOS-Base.repo
Copy after login

4. Run the following command to generate the cache

yum clean all
yum makecache
Copy after login

yum makecache may have the following error:

Loaded plugins: refresh-packagekit, security
http://mirrors.163.com/centos/6Server/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL
ERROR 22 -"The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please
verify its path and try again
Copy after login

We try to enter http://mirrors .163.com/centos...
The result is still: 404 Not Found

At this time we entered http://mirrors.163.com/centos/ and found: there are 6 6.0-6.8 in the directory directory, there is no 6Server directory. Guess $releasever was incorrectly compiled to: 6Server; it should be 6.4 in the correct case. (Mine is CentOs6.4)

We need to modify all $releasever in CentOS-Base.repo to 6.4:

vi CentOS-Base.repo
# 在末行模式下执行以下:
:%s/$releasever/6.4        # Esc -> Shift+: 进入末行模式
# 修改完保存退出:Esc -> Shift+: -> wq
Copy after login

Rerun

yum makecache
Copy after login

Haha, maybe An error similar to the previous one still occurs, as follows:

Loaded plugins: refresh-packagekit, security
http://mirrors.163.com/centos/6.4/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL
ERROR 22 -"The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please
verify its path and try again
Copy after login

Enter http://mirrors.163.com/centos/ again and find that there are only readme files in the 6.4 directory, while there are complete files in the 6 directory. . So we need to modify it again: change all 6.4 to 6 (if you are afraid of the trouble of modifying each one, you can re-download the source file) as follows:

rm -rf CentOS-Base.repo         # 先删除6.4的源文件
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo    # 把下载文件改成源文件
mv CentOS6-Base-163.repo CentOS-Base.repo
yum clean all
yum makecache
Copy after login

Done! ! ! ! !

The above is the detailed content of How to add NetEase 163 source in CentOS6. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How do I configure log rotation in CentOS? How do I configure log rotation in CentOS? Mar 17, 2025 pm 04:43 PM

The article explains how to configure log rotation in CentOS using logrotate, detailing installation, configuration, and benefits like disk space management and security.

How do I install and configure MySQL/MariaDB on CentOS? How do I install and configure MySQL/MariaDB on CentOS? Mar 17, 2025 pm 04:35 PM

Article discusses installation, configuration, and troubleshooting of MySQL/MariaDB on CentOS, including system requirements and security measures.(159 characters)

How do I use Logical Volume Management (LVM) in CentOS to manage storage? How do I use Logical Volume Management (LVM) in CentOS to manage storage? Mar 17, 2025 pm 04:51 PM

The article discusses using Logical Volume Management (LVM) in CentOS for efficient storage management, detailing steps for setup, extension, and backup/restore processes, and highlighting LVM's advantages over traditional partitioning.

How do I manage system services with systemd in CentOS? How do I manage system services with systemd in CentOS? Mar 17, 2025 pm 04:38 PM

The article explains how to manage system services using systemd on CentOS, covering starting, stopping, enabling at boot, and troubleshooting services.

How to Build a High-Concurrency Application with CentOS and PHP-FPM? How to Build a High-Concurrency Application with CentOS and PHP-FPM? Mar 12, 2025 pm 06:19 PM

This article details building high-concurrency PHP-FPM applications on CentOS. It addresses key issues like server configuration (hardware, PHP-FPM settings, load balancing), caching, database optimization, code efficiency, and resource monitoring.

What Are the Best Ways to Handle Backup and Disaster Recovery on CentOS? What Are the Best Ways to Handle Backup and Disaster Recovery on CentOS? Mar 12, 2025 pm 06:21 PM

This article details CentOS backup and disaster recovery (DR) best practices. It emphasizes a multi-faceted approach encompassing regular backups (full, incremental, differential), offsite storage, and rigorous testing. High availability clustering

How do I monitor system performance in CentOS using tools like top, htop, and vmstat? How do I monitor system performance in CentOS using tools like top, htop, and vmstat? Mar 17, 2025 pm 04:41 PM

The article discusses monitoring CentOS system performance using top, htop, and vmstat, detailing their features, differences, and customization for effective system analysis.

How do I set up a firewall in CentOS using firewalld? How do I set up a firewall in CentOS using firewalld? Mar 17, 2025 pm 04:44 PM

The article provides a comprehensive guide on setting up and managing firewalld on CentOS, including installation, enabling, basic commands, and troubleshooting steps.

See all articles