User Tools

Site Tools


linux:redhat

Differences

This shows you the differences between two versions of the page.


Next revision
linux:redhat [2020/07/28 16:54] – external edit 127.0.0.1
Line 1: Line 1:
 +====== Redhat / Centos on server ======
  
 +===== Set Localization =====
 +<code>localectl list-locales
 +localectl set-locale LANG=en_US.UTF-8
 +</code>
 +
 +===== Rename ethX network =====
 +
 +<code>/etc/udev/rules.d/70-persistent-net.rules</code>
 +
 +===== Kernel limits =====
 +
 +<code>
 +fs.aio-max-nr = 1048576
 +fs.file-max = 6815744
 +fs.inotify.max_user_watches=524288
 +fs.inotify.max_user_instances = 1024
 +kernel.sem = 250 320000 100 1280
 +kernel.shmmax = 4398046511104
 +kernel.shmmni = 4096
 +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
 +net.ipv4.tcp_challenge_ack_limit = 1048576 // CVE-2016-5389
 +</code>
 +
 +===== File limits =====
 +<code>/etc/security/limits.d/90-nproc.conf</code>
 +* soft nofile 102400\\
 +* hard nofile 102400\\
 +* soft nproc 10240\\
 +* hard nproc 10240\\
 +
 +[[http://wiki.janforman.com/proxmox#set_ulimit|set_ulimit]]
 +
 +/etc/pam.d/common-session\\
 +/etc/pam.d/common-session-noninteractive\\
 +/etc/pam.d/login
 +<code>
 +session required pam_limits.so
 +</code>
 +
 +===== Systemd =====
 +<code>LimitNOFILE=10000</code>
 +
 +===== Change IO Scheduler =====
 +/boot/grub/grub.conf
 +<code>
 +title Red Hat Enterprise Linux Server (2.6.18-8.el5)
 + root (hd0,0) 
 + kernel /vmlinuz-2.6.18-8.el5 ro root=/dev/sda2 elevator=deadline
 + initrd /initrd-2.6.18-8.el5.img
 +</code>
 +
 +===== Disable Hugepage =====
 +<code>cat /sys/kernel/mm/transparent_hugepage/enabled</code>
 +grub.conf
 +<code>transparent_hugepage=never</code>
linux/redhat.txt · Last modified: 2023/04/26 11:53 by Jan Forman