排错思路及解决方法

1、查看防火墙和SELinux是否关闭

[root@localhost ~]# systemctl status firewalld.service 
● firewalld.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
[root@localhost ~]# getenforce 
Disabled

2、查看ftp服务器是否允许匿名用户访问

[root@localhost ~]# vim /etc/vsftpd/vsftpd.conf 
anonymous_enable=YES
anon_root=/datadir
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
local_root=/datadir

3、查看数据目录是否为yum源,repomd.xml文件是否正确

[root@localhost software]# cd rpms/gluster/repodata/
[root@localhost repodata]# ll
total 52
-rw-r--r-- 1 root root  2684 Jan  8 19:02 03842bda5553361d6d7ef88b707cdce79b6f91a62990c73674e10c6f8b49e5e7-other.xml.gz
-rw-r--r-- 1 root root  6227 Jan  8 19:02 099862bb8d5b27db75956cf7c067ed6e9939537f6ebdc3122a50b334bf33606f-filelists.sqlite.bz2
-rw-r--r-- 1 root root  4833 Jan  8 19:02 7fcc603925df2407df979db769418380c14a8e0671ec5cdcd909b168c22a3486-other.sqlite.bz2
-rw-r--r-- 1 root root  3056 Jan  8 19:02 99fdc90c301af866f88539c0c14b85f7f604fe219f6e6fa50f7700457f06e44e-filelists.xml.gz
-rw-r--r-- 1 root root  4773 Jan  8 19:02 bd2c142371a0182f16822f73ab40481ee2b991aa896dadcc09232e183f846741-primary.xml.gz
-rw-r--r-- 1 root root 12670 Jan  8 19:02 f29760a617f6580200360f789e55ba9e56cf135a188716dd25c2e51f9206e594-primary.sqlite.bz2
-rw-r--r-- 1 root root  2976 Jan  8 19:02 repomd.xml
[root@localhost repodata]# pwd
/datadir/software/rpms/gluster/repodata

4、此时测试在浏览器或者本地用户是否能登录服务器进行下载操作

5、查看客户端软件仓库是否有问题,格式是否正确

                注意:ftp服务器URL地址中,IP地址最后一个 / 即为数据目录地址,不要写错(找到错误改正即可)

[glusterfs]
name=glusterfs
baseurl=ftp://192.168.152.10/software/rpms/gluster/        
enabled=1
gpgcheck=0

6、重新测试是否能安装glusterfs-server,可正常安装


Installed:
  glusterfs-server.x86_64 0:3.12.15-1.el7                         

Dependency Installed:
  attr.x86_64 0:2.4.46-13.el7                                     
  glusterfs.x86_64 0:3.12.15-1.el7                                
  glusterfs-api.x86_64 0:3.12.15-1.el7                            
  glusterfs-cli.x86_64 0:3.12.15-1.el7                            
  glusterfs-client-xlators.x86_64 0:3.12.15-1.el7                 
  glusterfs-fuse.x86_64 0:3.12.15-1.el7                           
  glusterfs-libs.x86_64 0:3.12.15-1.el7                           
  libtirpc.x86_64 0:0.2.4-0.15.el7                                
  rpcbind.x86_64 0:0.2.0-47.el7                                   
  userspace-rcu.x86_64 0:0.10.0-3.el7                             

Complete!

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐