Skip to content

Instantly share code, notes, and snippets.

@jimmckeeth
Last active June 12, 2023 17:34
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 11.3 Alexandria development

Installs required packages and sets up Red Hat Linux for Delphi 11.3 Alexandria 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 11.3 (22.0)"
wget https://altd.embarcadero.com/releases/studio/22.0/113/LinuxPAServer22.0.tar.gz
echo "Setting up directories to extract PA Server into"
mkdir PAServer
mkdir PAServer/22.0
rm PAServer/22.0/*
tar xvf LinuxPAServer22.0.tar.gz -C PAServer/22.0 --strip-components=1
rm LinuxPAServer22.0.tar.gz
echo \#\!\/bin\/bash >pa22.sh
echo ~/PAServer/22.0/paserver >>pa22.sh
chmod +x pa22.sh
echo "-----------------------------------"
echo " To launch PAServer type ~/pa22.sh"
echo "-----------------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment