CentOS安装gcc clang mysql高版本

CentOS安装gcc clang git mysql等软件高版本福利

最近同事需要在单位提供的开发机上临时安装gcc等软件,时间紧迫,因此向其推荐安装福利devtoolset.
感谢devtoolset,使得CentOS软件安装无比的快捷,卸载也是无与伦比的简单.

gcc 7.3.1安装

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install devtoolset-7

# 3. Start using software collections:
$ scl enable devtoolset-7 bash

注意事项:

  • 安装devtoolset后,需要使用scl enable devtoolset-7 bash启动devtoolset(gcc版本为7.3.1);
  • 启动devtoolset后仅针对本次会话有效,若退出登陆或者下线重启后,需要再次激活devtoolset.

Mysql 8.0安装

# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection
$ sudo yum install rh-mysql80

# 3. Start using the software collection:
$ scl enable rh-mysql80 bash

安装完成后,Mysql 8.0就已经作为常规应用安装完毕,以下为操作范例:

sudo systemctl start rh-mysql80-mysqld
mysql

clang 安装

subscription-manager repos --enable rhel-7-server-devtools-rpms
yum install llvm-toolset-7

#激活clang并检查版本,clang相关依赖已经全部安装了
scl enable llvm-toolset-7 'clang -v'

通过以上操作,可以发现通过devtoolset安装软件无比方便.
不想使用的时候,退出当前会话,就可以恢复默认配置.适合开发快速安装完环境跑路...
devtoolset提供了很多软件的安装,需要你详细摸索了.

PS:
如果您觉得我的文章对您有帮助,可以扫码领取下红包,谢谢!

猜你喜欢

转载自www.cnblogs.com/jason1990/p/10132430.html