CentOS 5.7执行yum 命令安装goaccess出现http://mirrors.aliyun.com/centos/5/updates/x86_64/repodata/repomd.xml

CentOS 5.7执行yum 命令安装goaccess出现http://mirrors.aliyun.com/centos/5/updates/x86_64/repodata/repomd.xml 404错误。
原因是5.7版本已经比较老了,国内镜像文件已经关闭或者不支持更新,但目前该台服务器升级系统目前困难,需要安装配置服务比较多。

修改CentOS-Base.repo

文件完整路径/etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
    http://vault.centos.org/5.7/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-5

#released updates 
[updates]
name=CentOS-$releasever - Updates
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
        http://vault.centos.org/5.7/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
        http://vault.centos.org/5.7/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
        http://vault.centos.org/5.7/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
        http://vault.centos.org/5.7/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-5
http://mirrors.aliyuncs.com/centos/RPM-GPG-KEY-CentOS-5

修改epel.reop

文件完整路径/etc/yum.repos.d/epel.reop

[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
baseurl=http://mirrors.aliyun.com/epel/5/$basearch
        http://mirrors.aliyuncs.com/epel/5/$basearch
        http://archives.fedoraproject.org/pub/archive/epel/5/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
baseurl=http://mirrors.aliyun.com/epel/5/$basearch/debug
        http://mirrors.aliyuncs.com/epel/5/$basearch/debug
        http://archives.fedoraproject.org/pub/archive/epel/5/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5
gpgcheck=0

[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
baseurl=http://mirrors.aliyun.com/epel/5/SRPMS
        http://mirrors.aliyuncs.com/epel/5/SRPMS
        http://archives.fedoraproject.org/pub/archive/epel/5/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5
gpgcheck=0

其它错误

[root@iZwz97 wwwlogs]# goaccess -f access.log -a > report.html
Parsing... [0] [0/s]
GoAccess - version 1.2 - Jul 23 2017 03:23:42
Config file: /etc/goaccess.conf

Fatal error has occurred
Error occured at: src/parser.c - parse_log - 2705
No time format was found on your conf file.

解决方法

在/etc/goaccess.conf结尾加上

time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

其他国内yum源列表如下

1. 企业贡献:

搜狐开源镜像站:http://mirrors.sohu.com/
网易开源镜像站:http://mirrors.163.com/

2. 大学教学:

北京理工大学:

http://mirror.bit.edu.cn (IPv4 only)
http://mirror.bit6.edu.cn (IPv6 only)

北京交通大学:

http://mirror.bjtu.edu.cn (IPv4 only)
http://mirror6.bjtu.edu.cn (IPv6 only)
http://debian.bjtu.edu.cn (IPv4+IPv6)

兰州大学:

http://mirror.lzu.edu.cn/

厦门大学:

http://mirrors.xmu.edu.cn/

清华大学:

http://mirrors.tuna.tsinghua.edu.cn/ (IPv4+IPv6)
http://mirrors.6.tuna.tsinghua.edu.cn/ (IPv6 only)
http://mirrors.4.tuna.tsinghua.edu.cn/ (IPv4 only)

天津大学:

http://mirror.tju.edu.cn/

中国科学技术大学:

http://mirrors.ustc.edu.cn/ (IPv4+IPv6)
http://mirrors4.ustc.edu.cn/
http://mirrors6.ustc.edu.cn/

东北大学:

http://mirror.neu.edu.cn/ (IPv4 only)
http://mirror.neu6.edu.cn/ (IPv6 only)

电子科技大学:

http://ubuntu.uestc.edu.cn/

你可能感兴趣的:(Server)