Linux常见问题及解决错误

更新时间:2023-07-05 18:21:43 阅读: 评论:0

1.locate无法查询文件,提示locate:can no stat () `/var/lib/mlocate/mlocate.db':no such file or director
解决方法:
使用updatedb命令更新一下数据库即可
2.修改f中的监听端口为8081,然后重启httpd服务,提示错误
解决办法:
整人方法
1.设置色Linux的模式为宽容模式(permissive)
1)查看linux的模式:getenforce
2)查看linux的政策(Policy):status
3)修改linux的模式:tenforce
a) 0:转成permissive宽容模式;
b) 1:转成enforcing强制模式;
4)重启httpd服务
5)如果防火墙没有开放TCP8081端口,需要使用iptables添加端口准入
6)重启失效,需要重新设置,或者将SELinux设置为永久宽容模式,但是不建议这样设置,于系统造成不安全
2.设置SELinux中允许http的服务的允许端口为需要的端口---待完善
3.重启http的服务提示Starting httpd: httpd: Could not reliably determine the rver's fully qualified domain name, using localhost.localdomain for ServerName
解决办法:----截图另做
1)修改/etc/httpd/f
#vi /etc/httpd/f
....
      #:80
      ServerName localhost:80
四川的旅游景点
....
2)重启httpd服务
#rvice httpd restart
4.Samba服务共享目录成功,但是目录中没有文件,只能看见目录名称,共享配置如下
[share]
path=/home/share
browable=yes
public=yes
解决办法:
由于SELinux上下文设置出错,不允许共享文件
1)关闭linux
2)修改上下文
5.FTP下载失败文件失败
1)从windows上的cmd中使用ftp连接到linux服务器中,然后可以正常下载所需文件;
2)从linux上使用ftp命令连接到linux服务器中,可以正常切换目录,但是使用ls命令时不能正常显示该目录下所有文件,提示错误信息是“ftp: connect: No route to host”;
3)检查ftp服务状态,两部linux服务器的ftp服务都已开启,且端口21都是出于listen状态;
犬瘟热初期治疗
4)检查防火墙状态,ftp客户端一方的服务器防火墙关闭,目标服务器防火墙打开;
5)把防火墙关闭后,linux ftp客户端可以正常从目标服务器中下载所需文件
6.修改时区,当前时区为PDT,需要修改为CST
解决办法:
1)修改/etc/sysconfig/clock文件
[root@ticom ~]# vi /etc/sysconfig/clock
[root@ticom ~]# more /etc/sysconfig/clock
ZONE="Asia/Shanghai"
2)删除/etc/localtime文件
[root@ticom etc]# rm -f localtime
3)连接时区设置文件到/etc/localtime
[root@ticom etc]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
4)重启主机即可
[root@ticom etc]# init 6
车保7.与主机网络正常,但是无法使用ssh远程连接Linux主机
原因:ssh服务所使用的部分文件权限错误,导致服务无法正常使用
解决办法:
1)重启sshd服务,查找是哪些文件权限更改导致无法正常使用ssh服务
[root@localhost network-scripts]# rvice sshd restart
18洞高尔夫Stopping sshd:                                            [  OK  ]
Starting sshd: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@        WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/etc/ssh/ssh_host_rsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@        WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/etc/ssh/ssh_host_dsa_key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key
Could not load host key: /etc/ssh/ssh_host_dsa_key
/var/empty/sshd must be owned by root and not group or world-writable.
                                                          [FAILED]
2)根据提示权限错误修改部分文件权限
[root@localhost network-scripts]# cd /etc/ssh/
[root@localhost ssh]# ls
moduli      ssh_host_dsa_key      ssh_host_key.pub
ssh_config  ssh_host_dsa_key.pub  ssh_host_rsa_key
滑板一年摔死多少人
sshd_config  ssh_host_key          ssh_host_rsa_key.pub简约简历模板
[root@localhost ssh]# ll
total 156
-rwxrwxrwx. 1 root root 125811 Nov 13  2014 moduli
-rwxrwxrwx. 1 root root  2047 Nov 13  2014 ssh_config
-rwxrwxrwx. 1 root root  3879 Nov 13  2014 sshd_config
-rwxrwxrwx. 1 root root    668 Nov 17  2014 ssh_host_dsa_key
-rwxrwxrwx. 1 root root    590 Nov 17  2014 ssh_host_dsa_key.pub
-rwxrwxrwx. 1 root root    963 Nov 17  2014 ssh_host_key
-rwxrwxrwx. 1 root root    627 Nov 17  2014 ssh_host_key.pub
-rwxrwxrwx. 1 root root  1675 Nov 17  2014 ssh_host_rsa_key
-rwxrwxrwx. 1 root root    382 Nov 17  2014 ssh_host_rsa_key.pub
波的干涉[root@localhost ssh]# chmod -R 700 ./*
[root@localhost ssh]# ll
total 156
-rwx------. 1 root root 125811 Nov 13  2014 moduli
-rwx------. 1 root root  2047 Nov 13  2014 ssh_config
-rwx------. 1 root root  3879 Nov 13  2014 sshd_config
-rwx------. 1 root root    668 Nov 17  2014 ssh_host_dsa_key
-rwx------. 1 root root    590 Nov 17  2014 ssh_host_dsa_key.pub
-rwx------. 1 root root    963 Nov 17  2014 ssh_host_key
-rwx------. 1 root root    627 Nov 17  2014 ssh_host_key.pub
-rwx------. 1 root root  1675 Nov 17  2014 ssh_host_rsa_key
-rwx------. 1 root root    382 Nov 17  2014 ssh_host_rsa_key.pub

本文发布于:2023-07-05 18:21:43,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1069124.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:文件   服务   使用   端口   目录   模式   权限   防火墙
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图