使用rngd进程增加熵的实际操作过程

[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# yum install rng-tools
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * centos-sclo-rh: mirrors.cn99.com
 * centos-sclo-sclo: mirrors.cn99.com
base                                                                                                                                                                              | 3.6 kB  00:00:00     
centos-sclo-rh                                                                                                                                                                    | 3.0 kB  00:00:00     
centos-sclo-sclo                                                                                                                                                                  | 3.0 kB  00:00:00     
epel                                                                                                                                                                              | 4.7 kB  00:00:00     
extras                                                                                                                                                                            | 2.9 kB  00:00:00     
updates                                                                                                                                                                           | 2.9 kB  00:00:00     
Package rng-tools-6.3.1-5.el7.x86_64 already installed and latest version
Nothing to do
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# cat /proc/sys/kernel/random/entropy_avail
140
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# cat /usr/lib/systemd/system/rngd.service
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon

[Service]
ExecStart=/sbin/rngd -f

[Install]
WantedBy=multi-user.target
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# vi /usr/lib/systemd/system/rngd.service
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# 
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# 
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# cat /usr/lib/systemd/system/rngd.service
[Unit]
Description=Hardware RNG Entropy Gatherer Daemon

[Service]
ExecStart=/sbin/rngd -f -r /dev/urandom -o /dev/random

[Install]
WantedBy=multi-user.target
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# systemctl daemon-reload
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# systemctl enable rngd.service
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# systemctl start rngd.service
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# cat /proc/sys/kernel/random/entropy_avail
3080
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# cat /etc/redhat-release 
CentOS Linux release 7.7.1908 (Core)
[root@iZm5ehqfjhnsbtxrzrnh2zZ ~]# 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值