你好,游客 登录 注册 搜索
背景:
阅读新闻

基于RHEL 6.8操作系统搭建开发环境

[日期:2017-04-07] 来源:Linux社区  作者:Linux [字体: ]

本文讲述了基于RHEL 6.8操作系统搭建开发环境,主要安装了GCC 4.9.3Qt 5.7Apache 2.4.25MySQL 5.6.35。本文同时适用于在Linux主机无互联网环境下搭建开发环境,只需要将所需安装包下载后拷贝到Linux主机即可。

一、RHEL6.8安装

1、RHEL 6.8下载

下载RHEL 6.8安装包:rhel-server-6.8-x86_64-dvd.iso

2RHEL 6.8安装

安装过程中选择Development Tools安装包,安装GCC编译环境。也可以在建立RHEL 6.8本地仓库后使用命令行进行安装,命令行安装如下:

    yum groupinstall "Development Tools"

二、yum源更换

1、删除RHELyum

A、查看RHEL 6.8版本自带的yum

        rpm -qa|grep yum

RHEL 6.8版本的yum包如下:

    PackageKit-yum-0.5.8-26.el6.x86_64

    yum-3.2.29-73.el6.noarch

    PackageKit-yum-plugin-0.5.8-26.el6.x86_64

    yum-metadata-parser-1.1.2-16.el6.x86_64

    yum-utils-1.1.30-37.el6.noarch

    yum-rhn-plugin-0.9.1-60.el6.noarch

    yum-plugin-security-1.1.30-37.el6.noarch

B强制删除RHEL 6.8版本的yum

    rpm -qa|grep yum|xargs rpm -e --nodeps

2、下载CentOS yum安装包

CentOS yum包下载地址http://mirrors.163.com/centos/

        wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

3、安装CentOS yum

安装CentOS yum包命令如下:

    rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
    rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm

或使用

    rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-3.2.29-73.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm --force --nodeps

4、修改yum源配置文件

新建CentOS6-Base-163.repo文件,内容如下:

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#

[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

将其他的RedHat.reporhel-media.repo备份为.bak文件

清楚缓存:yum clean all

加载缓存:yum makecache

更新软件:yum update

文档可以到Linux公社资源站下载:

------------------------------------------分割线------------------------------------------

免费下载地址在 http://linux.linuxidc.com/

用户名与密码都是www.linuxidc.com

具体下载目录在 /2017年资料/4月/7日/基于RHEL 6.8操作系统搭建开发环境/

下载方法见 http://www.linuxidc.com/Linux/2013-07/87684.htm

------------------------------------------分割线------------------------------------------

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-04/142603.htm

linux
相关资讯       RHEL 6.8 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款