• 配置新linux系统


    一、配置yum源
    1.卸载现有的yum,检查自带的yum
    [root@localhost ~]# rpm -qa | grep yum
    yum-langpacks-0.4.2-7.el7.noarch
    yum-3.4.3-150.el7.noarch
    yum-rhn-plugin-2.0.1-6.el7.noarch
    yum-utils-1.1.31-40.el7.noarch
    yum-metadata-parser-1.1.4-10.el7.x86_64

    2.卸载自带yum
    [root@localhost ~]# rpm -e yum-langpacks-0.4.2-7.el7.noarch --nodeps
    warning: /etc/yum/pluginconf.d/langpacks.conf saved as /etc/yum/pluginconf.d/langpacks.conf.rpmsave
    [root@localhost ~]# rpm -e yum-3.4.3-150.el7.noarch --nodeps
    [root@localhost ~]# rpm -e yum-rhn-plugin-2.0.1-6.el7.noarch --nodeps
    [root@localhost ~]# rpm -e yum-utils-1.1.31-40.el7.noarch --nodeps
    [root@localhost ~]# rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64 --nodeps

    3.重新下载
    [root@localhost yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
    [root@localhost yum]# wget http://vault.centos.org//centos/7.3.1611/os/x86_64/Packages/yum-updateonboot-1.1.31-40.el7.noarch.rpm
    [root@localhost yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-utils-1.1.31-40.el7.noarch.rpm
    [root@localhost yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
    [root@localhost yum]# wget http://vault.centos.org/centos/7.3.1611/os/x86_64/Packages/yum-3.4.3-150.el7.centos.noarch.rpm

    4.rpm安装
    [root@localhost yum]# rpm -ivh yum-*
    warning: yum-3.4.3-150.el7.centos.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
    Preparing... ################################# [100%]
    Updating / installing...
    1:yum-metadata-parser-1.1.4-10.el7 ################################# [ 20%]
    2:yum-plugin-fastestmirror-1.1.31-4################################# [ 40%]
    3:yum-3.4.3-150.el7.centos ################################# [ 60%]
    4:yum-updateonboot-1.1.31-40.el7 ################################# [ 80%]
    5:yum-utils-1.1.31-40.el7 ################################# [100%]

    5.配置repo

    [root@localhost yum]# vim /etc/yum.repos.d/CentOS-Base.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-$7 - Base - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
    baseurl=http://mirrors.163.com/centos/7/os/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #released updates
    [updates]
    name=CentOS-$7 - Updates - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
    baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$7 - Extras - 163.com
    #mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
    baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
    gpgcheck=1
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$7 - Plus - 163.com
    baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
    

    6.清除缓存
    [root@linuxidc ~]# yum clean all
    Loaded plugins: fastestmirror, product-id, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    Cleaning repos: base extras updates
    Cleaning up everything

    7.测试安装是否正常
    yum -y install lftp

    Installed:
      lftp.x86_64 0:4.4.8-8.el7_3.2                                         
      Complete! 
    

    二、安装gcc
    yum -y install gcc

    三、安装readline-devel和zlib
    yum -y install -y readline-devel
    yum -y install zlib-devel

    RedHat 7 关闭防火墙: systemctl stop firewalld.service

    错误:

    1.error:could not find m4 that supports 下载:http://ftp.gnu.org/gnu/m4

    2.make: pg_config: Command not found 执行:yum install postgresql-devel

    3.error: could not open extension control file "/usr/local/pgsql/share/extension/file_fdw.control": no such file or directory
    cd /usr/local/pgsql/contrib/file_fdw make&&make install

  • 相关阅读:
    散列表(Hash Table)
    MVC中TextBox事件
    AJAX控制DropDownList两级联动
    唯一标示
    检查对象属性是否有空值
    foreach枚举div控制单个显示
    JS获取DropDownList其中一项的文本值
    随便
    MVC常用
    不可用输入框
  • 原文地址:https://www.cnblogs.com/cchilei/p/12746171.html
Copyright © 2020-2023  润新知