Tag: yum
-
yum 安装报错 error: rpmdb: BDB0113 Thread/process 8487/139945176586304 failed: BDB1507 Thread died in Berkeley DB library
error: rpmdb: BDB0113 Thread/process 8487/139945176586304 failed: BDB1507 Thread died in Berkeley DB libraryerror: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recoveryerror: cannot open Packages index using db5 – (-30973)error: cannot open Packages database in /var/lib/rpmCRITICAL:yum.main: Error: rpmdb open failed 原因是RPM数据库被破坏,重建数据库后恢复正常:cd /var/lib/rpm/for i in ls | grep ‘db.’;do mv $i $i.bak;donerpm –rebuilddbyum clean…
-
Centos/AS4U8系统使用代理上网 yum的代理设置
1.打开/etc/yum.conf 配置文件进行编辑 在后面添加以下内容(ip号+端口后无认证连接) proxy=http://192.168.5.100:8086 如果需要认证连接则输入以下内容 proxy=http://192.168.5.100:8086 proxy_username=代理服务器用户名 proxy_password=代理服务器密码 那怎么设置全局代理上网呢? 以上只是针对某些软件代理而已。 打开etc/skel/.bash_profile进行编辑 http_proxy=http://192.168.5.100:8080 https_proxy=http://192.168.5.100:8080 export http_proxy https_proxy 执行source etc/skel/.bash_profile马上更新 执行wget http://www.baidu.com执行测试
-
yum 设置代理
如果只是暂时使用代理,在命令行输入下面一条命令: export http_proxy=”http://192.168.1.1:61500″ export https_proxy=”http://192.168.1.1:61500″ 对于长久使用代理的情况: yum里面可以单独设置代理 就是yum源的参数加proxy=“http://ip:PORT” 即在/etc/yum.conf中加入下面几句. proxy=http://192.168.1.1:61500 proxy_username=username proxy_password=password 另外: /root/.bashrc中加入: export http_proxy=”http://username:password@192.168.1.1:61500″ 如果是通过ip或电脑的网卡地址认证,可忽略所有username 和 password . 注:停止使用代理的时候,要把改过的文件改成原样.尤其是如果使用了export http_proxy=”http://192.168.1.1:61500″命令, 要在命令行输入: unset http_proxy ,去除环境变量. 因为export http_proxy=”http://192.168.1.1:61500″这条命令的实质是把export后面的设置写进环境设置文件中. 输入env 可以看所有的环境变量设置. env >env.txt 可以把环境变量输出到env.txt中,然后打开看也可以. unset 变量 可以取消曾经设过的环境变量.
-
centos更新为aliyun的yum源
CentOS 1、备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 或者 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 3、之后运行yum makecache生成缓存
-
Centos利用第三方yum源安装rpm软件包
CentOS自带的yum源中rpm包数量有限,很多时候找不到我们需的软件包,(例如:要安装网络连接查看软件iftop,默认设置下无法使用yum命令安装),下面教大家在CentOS 6.2中(以32位系统为例,64位系统安装方法一样),使用第三方yum源来安装更多软件包。 一、安装CentOS yum源优先级插件yum-priorities yum install yum-priorities #输入y安装二、设置CentOS默认yum源的优先级为最高系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接 cd /etc/yum.repos.d/ #进入yum源目录 vi CentOS-Base.repo #在[base]、[updates]、[extras]组下面添加priority=1,在[centosplus]、[contrib]组下面添加priority=2################################################################ [base]name=CentOS-$releasever – Basemirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=1 [updates]name=CentOS-$releasever – Updatesmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=1 [extras]name=CentOS-$releasever – Extrasmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=1 [centosplus]name=CentOS-$releasever – Plusmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=2 [contrib]name=CentOS-$releasever – Contribmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6priority=2############################################################### 备注:priority的优先级为1到99,设置为1即优先级最高,1-10为系统保留,第三方yum源的优先级从11-99三、安装epel yum源 rpm -ivh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 vi /etc/yum.repos.d/epel.repo #修改epel yum源优先级,priority=11 ############################################################### [epel]name=Extra Packages for Enterprise Linux 6 – $basearch#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearchmirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearchfailovermethod=priorityenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6priority=11#################################################################四、安装rpmforge yum源 wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt …