Cloud server JAVA operating environment construction (2) - replace the yum source in the server
In China, it is recommended to replace the yum source with Ali's. The specific operation steps are as follows
1. Backup the original yum source
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2. Download the new CentOS-Base.repo to /etc/yum.repos.d/, different operating systems need to call different commands
Cent OS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
Cent OS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Cent OS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3. Generate cache
yum makecache
4. Common commands of yum, these commands will be used later
search yum search xxx
install yum install xxx
uninstall yum remove xxx
related articles
1. Cloud server environment construction (1) - use putty or SecureCRT to connect to the server
2. Cloud server environment construction (2) - Replace the yum source in the server
3. Cloud server environment construction (3) - Install JDK
4. Cloud server environment construction (4) - install MySQL and related configuration
5. Cloud server environment construction (5) - install Tomcat and related configuration
6. Cloud server environment construction (6) - install Nginx and related configuration