search
HomeOperation and MaintenanceCentOSHow to add NetEase 163 source in CentOS6

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

2. Download the 163 source

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

3. Change the downloaded file to the source file

mv CentOS6-Base-163.repo CentOS-Base.repo

4. Run the following command to generate the cache

yum clean all
yum makecache

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

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

Rerun

yum makecache

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

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

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
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
CentOS: The Choice for Server EnvironmentsCentOS: The Choice for Server EnvironmentsMay 09, 2025 am 12:21 AM

CentOS is widely selected as a server operating system because it is stable, secure and free. 1.CentOS is based on RHEL, providing enterprise-level stability and a life cycle of up to 10 years. 2. It has rich software packages and strong community support. 3. Simple installation, use yum management software package, and intuitive configuration. 4. Improve server management efficiency through command line tools, regular backups and log management. 5. Optimize server performance by adjusting kernel and network parameters.

The Future of CentOS: What's Next?The Future of CentOS: What's Next?May 08, 2025 am 12:01 AM

CentOS will continue to develop through CentOSStream in the future. CentOSStream is no longer a direct clone of RHEL, but is part of RHEL development. Users can experience the new RHEL functions in advance and participate in development.

CentOS: From Development to Production EnvironmentsCentOS: From Development to Production EnvironmentsMay 07, 2025 am 12:08 AM

The transition from development to production in CentOS can be achieved through the following steps: 1. Ensure the consistent development and production environment, use the YUM package management system; 2. Use Git for version control; 3. Use Ansible and other tools to automatically deploy; 4. Use Docker for environmental isolation. Through these methods, CentOS provides powerful support from development to production, ensuring the stable operation of applications in different environments.

CentOS Stream: The Successor and its ImplicationsCentOS Stream: The Successor and its ImplicationsMay 06, 2025 am 12:02 AM

CentOSStream is a cutting-edge version of RHEL, providing an open platform for users to experience the new RHEL functions in advance. 1.CentOSStream is the upstream development and testing environment of RHEL, connecting RHEL and Fedora. 2. Through rolling releases, users can continuously receive updates, but they need to pay attention to stability. 3. The basic usage is similar to traditional CentOS and needs to be updated frequently; advanced usage can be used to develop new functions. 4. Frequently asked questions include package compatibility and configuration file changes, and requires debugging using dnf and diff. 5. Performance optimization suggestions include regular cleaning of the system, optimizing update policies and monitoring system performance.

CentOS: Examining the Reasons Behind the End of LifeCentOS: Examining the Reasons Behind the End of LifeMay 04, 2025 am 12:12 AM

The reason for the end of CentOS is RedHat's business strategy adjustment, community-business balance and market competition. Specifically manifested as: 1. RedHat accelerates the RHEL development cycle through CentOSStream and attracts more users to participate in the RHEL ecosystem. 2. RedHat needs to find a balance between supporting open source communities and promoting commercial products, and CentOSStream can better convert community contributions into RHEL improvements. 3. Faced with fierce competition in the Linux market, RedHat needs new strategies to maintain its leading position in the enterprise-level market.

The Reasons for CentOS's Shutdown: A Detailed AnalysisThe Reasons for CentOS's Shutdown: A Detailed AnalysisMay 03, 2025 am 12:05 AM

RedHat shut down CentOS8.x and launches CentOSStream because it hopes to provide a platform closer to the RHEL development cycle through the latter. 1. CentOSStream, as the upstream development platform of RHEL, adopts a rolling release mode. 2. This transformation aims to enable the community to get exposure to new RHEL features earlier and provide feedback to accelerate the RHEL development cycle. 3. Users need to adapt to changing systems and reevaluate system requirements and migration strategies.

CentOS: The Advantages of Using This Linux DistroCentOS: The Advantages of Using This Linux DistroMay 02, 2025 am 12:10 AM

CentOS stands out among enterprise Linux distributions because of its stability, security, community support and enterprise application advantages. 1. Stability: The update cycle is long and the software package has been strictly tested. 2. Security: Inherit the security features of RHEL, update and announce in a timely manner. 3. Community support: a huge community and detailed documentation to respond to problems quickly. 4. Enterprise applications: Support container technologies such as Docker, suitable for modern application deployment.

Comparing CentOS Replacements: Features and BenefitsComparing CentOS Replacements: Features and BenefitsMay 01, 2025 am 12:05 AM

Alternatives to CentOS include AlmaLinux, RockyLinux, and OracleLinux. 1.AlmaLinux provides RHEL compatibility and community-driven development. 2. RockyLinux emphasizes enterprise-level support and long-term maintenance. 3. OracleLinux provides Oracle-specific optimization and support. These alternatives have similar stability and compatibility to CentOS, and are suitable for users with different needs.

See all articles

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software