跳转到主要内容

Linux

opensuse安装virtualbox

故障描述

  无

故障分析

  无

处理过程

1、进入“安装/移除软件”,并输入root密码

2、搜索virtualbox。

3、选中virtualbox(基础)和virtualbox-qt(界面)

4、点接入安装。

5、进入Yast/安全和用户/用户和组管理。

6、选中你要使用virtualbox的用户>编辑>细节>附加的组先中vboxusers>确定。

7、重启opensuse登陆即可使用virtualBox

建议/总结

  无

Centos 删除图形界面后无法登陆

故障描述

  客户安装Centos后默认安装有图形界面,客户删除图形界面后启动不提示登录。但可以用ssh或telnet登录。

故障分析

  无

处理过程

1、ssh登陆服务器

2、修改/etc/inittab 文件,将id:5:initdefault:(默认的 run level 等级为 5,即图形界面改为3即纯文本环境)

3.保存文件后重启系统你就可以看见是启动的文本界面了。

建议/总结

  无

Linux选用国内163镜像

故障描述

  Linux国外源速度较慢。如何使用国内源。

故障分析

  无

处理过程

  建议使用国内163镜像。

登陆http://mirrors.163.com/。查看每个版本对应的使用方法。以下以Centos为例

1、首先备份/etc/yum.repos.d/CentOS-Base.repo

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

3、运行以下命令生成缓存

    yum clean all
    yum makecache
建议/总结

  无

Centos 7.0 iptables服务管理

故障描述

  Centos7.0使用service iptables restart提示错误

[root@FileServer etc]# service iptables restart
Redirecting to /bin/systemctl restart  iptables.service
Failed to issue method call: Unit iptables.service failed to load: No such file or directory.

故障分析

  无

处理过程

  Iptables默认没有安装服务。

yum -y install iptables-services

[root@FileServer etc]# service iptables start
Redirecting to /bin/systemctl start  iptables.service

建议/总结

  无

Linux添加FTP用户设置为/bin/false无法登陆

故障描述

[root@Radius ftp]# useradd -d /home/huawei -g ftp -s /bin/false huawei
[root@Radius ftp]#passwd huawei
[root@Radius ftp]# passwd huawei
更改用户 huawei 的密码 。
新的 密码:
重新输入新的 密码:
passwd: 所有的身份验证令牌已经成功更新。
[root@Radius ftp]# ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (127.0.0.1:root): huawei
331 Please specify the password.
Password:
530 Login incorrect.
ftp>

故障分析

  [root@Radius ftp]# tail /var/log/secure
Sep 11 10:16:39 radius proftpd[11888]: localhost (192.168.1.199[192.168.1.199]) - USER huawei (Login failed): Invalid shell: '/bin/false'
Sep 11 10:16:56 radius proftpd[11889]: localhost (192.168.1.199[192.168.1.199]) - USER huawei (Login failed): Invalid shell: '/bin/false'
Sep 11 10:23:53 radius proftpd[12044]: localhost (192.168.1.199[192.168.1.199]) - USER huawei (Login failed): Invalid shell: '/bin/false'

上述错误日志确定为用户shell为/bin/false后,用户无法登陆FTP,vsftpd默认会检查用户的shell,如果用户的shell在/etc/shells没有记录,则无法登陆ftp

处理过程

 1.在/etc/shells中添加一行"/bin/false";
2.重启vsftpd服务。

[root@Radius opt]# vi /etc/shells

/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
/bin/false

 

建议/总结

  无

Ruby Gem 提示OpenSSL错误

故障描述

  Ruby用安装提示无法加载Openssl

gem install rails -v 3.2.17
ERROR:  Loading command: install (LoadError)
        cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

故障分析

  无

处理过程

  进入到ruby源码包的所在路径,然后进入ext/openssl,执行:
sudo ruby extconf.rb,

make  

make install

建议/总结

  无

如何启用EPEL库For Rhel/Centos 5,6

故障描述

Yum安装Enablerepo时提示epel不可用。

yum --enablerepo=epel
Error getting repository data for epel, repository not found

故障分析

  无

处理过程

RHEL/CentOS 6 32-64 Bit

## RHEL/CentOS 6 32-Bit ## #

#wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

## RHEL/CentOS 6 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
RHEL/CentOS 5 32-64 Bit

## RHEL/CentOS 5 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

## RHEL/CentOS 5 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm

RHEL/CentOS 4 32-64 Bit

## RHEL/CentOS 4 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

## RHEL/CentOS 4 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm

 

建议/总结

  无