Background: When building a software environment, you need to download the installation files first. Many software default sources are abroad, and the download speed is slow. In order to improve deployment efficiency, we often need to modify the software default source to be the Chinese source first. In addition, **if the server is Tencent Cloud Yes, the source can also use Tencent's intranet domain name, which is faster (note that the URL of Tencent's intranet domain name, please use http, use https is not accessible, external domain names http and https can be used) **, see the official website documentation for details :
https://cloud.tencent.com/document/product/213/8623
Common pip, maven, npm, docker, mariadb, rubygems, etc. have configuration instructions on this document. In addition, here are some common software source configuration/modification methods or supplements:
**Please refer to **https://cloud.tencent.com/developer/article/1601851
The domain name golang.google.cn is resolved to the country, and the URL https://golang.google.cn/dl/ is faster to download
Change the source to China (choose 1 from n)
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
composer config -g repos.packagist composer http://mirrors.cloud.tencent.com/composer/
composer config -g repo.packagist composer http://pkg.phpcomposer.com/
composer config -g repos.packagist composer http://php.cnpkg.org/
composer config -g repos.packagist composer http://mirrors.aliyun.com/composer/
Reference https://cloud.tencent.com/developer/article/1598544
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
Reference http://mirrors.tencent.com/help/maven.html
Visit http://mirrors.tencent.com/ and search for "View" on the right side of the maven point. The accessed file is http://mirrors.tencent.com/help/maven.html
In the middle of the document, I emphasized it again: Please use http for the URL of Tencent's intranet domain name. It cannot be accessed using https. The external domain name http and https are ok, mirrors.cloud.tencent.com or mirrors.tencent.com can
Run the following command
npm config set registry http://mirrors.tencent.com/npm/
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
**cd /tmp && wget -q http://mirrors.tencentyun.com/install/softinst.sh && chmod +x softinst.sh && ./softinst.sh **
Currently, the public mirrors on the live network (except the public mirrors that have been eliminated and offline) are supported as shown in the following figure. The support is not complete, and needs to be more comprehensive. The requirements have been raised and need to be evaluated
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
Visit http://mirrors.tencent.com/ to search mongodb and click "View" on the right. The accessed file is http://mirrors.tencent.com/help/mongodb.html. This document is not as fine as that of Tsinghua Yuan. Optimization requirements have been mentioned and need to be evaluated
Tsinghua source document: http://mirror.tuna.tsinghua.edu.cn/help/mongodb/
linux php:http://mirrors.sohu.com/php/
windows php:https://windows.php.net/downloads/releases/archives/
http://mirrors.sohu.com/nginx/
Execute the following command to create the nginx.repo file under /etc/yum.repos.d/
vi /etc/yum.repos.d/nginx.repo
Press "i" to switch to edit mode and write the following.
[nginx]
name=nginx repo
baseurl=https://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1
Press "Esc", enter ":wq!", save the file and return.
Execute the following command to install Nginx.
yum install nginx
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
http://mirrors.tencent.com/mysql/yum/
Install mysql referencehttps://cloud.tencent.com/developer/article/1625458
Replace the download address of the .noarch.rpm file with the Tencent address
http://mirrors.tencent.com/mariadb/yum/
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
vim /etc/yum.repos.d/mariadb.repo
Add the following
[ mariadb]
name = MariaDB
** baseurl = http://mirrors.tencent.com/mariadb/yum/10.4/centos7-amd64/**
gpgkey=http://mirrors.tencent.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1
Installation: yum install -y mariadb-server mariadb-client
Add startup items and start services
systemctl enable mariadb
systemctl start mariadb
The focus is baseurl, according to your own system version and required mariadb version from http://mirrors.tencent.com/mariadb/yum/
**If you want to use the official source of mariadb, choose the appropriate url from **http://yum.mariadb.org/ (the official source of mariadb is from abroad, it’s slower to visit in China, but Tencent source can Configure intranet domain name, faster)
In addition, you need to be reminded that the password is empty after mariadb is installed, and the command to set the password is "mysqladmin -uroot -p password password" and press Enter twice.
11、 apache source##
http://mirrors.tencent.com/apache/
When downloading wget, use this source faster. If the server is Tencent Cloud, the source can also replace the public domain name with Tencent's intranet domain name, which is faster
http://mirrors.tencent.com/centos/
If the server is Tencent Cloud, the source can also replace the public domain name with Tencent intranet domain name, which is faster
①Back up the old configuration files of the system
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
②Enter the folder where the yum source configuration file is located
[ root@linux ~]# cd /etc/yum.repos.d/
③Download the yum source configuration file of mirrors.cloud.tencent.com to the above folder
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos5_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos6_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos8_base.repo
④Update the cache
yum clean all
yum makecache
yum -y update pkgname
http://mirrors.tencent.com/gnu/
When downloading wget, use this source faster. If the server is Tencent Cloud, the source can also replace the public domain name with Tencent's intranet domain name, which is faster
14、 For other sources, please visit http://mirrors.tencent.com/ to view the software source list. If there is no source you want, you can leave a message and we will internally evaluate whether it is new
Recommended Posts