Linux更换yum源

Linux更换yum源,第1张

有时候CentOS默认的yum源不一定是国内镜像,导致yum在线安装及更新速度不是很理想。这时候需要将yum源设置为国内镜像站点。国内主要开源的开源镜像站点应该是网易和阿里云了。

[wujiahao@479832222 ~]# mv /etc/yumreposd/CentOS-Baserepo /etc/yumreposd/CentOS-Baserepobackup

[wujiahao@479832222 ~]]# cd /etc/yumreposd/

[wujiahao@479832222 yumreposd]# wget >因之前通过网易的 centos 镜像,将阿里云的 centos 升级到最新版了,乘自己的项目尚未开始正式开发,遂将所有的相应环境都升级到最高。
查看 centos 版本
[root@iZ23d ~]# cat /etc/centos-release
CentOS Linux release 721511 (Core)
1、删除之前的 php 版本:
[root@iZ23d ~]# yum remove php php-common
Loaded plugins: langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
No Match for argument: php-5416
No Match for argument: php-5416targz
No Match for argument: php-701RC1
No Match for argument: php-701RC1targz
No Match for argument: phpMyAdmin-440targz
No Match for argument: php-common
No Packages marked for removal
2、rpm 安装 Php7 相应的 yum源:
[root@iZ23d ~]# rpm -Uvh >一开始执行yum install -y dos2unix,报找不到这个包的错误,那我猜想可能是我配置的yum源出了问题了,所以我重新配置了yum源,配置的是阿里云yum源:
1、先备份之前的yum配置(要养成修改前备份的习惯)
mkdir /tmp/yumbak
mv /etc/yumreposd/ /tmp/yumbak
2、wget >

1 linux的常用软件安装

配置阿里云的yum源

1) 安装wget

2)下载yum源的配置文件

3) 替换原有的yum源

4) 更新现有yum

5) 安装常用软件

2 linux的JDK安装

此处我们选用 jdk18_144这个版本作为我们的基础JDK,此处要切记一点的是18的不同版本JDK在配置上会有很大的出入,所以请不要随便更换基础的JDK版本,否则你会很尴尬!

使用 rz 上传jdk到root的家目录

使用rpm命令安装jdk

配置jdk的环境变量

刷新环境变量

到此 JDK安装完成

3 安装MySQL前说明

本例安装MySQL版本是 57

4 linux 在线安装MySQL

用root用户安装

1)获取mysql 源安装包

wget >

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13371289.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-23
下一篇 2023-07-23

发表评论

登录后才能评论

评论列表(0条)

保存