libstdc++-devel \
libxcb \
make \
smartmontools \
sysstat
(2)修改内核参数
cp /etc/sysctl.conf /etc/sysctl.conf_bak_20200327
vi /etc/sysctl.conf ##添加如下内容
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 33554432
kernel.shmmax = 137438953471
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
修改后执行 sysctl -p
(3)禁用防火墙和 selinux
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
systemctl status NetworkManager.service
##从 RHEL7 开始,使用 systemctl 工具来管理服务程序,包括了 service 和 chkconfig
以下是一些常用命令
systemctl list-unit-files|grep enabled
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service;echo $?
查看已启动的服务列表:systemctl list-unit-files|grep enabled
[root@fs-3z3-vm0326 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are
protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
(4)配置 host
评论