Centos7下用lnmp一键包启动后报错 start apache... [Sat Apr 11 16:37:39.208150 2020] [:crit] [pid 27716] (38)Function not implemented: AH00141: Could not initialize random number generator
报这个错是因为centos内核太低了。需要升级centos7内核。
用以下命令升级内核
rpm -import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum -y --enablerepo=elrepo-kernel install kernel-ml.x86_64 kernel-ml-devel.x86_64
内核升级完成后要调整启动顺序
1、查看内核启动顺序
[root@localhost lnmp1.7]# awk -F\' '$1=="menuentry " {print $2}' /etc
grub2.cfg
CentOS Linux (5.6.3-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-15739e762162496598fdf3c3eb4eaa7b) 7 (Core)
[root@localhost lnmp1.7]#新内核顺序为0 2、修改内核启动顺序为0vi /etc/default/grub`

GRUB_DISTRIBUTOR="(seds,release.(sed 's, release .*,,g' /etc/system-release)"
GRUB_DEFAULT=0
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
3、接着用命令来创建内核配置
grub2-mkconfig -o /boot/grub2/grub.cfg
[root@localhost lnmp1.7]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.6.3-1.el7.elrepo.x86_64
Found initrd image: /boot/initramfs-5.6.3-1.el7.elrepo.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-327.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-327.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-15739e762162496598fdf3c3eb4eaa7b
Found initrd image: /boot/initramfs-0-rescue-15739e762162496598fdf3c3eb4eaa7b.img
done
最后重启
然后重新安装lnmpa