Linux
Linux集群SSH免密登陆
无
无
Linux集群规模20台,需相互间免密登陆。
先选择一台主机保存所有主机的密钥,然后将密钥复制到所有主机。
1.登陆每台主机创建ssh.pub:
[root@master-1 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa
Your public key has been saved in /root/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:Z0rzrrX1DA+Yjw6S9iFnoGQfQc9NVn1PXEXHohC/gno root@jumpserver
The key's randomart image is:
+---[RSA 3072]----+
| . +o.. +B|
| . o +.. o *|
| . o .... +.|
| . . .. .|
| o o S + . |
| o o * * + |
| . B E = + |
| . B = = * |
| oo= . + |
+----[SHA256]-----+
2. 每台主机执行ssh-copy-id root@master-1复制到Master-1
3.登陆Master-1将密码复制到所有主机:
scp .ssh/authorized_keys root@master-2:/root/ssh.txt
scp .ssh/authorized_keys root@master-3:/root/ssh.txt
scp .ssh/authorized_keys root@node-1:/root/ssh.txt
....
4.登陆每台主机,将ssh.txt追加到.ssh/authorized_keys即可。
cat /root/ssh.txt >> /root/.ssh/authorized_keys
无
如何处理Redhat及CentOS虚拟机关机时卡住
按照操作系统缺省配置的Red Hat Enterprise Linux 4.4 (32位及64位)或者CentOS 4.4 (32位及64位)系统虚拟机,在优雅关机时,概率性出现卡住的问题,表现为连接VNC花屏。如图1所示。
图1 CentOS 4.4 64位系统优雅关机卡住界面
无
关闭系统的电源管理服务acpid。
在Red Hat Enterprise Linux 4.4 (32位及64位)或者CentOS 4.4 (32位及64位)系统中,关闭电源管理服务acpid的操作方法如下:
(1) 在Linux终端中执行命令,关闭acpid服务。
chkconfig acpid off
(2) 重启虚拟机,使修改生效。
Red Hat Enterprise Linux 4.4 (32位及64位)和CentOS 4.4 (32位及64位)系统的电源管理模块在内核启动过程中默认进行加载,但该模块在低版本的Linux内核中存在缺陷,会导致虚拟机关机概率性卡死。
configure nginx提示PCRE和SSL错误
Linux configure nginx提示如下错误
./configure: error: the HTTP rewrite module requires the PCRE library.
无
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/data/nginx
make
make install
无
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国外源速度较慢。如何使用国内源。
无
无
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
无
Centos 7最小安装没有ifconfig
Centos 7.0最小安装成功后。没有ifconfig
无
mini安装后默认没有ifconfig。请执行yum -y install net-tools 安装网络工具!
同时建议安装
yum -y install zip unzip wget make
安装zip,unzip,wget,make
无