Skip to content

Instantly share code, notes, and snippets.

@jimmckeeth
Last active April 6, 2024 18:09
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmckeeth/a5e01f312d0ad664e030ed785daf9159 to your computer and use it in GitHub Desktop.
Save jimmckeeth/a5e01f312d0ad664e030ed785daf9159 to your computer and use it in GitHub Desktop.
Installs required packages and sets up Red Hat Linux for Delphi 12.1 Athens development

DEPRECATED!

See https://github.com/jimmckeeth/Delphi-on-Linux-Setup for updates


Installs required packages and sets up Red Hat Linux for Delphi 12.1 Athens development

This works with WSL2, VM, and hardware installs of CentOS 9 and other Red Hat family distros.

Installing CentOS 9 Stream in WSL2 on Windows 11

Microsoft has a full article with all the details.

wsl --install

Note: There isn't a Red Hat as part of the default WSL distributions. This script should work with any RPM based distribution using the YUM package manager.

To manually install CentOS Stream 9 follow these steps:

  1. Download the latest CentOS Stream 9 release
  2. Extract the content into a folder it can live on your system. I picked C:\WSL\CentOS9
  3. Run CentOS9-stream.exe as Administrator to install CentOS 9
  4. Start CentOS 9

CentOS is installed, but it doesn't have a user yet. The following will create a user for you. Then you need to restart the CentOS instance.

  • From CentOS
yum update -y && yum install passwd sudo -y
myUsername=jim
adduser -G wheel $myUsername
echo -e "[user]\ndefault=$myUsername" >> /etc/wsl.conf
passwd $myUsername
  • From PowerShell
wsl --terminate CentOS9-Stream
  • You can now launch CentOS
#!/bin/bash
#
# Download and execute with the following:
# curl -L https://embt.co/SetupRedHat4Delphi22sh | bash
#
echo "updating installed package"
sudo yum upgrade -y
echo "installing development tools"
sudo yum groupinstall 'Development Tools' -y
sudo yum install wget gtk3 mesa-libGL gtk3-devel -y
cd ~
echo "Downloading Linux PAServer for Alexandria 12.1 (23.0)"
wget https://altd.embarcadero.com/releases/studio/23.0/120/LinuxPAServer23.0.tar.gz
echo "Setting up directories to extract PA Server into"
mkdir PAServer
mkdir PAServer/23.0
rm PAServer/23.0/*
tar xvf LinuxPAServer23.0.tar.gz -C PAServer/23.0 --strip-components=1
rm LinuxPAServer23.0.tar.gz
echo \#\!\/bin\/bash >pa22.sh
echo ~/PAServer/23.0/paserver >>pa23.sh
chmod +x pa23.sh
echo "-----------------------------------"
echo " To launch PAServer type ~/pa23.sh"
echo "-----------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment