INSTALANDO FERRAMENTAS
yum install rsync wget nfs-utils
CONFIGURANDO IDIOMA DO SISTEMA OPERACIONAL
dnf install langpacks-en glibc-all-langpacks -y
localectl status
localectl set-locale LANG=pt_BR.UTF-8
INSTALANDO O POSTGRESQL 15
cd /usr/local/src
sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
sudo dnf update -y
sudo dnf install postgresql15-server -y
sudo /usr/pgsql-15/bin/postgresql-15-setup initdb
sudo systemctl start postgresql-15
sudo systemctl enable postgresql-15
sudo systemctl status postgresql-15
INSTALANDO PACOTES ADICIONAIS DO POSTGRES E REQUISITOS
dnf config-manager –enable crb
dnf install perl-IPC-Run
sudo dnf install postgresql15-contrib
sudo dnf install postgresql15-devel
CONFIGURANDO LIBS E PATH
vi /etc/profile.d/postgresql.sh
export PATH=/usr/pgsql-15/bin:$PATH
export LD_LIBRARY_PATH=/usr/pgsql-15/lib:$LD_LIBRARY_PATH
export PGDATA=/dados/pgdata
chmod 755 /etc/profile.d/postgresql.sh
source /etc/profile.d/postgresql.sh
INSTALANDO ORACLE_FDW
sudo dnf makecache –refresh
sudo dnf -y install libnsl
cd /usr/local/src
yum install libaio
yum install wget
rpm -i oracle-instantclient19.5-basic-19.5.0.0.0-1.x86_64.rpm
rpm -i oracle-instantclient19.5-devel-19.5.0.0.0-1.x86_64.rpm
rpm -i oracle-instantclient19.5-tools-19.5.0.0.0-1.x86_64.rpm
wget https://github.com/laurenz/oracle_fdw/archive/master.zip
mv master.zip oracle_fdw.zip
unzip oracle_fdw.zip
cd oracle_fdw-master/
ls -l /usr/include/oracle/
OPCAO 1:
cp Makefile orig_makefile
sed -i ‘s/19.6/19.5/g’ Makefile
OPCAO 2:
#add the following to Makefile yourself:
To PG_CPPFLAGS add
-I/usr/include/oracle/XX.X/client64
, and to SHLIB_LINK add
-L/usr/lib/oracle/XX.X/client64/lib.
make
make install
INSTALANDO TDS-FDW
cd /usr/local/src
sudo yum install epel-release
#sudo sudo dnf -qy module disable postgresql
dnf install tds_fdw_15
CONFIGURANDO SSH PASSWORDLESS
ssh-keygen -b 4096
ssh-copy-id user@remote-host-ip-address
INSTALANDO ZABBIX AGENT
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-6.0-4.el9.noarch.rpm
dnf clean all
dnf install zabbix-agent
systemctl restart zabbix-agent
systemctl enable zabbix-agent
POSTGRES UPGRADE
pg_ctl promote
pg_ctl stop master
pg_ctl stop slave
time /usr/pgsql-15/bin/pg_upgrade –old-bindir=/usr/pgsql-12/bin –new-bindir=/usr/pgsql-15/bin –check –old-datadir=/dados/pgdata –new-datadir=/dados/pgdata_15 > /tmp/pgupgrade.log 2>&1