Skip to content

Instantly share code, notes, and snippets.

@willnode
Last active March 22, 2023 01:46
Show Gist options
  • Save willnode/17744803b3bd5b7c6ef2dc9380290b4f to your computer and use it in GitHub Desktop.
Save willnode/17744803b3bd5b7c6ef2dc9380290b4f to your computer and use it in GitHub Desktop.
Upgrade from Rocky Linux 8 to 9

Main article: https://computingforgeeks.com/upgrade-to-rocky-linux-9-from-rocky-linux-8/

There are some adjustment that I need to aware with. For instance I have to disable many old modules also upgrading my REMI and postgres data.

Using PHP from builtin rocky linux repo turns out have a devastating consequences... It's much better to move away from it and use remi repo.

dnf update -y 
REPO_URL="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r"
RELEASE_PKG="rocky-release-9.1-1.11.el9.noarch.rpm"
REPOS_PKG="rocky-repos-9.1-1.11.el9.noarch.rpm"
GPG_KEYS_PKG="rocky-gpg-keys-9.1-1.11.el9.noarch.rpm"
dnf --nogpgcheck -y install $REPO_URL/$RELEASE_PKG $REPO_URL/$REPOS_PKG $REPO_URL/$GPG_KEYS_PKG --allowerasing
dnf -y remove rpmconf yum-utils epel-release
rm -rf /usr/share/redhat-logos
rpm -e virtualmin-release-6.0-3.gpl.noarch  ruby-irb-2.5.9-110.module+el8.6.0+992+fc951c18.noarch rubygem-rdoc-6.0.1.1-110.module+el8.6.0+992+fc951c18.noarch
dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync

cd /var/lib/rpm 
rm -f __db.00*
rpm --rebuilddb
rpm -e --nodeps  `rpm -qa|grep -i kernel|grep 4.18`
 rpm  -qa | grep kernel

dnf install https://software.virtualmin.com/vm/7/rpm/virtualmin-gpl-release.noarch.rpm 
dnf module disable go-toolset httpd llvm-toolset mariadb nginx nodejs perl perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-IO-Socket-SSL perl-libwww-perl php  postgresql  python27 python36  python38 ruby rust-toolset satellite-5-client virt squid

dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm

dnf install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-9-x86_64/postgresql10-server-10.23-1PGDG.rhel9.x86_64.rpm https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-9-x86_64/postgresql10-10.23-1PGDG.rhel9.x86_64.rpm https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-9-x86_64/postgresql10-libs-10.23-1PGDG.rhel9.x86_64.rpm
pg_upgrade -b /usr/pgsql-10/bin -d /var/lib/pgsql10/data  -D /var/lib/pgsql/data  --check
dnf remove postgresql10-server  postgresql10 postgresql10-libs


yum install php82-php php82-php-bcmath php82-php-cli php82-php-common php82-php-devel php82-php-fpm php82-php-gd php82-php-intl php82-php-mbstring php82-php-mysqlnd php82-php-opcache php82-php-pdo php82-php-pecl-mongodb php82-php-pecl-zip php82-php-pgsql php82-php-process php82-php-soap php82-php-sodium php82-php-xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment