Installing Oracle Linux 7(.5)
1) dist\V975367-01.iso
Set right timeZone. Add additional language, keyboard. Set Network: server name, right ip4, ip6. Choose Minimal Install. Enable KDUMP. Choose "Common Profile for General-purpose Systems" (Everything OK). Part disk (standard or LVM schema): /boot(1GB), swap(RAM*2 = 2GB), / - rest space or optionally + /home + encrypted luks partition e.g. /srv/www/encrypted_project
UNDER root:
2) yum install deltarpm
3) useradd wu (work user)
4) passwd wu
5) ip address show
6) yum update
7) /usr/bin/ol_yum_configure.sh (if corresponding message appears during update process)
8) reboot
9) yum install kernel-devel
10) yum install kernel-uek-devel
11) yum install nano
12) nano /etc/ssh/sshd_config
Change port to #newport, PermitRootLogin -> no, AllowUsers wu
13) yum install policycoreutils-python
14) semanage port -a -t ssh_port_t -p tcp #newport
15) firewall-cmd --permanent --zone=public --add-port=#newport/tcp
16) firewall-cmd --reload
16') check open ports: firewall-cmd --list-all
16'') close port: firewall-cmd --permanent --zone=public --remove-port=#newport/tcp
17) systemctl restart sshd.service
18) visudo
Press 'i'. Then add:
Defaults timestamp_timeout=720
wu ALL=(ALL) ALL
Press ESC and then ':wq'
19) For english (Servet OS language) in Terminal (Client OS language) change this
line in /etc/ssh/sshd_config:
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGE
||
||
\/
AcceptEnv LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
(i.e. remove LANG)
20) yum install wget
21) yum install htop (from EPEL)
22) yum install gcc
23)
If you configure swap files or partitions on an SSD, reduce the tendency of the kernel to perform anticipatory writes to swap, which is controlled by the value of the vm.swappiness kernel parameter and displayed as /proc/sys/vm/swappiness. The value of vm.swappiness can be in the range 0 to 100, where a higher value implies a greater propensity to write to swap. The default value is 60 (30!!!). The suggested value when swap has been configured on SSD is 1. You can use the following commands to change the value:
# echo "vm.swappiness = 1" >> /etc/sysctl.conf
# sysctl -p
...
vm.swappiness = 1
https://docs.oracle.com/cd/E52668_01/E54669/html/section_h4v_3yt_tr.html
24) UNDER wu:
add umask 0027 in ~/.bashrc (then source ~/.bashrc) for default rw-r----- for files and drwxr-x--- for dirs
25)