You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/bash
- MY_PARAM=${1:-0}
-
- ####################################################################
-
- red=`tput setaf 1`
- green=`tput setaf 2`
- reset=`tput sgr0`
-
- ####################################################################
-
- if [[ $EUID -ne 0 ]]; then
- echo "${red}This script must be run as root${reset}"
- exit 1
- fi
-
- mkdir /tmp/fix-oracle7/
-
- ####################################################################
-
- echo "${green}Fix-Oracle7 script started.${reset}"
- echo -e "\n\n\n"
- echo "${green}Performing fixation tasks.${reset}"
- sleep 2
- echo -e "\n\n\n"
-
- ####################################################################
-
- if [[ $MY_PARAM -le 0 ]]
- then
- echo "${green}Starting to remove old yum repository${reset}"
-
- rm -rvf /etc/yum.repos.d/* 2> /tmp/fix-oracle7/oldRepo.log
- # Removing the existin yum repository
-
- if [[ $? -ne 0 ]]; then
- echo "${red}ERROR...! yum repo deletion not possible, please check the /tmp/fix-oracle7/oldRepo.log file for the logs and run the command again after correction.${reset}"
- exit 1
- else
- echo "${green}Yum repositories deleted successfully${reset}"
- echo -e "\n\n\n"
- fi
- fi
-
- ####################################################################
-
- if [[ $MY_PARAM -le 2 ]]
- then
- echo "${green}Restoring Oracle7 repositories${reset}"
-
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/public-yum-ol7.repo --output /etc/yum.repos.d/public-yum-ol7.repo
- # Fixing Oracle 7 repository
-
- if [[ $? -ne 0 ]]; then
- echo "${red}ERROR...! Please restart the script with argument '2' as Oracle7 repo can't be downloaded..${reset}"
- exit 1
- else
- echo "${green}Oracle7 repository successfully restored${reset}"
- echo -e "\n\n\n"
- fi
- fi
-
- ####################################################################
-
- yum remove -y AmeyOS6-patcher-5-5.x86_64 apr-util-ldap-1.3.9-3.el6_0.1.x86_64 avahi-compat-libdns_sd-0.6.25-17.el6.x86_64 cloog-ppl-0.15.7-1.2.el6.x86_64 cracklib-python-2.8.16-4.el6.x86_64 crmsh-1.2.6-5.1.x86_64 freetds-0.91-2.el6.x86_64 gamin-python-0.1.10-9.el6.x86_64 gd-devel-2.0.35-11.el6.x86_64 gnome-themes-2.28.1-7.el6.noarch hal-info-20090716-5.el6.noarch libXdmcp-devel-1.1.1-3.el6.x86_64 libproxy-bin-0.3.0-10.el6.x86_64 libproxy-python-0.3.0-10.el6.x86_64 newt-devel-0.52.11-4.el6.x86_64 pacemaker-libs-1.1.18-3.el6.x86_64 perl-Crypt-PasswdMD5-1.3-6.el6.noarch perl-Net-Telnet-3.03-11.el6.noarch perl-String-CRC32-1.4-9.el6.x86_64 perl-YAML-Syck-1.07-4.el6.x86_64 ppl-0.10.2-11.el6.x86_64 pssh-2.3.1-5.el6.noarch pulseaudio-esound-compat-0.9.21-26.el6.x86_64 python-argparse-1.2.1-2.1.el6.noarch python-iwlib-0.1-1.2.el6.x86_64 python-psutil-0.6.1-1.el6.x86_64 pyxf86config-0.3.37-7.1.el6.x86_64 readahead-1.5.6-2.el6.x86_64 setools-3.3.7-4.el6.x86_64 setools-gui-3.3.7-4.el6.x86_64 setools-libs-tcl-3.3.7-4.el6.x86_64 slang-devel-2.2.1-1.el6.x86_64 system-config-firewall-tui-1.2.27-7.2.el6_6.noarch system-gnome-theme-60.0.2-1.el6.noarch tigervnc-server-module-1.1.0-24.el6.x86_64 udisks-1.0.1-11.el6.x86_64 xz-lzma-compat-4.999.9-0.5.beta.20091007git.el6.x86_64 esound-libs-0.2.41-3.1.el6.x86_64 esound-tools-0.2.41-3.1.el6.x86_64 xorg-x11-drv-ati-firmware-7.6.1-4.el6.noarch lldpad-libs-0.9.46-10.el6_8.x86_64
-
- ####################################################################
-
- yum install -y openssh*
-
- yum install -y php
-
- yum update -y
-
- ####################################################################
-
- systemctl enable --now sshd
-
- ####################################################################
-
- mkdir /tmp/postgres
-
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-contrib-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-contrib-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-debuginfo-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-debuginfo-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-devel-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-devel-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-docs-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-docs-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-libs-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-libs-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-plpython-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-plpython-10.17-1PGDG.rhel7.x86_64.rpm
- curl https://dms-git.ameyo.net:8265/UpgradeOStoOracle/OracleLinux/raw/branch/master/Packages/postgresql10-server-10.17-1PGDG.rhel7.x86_64.rpm --output /tmp/postgres/postgresql10-server-10.17-1PGDG.rhel7.x86_64.rpm
-
- yum localinstall -y /tmp/postgres/postgres*
-
- sed -i '89 s/exit 1/PGDATA=\/var\/lib\/pgsql\/10\/data\//' /usr/pgsql-10/bin/postgresql-10-setup
- /usr/pgsql-10/bin/postgresql-10-setup initdb
- sed -i s/ident/trust/g /var/lib/pgsql/10/data/pg_hba.conf
- sed -i s/peer/trust/g /var/lib/pgsql/10/data/pg_hba.conf
- sed -i "/listen_addresses/i \ listen_addresses='*' " /var/lib/pgsql/10/data/postgresql.conf
-
- ####################################################################
|