# Install RedHat 8.7 minimal server with: #yum -y groupinstall "Server with GUI" \ #yum -y groupinstall "Graphical Administrator Tools" \ yum -y groupinstall "Minimal Install" \ "Compatibility Libraries" \ "Development Tools" \ "Legacy UNIX Compatibility" \ "System Administration Tools" rpm -qa | wc -l :648 yum -y install bc bind-utils binutils curl dump elfutils-libelf elfutils-libelf-devel expect fio gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers iftop iperf3 ksh libaio libaio-devel libcap libcap-devel libgcc libnsl libstdc++ libstdc++-devel mailx make ncurses ncurses-devel net-tools nfs-utils redhat-lsb-core rsync setools-console sysstat traceroute unixODBC unixODBC-devel unzip wget xfsdump xorg-x11-xauth xterm zip rpm -q bc bind-utils binutils curl dump elfutils-libelf elfutils-libelf-devel expect fio gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers iperf3 iftop ksh libaio libaio-devel libcap libcap-devel libgcc libnsl libstdc++ libstdc++-devel mailx make ncurses ncurses-devel net-tools nfs-utils redhat-lsb-core rsync setools-console sysstat traceroute unixODBC unixODBC-devel unzip wget xfsdump xorg-x11-xauth xterm zip rpm -qa | wc -l :682 # Install i7z git clone https://github.com/ajaiantilal/i7z.git cd i7z make && make installr cp -p i7z /usr/sbin/i7z cd .. rm -rf i7z # 2022/12/19 System disk info df -Th | egrep 'sed|xfs|fat|nfs|iso' Filesystem Type Size Used Avail Use% Mounted on /dev/sdb2 xfs 135G 1.4G 134G 1% / # Raid for mirror /dev/sdb1 vfat 1022M 9.9M 1013M 1% /boot/efi /dev/sda1 xfs 1.1T 60G 1.1T 6% /backup # Raid for striping /dev/sdc1 xfs 298G 60G 239G 20% /mnt # USB external disk # 2022/12/19 Unzip root & oracle files # yum -y install libaio # For sqlplus execute id oracle groupmod -n oinstall oracle groupadd -g 1001 dba groupadd -g 1002 oper usermod -G 10,1000,1001,1002 oracle id oracle uid=1000(oracle) gid=1000(oinstall) groups=1000(oinstall),10(wheel),1001,1002 tar -zxvf /backup/src/root.tgz -C /root/ tar -zxvf /backup/src/oracle.tgz -C /home/oracle/ tar -zxvf /backup/src/ora12cClient.tgz -C /u01/ ############################################################################## exit ############################################################################## yum --skip-broken -y install fio fio --randrepeat=1 \ --ioengine=libaio \ --direct=1 \ --gtod_reduce=1 \ --name=fiotest \ --filename=testfio \ --bs=4k \ --iodepth=64 \ --size=8G \ --readwrite=randrw \ --rwmixread=75 # Install for GUI server yum -y groupinstall "Server with GUI" \ "Compatibility Libraries" \ "Development Tools" \ "Graphical Administration Tool" \ "Legacy UNIX Compatibility" \ "Office Suite and Productivity" \ "System Administration Tools" \ "System Management" systemctl get-default systemctl --type=target --all systemctl set-default graphical.target reboot # Config home environment scp -rp 172.16.53.203:.ssh . rm -f .ssh/known* scp -rp 172.16.53.203:bin . scp -rp 172.16.53.203:kway/.bash_profile . scp -rp 172.16.53.203:kway/oraconf.tar /tmp/. su - oracle -c "tar -xvf /tmp/oraconf.tar" rm -f /home/oracle/.ssh/known* scp -rp 172.16.53.203:/etc/hosts.deny /etc/. scp -rp 172.16.53.203:kway/motd/motd.178 /etc/motd # Config for security cat /etc/selinux/config sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config firewall-cmd --state firewall-cmd --permanent --add-port=1521/tcp firewall-cmd --reload firewall-cmd --list-all systemctl stop firewalld.service systemctl disable firewalld.service systemctl stop libvirtd.service systemctl disable libvirtd.service cat /etc/default/grub sed -i 's/quiet/quiet ipv6.disable=1/' /etc/default/grub grub=`find /boot -name grub.cfg` grub2-mkconfig -o $grub cat /proc/cmdline # Config hosts list host=`hostname -s` ip=`ifconfig -a|grep -w inet|grep 172.16|awk '{print $2}'` cat>>/etc/hosts<>/etc/fstab</etc/yum.repos.d/local.repo<>/etc/sysctl.conf<>/etc/security/limits.conf<>/etc/pam.d/login<>/etc/profile<$HOME/dbOper< rpm -qa|grep postgre postgresql13-server-13.11-2PGDG.rhel8.x86_64 postgresql13-contrib-13.11-2PGDG.rhel8.x86_64 postgresql13-devel-13.11-2PGDG.rhel8.x86_64 postgresql13-libs-13.11-2PGDG.rhel8.x86_64 postgresql13-13.11-2PGDG.rhel8.x86_64 root@rhel8 ~> ssh 172.16.53.188 "rpm -qa|grep postgre" postgresql13-contrib-13.11-2PGDG.rhel8.x86_64 postgresql13-server-13.11-2PGDG.rhel8.x86_64 postgresql13-libs-13.11-2PGDG.rhel8.x86_64 postgresql13-13.11-2PGDG.rhel8.x86_64 postgresql13-devel-13.11-2PGDG.rhel8.x86_64 /usr/pgsql-13/bin/postgresql-13-setup initdb ls /var/lib/pgsql/13/data/ systemctl list-unit-files | grep postgresql systemctl enable --now postgresql-13 systemctl status postgresql-13 su - postgres postgres# psql -c "alter user postgres with password 'login123'" vi /var/lib/pgsql/13/data/postgresql.conf # line 59 listen_addresses = '172.16.53.188' vi /var/lib/pgsql/13/data/pg_hba.conf # Accept from anywhere (not recommended) host all all 0.0.0.0/0 md5 # Accept from trusted subnet (Recommended setting) host all all 172.16.53.0/24 md5 firewall-cmd --permanent --add-port=5432/tcp firewall-cmd --reload systemctl restart postgresql-13 psql -h 172.16.53.188 -p 5432 -U postgres -d postgres alter user postgres set search_path="$user", xbosschema; C:\Windows\System32> psql -h 172.16.53.219 -p 5432 -U postgres -d postgres psql (13.10, server 13.11) Type "help" for help. postgres=# select inet_server_addr(); inet_server_addr ------------------ 172.16.53.219 (1 row) postgres=# \q wget https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-8-x86_64/pldebugger_13-1.5-1.rhel8.x86_64.rpm yum -y localinstall pldebugger_13-1.5-1.rhel8.x86_64.rpm vi /var/lib/pgsql/13/data/postgresql.conf shared_preload_libraries = '$libdir/plugin_debugger.so' psql CREATE EXTENSION pldbgapi; CREATE EXTENSION "uuid-ossp"; select uuid_generate_v4(); select * from pg_extension; select * from pg_available_extensions;