centos集群5 常见出错的配置

本文介绍了如何在CentOS系统中进行配置优化,包括关闭sendmail功能、解决YUM源问题及提高系统的随机数生成效率等内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

关闭sendmail的功能:

[root@xiaohuai]# echo "unset MAILCHECK" >> /etc/profile  
[root@xiaohuai]# source /etc/profile

yum错误 先关闭 fastestmirror

“vi /etc/yum/pluginconf.d/fastestmirror.conf” and set “enable=0″

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
yum makecache  //生成缓存
yum update

Not enough random bytes available问题解决

用kernel...src.rpm包解压出来的spec文件rpmbuild的时候很容易出现
Not enough random bytes available,Please do some other work to give the OS a chance to collect more entropy
这个问题的原因是因为系统/dev/random没有足够的可用空间,解决方法我找到一篇老外的文章这么写的:
How to increase entropy pool on a 2.6 kernel RHEL/Fedora system without keyboard/mouse.

A good source of entropy is needed for random number generation. This affects services that go via SSL amongst other things. In 2.6 kernels the entropy sources of a system are keyboard, mouse and some IRQ interrupts.

There are two random number sources on linux - /dev/random and /dev/urandom. /dev/random will block if there is nothing left in the entropy bit bucket. If your system does not have keyboard and mouse, you can use 'rngd' daemon to perform the task.

You can see the entropy valu using following command.
#cat /proc/sys/kernel/random/entropy_avail

Now, start the 'rngd' daemon using following command and monitor the entropy on the system.
#rngd -r /dev/urandom -o /dev/random -f -t 1
#watch -n 1 cat /proc/sys/kernel/random/entropy_avail

The 'rngd' daemon is installed by 'kernel-utils' package in RHEL 4 and 'rng-utils' package on RHEL 5.

其实就是在redhat安装iso文件中找到rng-utils包装上去,然后按照上面的方法运行rngd即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值