by Marcus Zou | 26 Jan 2024
Note
- The following steps can be applied on Alma Linux, Oracle Linux, Fedora Linux, and Red Hat Enterprise Linux.
- Later update introduces Rocky Linux / RHEL 10.
1A) Add a sudo user
Just in case you setup your Rocky Linux system with root, then most likely you need to have a sudo user for daily operations.
## Create a new user: zenusr and set the password
adduser zenusr
passwd zenusr
## When a new user is created, they are assigned to a primary group that takes after the user account’s name. In this case, the user zenusr belongs to the primary group called zenusr. To confirm this, run the command as follows:
groups zenusr
## Next, run the following usermod command to add the user to sudoers group:
usermod -aG wheel zenusr
usermod -aG sudo zenusr
## Test the Sudo User
su - zenusr
## Now test the priviledge of zenusr
sudo dnf check-update
1B) Time Changes when dual booting between Linuxand Windows
Your time changes when dual-booting because Windows assumes the hardware clock is in local time, while Linux(and most Linux distributions) assumes it's in Coordinated Universal Time (UTC). When you switch operating systems, the other OS reads the time incorrectly from the hardware clock, causing a discrepancy that you see as a time change. The fix is to either tell Linux to use local time or to tell Windows to use UTC.
Fix by changing Linuxto use local time (Recommended)
This is generally the easier method and is recommended for most users.
- Open a terminal in Ubuntu.
- Run the following command to set the hardware clock to local time:
timedatectl set-local-rtc 1 --adjust-system-clock. - Verify the change by running
timedatectl. The output should say "RTC in local TZ: yes".
Fix by changing Windows to use UTC
This method makes Windows conform to the international standard that Linux uses by default.
- Open Command Prompt as an administrator. Search for "cmd" in the Start Menu, right-click, and select "Run as administrator".
- Run the following command to modify the Windows registry:
reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1 /f. - Restart your computer for the change to take effect.
1C) Basic Setup
# Check the version of Ubuntu
cat /etc/os-release
# check the IP address
ip a
# Setup the password for root user
sudo passwd root
# Update the system of Rocky/Alma/RHEL
sudo dnf update
## Update Fedora 39 - kernel-6.8.6-200.fc39 has issue to boot up, then please exclude updating the kernel by
sudo dnf update --exclude=kernel*
## Or add the follwing line into "/etc/dnf/dnf.conf" file prior to running "sudo dnf update"
## exclude=kernel*
# Install EPEL (Extra Packages for Enterprise Linux) Repository
sudo dnf install -y epel-release ## Not suitable for Fedora
## Preinstall some apps with root
sudo dnf install -y nano git wget rsync exfatprogs
sudo dnf install -y net-tools tar unzip python3-pip
sudo dnf update
## Instll uv - the package manager
curl -LsSf https://astral.sh/uv/install.sh | sh
2) Basic Installation
# Install ffmpeg module (change "9" to "10" if being Rocky Linux 10)
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
## sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-10.noarch.rpm
sudo dnf config-manager --set-enabled crb
# For Fedora, just simply run:
sudo dnf install -y ffmpeg mpv
# Install NetworkManager (Already installed, just in case that no networkmanager is installed)
sudo dnf install -y NetworkManager NetworkManager-tui
## nmtui
## nmcli
# Python3 version:
python3 --version ## 3.9.21 (Rocky 9) or 3.13.7 (Rocky 10)
# Install SSH Server (not neccessary since it's built-in)
sudo dnf install -y openssh-server
## Then start the service
sudo systemctl enable sshd
sudo systemctl start sshd
systemctl status sshd
## To confirm that the default port (22) is now actively listening for incoming SSH connections
ss -lt
3) Setup the Linux system boot into GUI or CLI mode
Just in case you are on a WSL2 Rocky Linux 9 and want to add a GUI:
## update
su
dnf update
## Check up env groups
dnf group list
## Then pick up an environment group, say "Server with GUI" or "Workstation"
dnf groupinstall "Server with GUI"
## Set Graphical interface as default after boot
systemctl set-default graphical.target
## reboot
reboot
Just case that your system boot into the wrong mode,
## Force to boot into GUI Mode
sudo systemctl set-default graphical.target
sudo reboot
## Force to boot into CLI/Text Mode
sudo systemctl set-default multi-user.target
sudo reboot
4) Install/Upgrade Node.js to the version you like
# install progamming bases
sudo dnf install nodejs npm
node --version
Rocky Linux 10 introduces NodeJS 22 directly, the the follwoing steps are for Rocky Linux 9 and below.
It will install Node.JS 16.10.0, while you may want to install a specific NodeJS, say 22.x,
# Node.js 20
# dnf install https://rpm.nodesource.com/pub_20.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
# remove the Node.JS 16.x
sudo dnf remove nodejs
## Node.js 22
curl -fsSL https://rpm.nodesource.com/setup_22.x -o nodesource_setup.sh
## Node.js 24
curl -fsSL https://rpm.nodesource.com/setup_24.x -o nodesource_setup.sh
## Then install the bash file
sudo bash nodesource_setup.sh
# install the new Node.JS 22.18.0 or 24.5.0
sudo dnf install -y nodejs
but it brings an issue of "GPG check FAILED" when installing NodeJS 22.16.0 (or 20.19.0). Headache!
After a while of googling, here is the solution:
sudo dnf clean all
sudo dnf clean metadata
sudo dnf update
then, edit the /etc/yum.repos.d/nodesource-nodistro.repo file and change all the "gpgcheck=1" lines to "gpgcheck=0" (2 places).
sudo nano /etc/yum.repos.d/nodesource-nodistro.repo
Then execute
sudo dnf update
sudo dnf install nodejs
Then edit the /etd/yum.repos.d/nodesource-nodistro.repo file and change all the "gpgcheck=0" lines back to "gpgcheck=1"
node --version ## v22.18.0 or v24.10.0
npm --version ## 10.9.3 or 11.6.1
5A) Install Docker Engine only on RHEL/Rocky Linux 9
Note: For Rocky 9.6 only: This version comes with podman installed.1- You must uninstall these packages before you install the official version of Docker Engine. Images, containers, volumes, and networks stored in /var/lib/docker/ aren't automatically removed when you uninstall Docker.
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine \
podman \
runc
2- Install the dnf-plugins-core package (which provides the commands to manage your DNF repositories) and set up the repository.
## For Rocky Linux / RHEL 9
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
## As of 8 August 2025, the repometa.xml for RHEL 10 is NOT ready yet, then
## please switch to Centos stream which has version 10 repometa.xml if you
## try to install Docker on Rocky Linux 10 or RHEL 10.
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3- Install the Docker Engine packages.
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
If prompted to accept the GPG key, verify that the fingerprint matches as below. Accept it if it's correct.
060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
This command installs Docker, but it doesn't start Docker. It also creates a docker group, however, it doesn't add any users to the group by default.
4- Start Docker Engine (Not needed for WSL, just log out and in).
sudo systemctl enable --now docker
sudo systemctl start docker
5- Process the regular user:
sudo usermod -aG docker $USER
id
exit
## Log out and Log back in again and check if the docker group has been added into $USER
## For some cases, we have to reboot the server...
id
6- Test out
docker run hello-world
## Remove the test junks
docker ps -a
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker images
docker image rm $(docker images -aq)
7- Optionally Uninstall Docker Engine:
## Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
## Images, containers, volumes, and configuration files on your host aren't automatically removed, then:
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd
5B) Podman Container: Install Podman Engine only
Podman is an open-source, daemon-less container management tool that lets you develop, manage, and run Open Container Initiative (OCI) containers without a background daemon process. Podman enhances the security of containerized applications and reduces resource usage due to its daemon-less design.
Podman is available in the default package repositories on Redhat/Rocky Linux/Fedora. Follow the steps below to install Podman using the DNF package manager on your server.
Uninstall Podman
sudo dnf remove podman podman-conpose -y
Test and Clean out.
## Pull images from docker.io
podman pull docker.io/nginx:alpine
podman images
## Then, launch and run the container:
podman run -d --name nginx-server -p 9090:80 docker.io/nginx:alpine
## Clean out the testing container and image:
podman ps -a
podman stop $(podman ps -q)
podman container rm $(podman ps -aq)
podman images
podman image rm $(podman images -q)
Run Podman service in rootless mode.Podman offers several advantages, including the ability to run containers in rootless mode. This allows regular users to deploy containers without elevated privileges. In other words, rootless mode means that you can deploy a container without becoming root or using sudo. By default, Podman launches containers with root user by affixing sudo into a command. Running podman in rootless mode can be achieved by following steps:
id
## uid=1000(zenusr) ...,4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),101(lxd)
sudo groupadd podman
sudo usermod -aG podman $USER
exit
Log out and log back in.
id
## uid=1000(zenusr) ..,4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),101(lxd),1001(podman)
Set Podman registers conf
sudo nano /etc/containers/registries.conf
add the following contents:
[registries.search]
registries=["quay.io", "docker.io", "registry.access.redhat.com", "registry.fedoraproject.org"]
Start the Podman service and check the status.
sudo systemctl start podman.socket
sudo systemctl status podman.socket
Enable the service to automatically start at system start
sudo systemctl enable podman.socket
View the version.
podman -v
Install Podman.
sudo dnf install -y podman
sudo dnf install -y podman-compose
Update the server's package index.
sudo dnf update
6) Install Java JDK
Quite some enterprise applications need a JRE or JDK to run, then we need to install such.
Vendor wise, I prefer Oracle based JDK, that's genuine! On a RedHat-like platform (Rocky Linux, CentOS), the commands differ slightly against Ubuntu/Debian system.
Version wise, the JDK/JRE 17 was a great LTS, and now I would like to pursue and install JDK/JRE 21 LTS.
## update
sudo dnf update
## Fetch the installer file
wget https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.rpm
## Install
sudo rpm -ivh jdk-21_linux-x64_bin.rpm
## Upgrade
sudo rpm -Uvh jdk-21_linux-64_bin.rpm
Then verify the version of JDK.
java --version
7) Install Cockpit Web Console for Rocky/Oracle Linux
A Web Console for WSL2 Oracle Linux is a perfect and lightweight tool to manage the server. The cockpit package is, by default, included in all non-minimal Oracle Linux software installations.
Access the cockpit-system Web Console from a remote computer by typing in the address bar in the browser:
https://192.168.80.135:9090
It can be the system's fully qualified domain name (FQDN), such as myserver.example.com or the system's IP address. Then the user can log in to localhost, as explained in Log in to the Cockpit Web Console.
(Optional) If a firewall is enabled, perform the following to enable the Cockpit service to receive inbound connections:
ip a## Open the firewall for the cockpit service
sudo firewall-cmd --add-service=cockpit --permanent
## reloading the firewall configuration
sudo firewall-cmd --reload
Note: The firewall restricts access to the cockpit system. Remote authorized users can access the system securely by using port forwarding over SSH. For example, the user can type the following command from the user's local system:
ssh -L 9090:localhost:9090 user@cockpit-system
To verify that the socket web service is enabled for Cockpit, type:
systemctl status cockpit.socket
To enable the systemd socket service and automatically start it upon a system restart, type:
sudo systemctl enable --now cockpit.socket
Most likely, it will complain in WSL system:
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
[!WARNING]
First, consider whether you should enableSystemdin WSL. Enabling Systemd will automatically start a lot of background services and tasks that you really may not need under WSL. As a result, it will also increase WSL start-up times, although the impact will be dependent on your system. Check the Alternatives methods to see if there may be a better option that fits your needs. For example, theservicecommand may do what you need without any additional effort.
Anyway the solution to this is to add 2 lines to /etc/wsl.conf as below:
[boot]
systemd=true
and the shutdown WSL and restart WSL:
wsl --shutdown
wsl
To install the Cockpit package on the Oracle Linux host system, type:
sudo dnf install cockpit
Update the system of WSL2 Oracle Linux
sudo dnf update
8) VM Only - shared folder from Host to Guest
Note: So far, there is an issue mounting shared folder of Host, as of version 10.0. Will report this bug and see if it could get fixed in next release.
Install open-vm-tools if in VM.
sudo dnf install open-vm-tools open-vm-tools-desktop
In order to confirm if your local selected folder was really shared, run the below command and check if your folder will be listed.
vmware-hgfsclient
## wackie
It shall read out something like: Downloads (the shared folder name on the Host).
After that, make sure the directory of /mnt/hgfs exists. if not, create it by:
sudo mkdir -p /mnt/hgfs
Now, let’s share the ‘shared’ directory we just created.
sudo vmhgfs-fuse .host:/wackie /mnt/hgfs -o allow_other
In order to load up the Shared folder at start-up of the computer, please open /etc/fstab by:
sudo nano /etc/fstab
Add the below into the last row of the file:
.host:/wackie /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other,nofail 0 0
and then ...
sudo reboot
9) Install Google Chrome browser
Many website was stating to fetch (wget) the rpm package at https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Actually we can install that repo directly:
sudo dnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
This step will introduce a complaint of "GPG key 1 import failed", but it will install Google Chrome without any issue.
For the careful people, please follow the common steps below:
Uninstall the browser:
# Uninstall
sudo dnf remove google-chrome-stable
# Uninstall Google Chrome (Canary) - the experiental edition
sudo dnf remove google-chrome-canary
then, give a go.
sudo dnf update
sudo dnf install google-chrome-stable -y
then add the contents below:
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=0
gpgkey=https://dl.google.com/linux/linux_signing_key.pub
Register the repo of google-chrome by:
sudo nano /etc/yum.repos.d/google-chrome.repo
10) Special: Video Decoder issue + Audio choppy
Sometimes when playing videos on to Rocky/Oracle Linux 9, you could not play the videos in h264 format, with general error as below:
Error: could not decode the format "h264" (H264 - MPEG-4 AVC (part 10)) ...
What you can do is to add EPEL repository, enable RPM fusion and install VLC...
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
sudo dnf groupupdate core
sudo dnf groupupdate multimedia --setop="install_weak_deps=False"
sudo dnf groupupdate sound-and-video
sudo dnf install vlc vlc-plugin-ffmpeg
## For Rocky/RHEL 10, just install x264 directly
sudo dnf install ffmpeg x264
Then lets fix the choppy audio.
11) Special: Install Chinese IME
The RHEL product line (AlmaLinux, Rocky, CentOS, openSUSE) support East Asian IME very well. with Gnome initial Setup on Oracle Linux 9, the input method for your language is enabled by default.
1- Available input method engines for East Asia countries:
| Languages | Scripts | IME name | Package |
|---|---|---|---|
| Chinese | Simplified Chinese | Intelligent Pinyin | ibus-libpinyin |
| Chinese | Traditional Chinese | New Zhuyin | ibus-libzhuyin |
| Japanese | Kanji, Hiragana, Katakana | Anthy | ibus-anthy |
| Korean | Hangul | Hangul | ibus-hangul |
| Other | Various | M17N | ibus-m17n |
2- Install the ibus package to make sure everything is in good standing.
sudo dnf install ibus-libpinyin
3- Switching the input method in GNOME
Launch the Settings app, go to "Keyboard", and then "Input Sources", Click "+" sign to add an IME, search "pinyin" (instead of "China"), and pick up the "Chinese (Intelligent Pinyin)". That's it.
This approach is applicable in Oracle Linux 9, AlmaLinux 9, Rocky Linux 9.
In Oracle / Rocky Linux 10 and RHEL 10, the Chinese IME is a build-in app, no efforts are needed.
12) Install VS Code via dnf in CentOS/RHEL/Rocky 10
Installing VS Code cannot be done directly, here is method to configure the repo.
## Importthe Microsoft GPG key to verify the authenticity of VS Code packages
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
## Create the VS Code repository file to tell your system where to find the VS Code packages
sudo nano /etc/yum.repos.d/vscode.repo
Here is the contents of the vscode.repo file:
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
autorefresh=1
type=rpm-md
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
Then update the package cache and install the package.
sudo dnf check-update
sudo dnf install code
## sudo dnf install code-insiders
13) Optional: Install some snap Apps as needed
snapd is a great repo for installing extra apps into Rocky/Alma/CentOS Linux.
# Install snapd, a great repo for installing extra apps into Fedora/Rocky/Alma Linux.
sudo dnf install snapd -y
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
## PLEASE Wait for a few moments...
## Install some common apps
sudo snap install discord elisa insomnia postman sayonara slack marktext
## Install WhatsApp in Linux
sudo snap install whatsdesk
## Android Studio
sudo snap install android-studio --classic
## VS Code in CentOS/RHEL/Rocky 9
sudo snap install code --classic
13) Optional: Install IntelliJ Suite
1- Download the tarballs:
IDEA Ultimate: https://download-cdn.jetbrains.com/idea/ideaIU-2025.2.3.tar.gz
Goland: https://download-cdn.jetbrains.com/go/goland-2025.2.3.tar.gz
PyCharm: https://download-cdn.jetbrains.com/python/pycharm-2025.2.3.tar.gz
DataGrip: https://download-cdn.jetbrains.com/datagrip/datagrip-2025.2.4.tar.gz
...
Or using wget tool -
wget https://download-cdn.jetbrains.com/idea/ideaIU-2025.2.3.tar.gz
wget https://download-cdn.jetbrains.com/go/goland-2025.2.3.tar.gz
2- Extract the zip file and run the app with idea.sh script.
sudo tar -xvzf ideaIU-2025.2.3.tar.gz -C /opt
echo 'PATH="/opt/idea-IU-2025.2/bin:$PATH"' >> ~/.profile
source ~/.profile
idea
# You may run the app with 30-day trial
3- Create a Desktop Shortcut by running the command below in Rocky Linux 9/10 Desktop version:
## create a Desktop shortcut
sudo nano /usr/share/applications/ideaiu.desktop
with the contents:
[Desktop Entry]
Version=2025.2
Type=Application
Name=IDEA
Comment=Idea IU 2025, the Ultimate Code Editor for Java
Exec=/opt/idea-IU-2025/bin/idea.sh %u
Terminal=false
Icon=/opt/idea-IU-2025/bin/idea.png
Categories=Development;
Install Golang SDK in Linux
If you install GoLand 2025, it's an IDE only, then a Goland SDK shall be installed.
## Download the installer from Google
wget https://go.dev/dl/go1.25.3.linux-amd64.tar.gz
## Install it
sudo rm -rf /usr/local/go && sudo tar -xzf go1.25.3.linux-amd64.tar.gz -C /usr/local
## Configure the Env Variables
export PATH=$PATH:/usr/local/go/bin
## Version Check
go version
4- Run the IDEA app from the Applications pool. The you can install other models of IntelliJ the same way as what we have done for Idea.
14) Optional: Upgrade low-version Python3.9 to 3.11 in Rocky 9
- Reboot.
- It shall read "Python 3.11.6" now.
Check the version of Python3.
python3 --version
python3.11 --version
Finally compile Python with installing
sudo make altinstall
# install an alternative version 3.11.6
Enter into the folder and start the configuration process
cd Python-$VERSION
./configure --enable-optimizations
Extract the tarball file
tar -xzf Python-$VERSION.tgz
Download Python 3.11.6 tarball
VERSION=3.11.6
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz
Install development tools that help the developers to create, debug, maintain, or support other programs and applications.
sudo dnf groupinstall "Development Tools"
sudo dnf install gcc -y
Install the necessary packages
sudo dnf install wget openssl-devel bzip2-devel libffi-devel -y
Python3 Version Check-up
python3 --version
## Rocky Linux 9.3 - Python3.9.18
15) Optional: Install WPS Office suite
WPS Office Suite is preferred, functionality wise.
You can download the .rpm file from https://www.wps.com website and install the latest version with more fancy functions but less stable. I prefer downloading using wget command as below:
# download and install
wget https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/11711/wps-office-11.1.0.11711.XA-1.x86_64.rpm
# Most likely, the system will complain lack of dependencies of libXss.so.1(64bit),
# then a solution is to install libXScrnSaver
sudo yum install libXScrnSaver
# Install the app just downloaded
sudo rpm -ivh wps-office-11.1.0.11711.XA-1.x86_64.rpm
# install missing WPS-related fonts
git clone https://github.com/iamdh4/ttf-wps-fonts.git
cd ttf-wps-fonts
sudo bash install.sh
cd ..
rm -rf ttf-wps-fonts
# Remove
sudo rpm remove wps-office
16) Optional: Install WineHQ to Rocky Linux 9
First of all, we can install a Wine v8.0 from dnf repo as below:
# Install 32-bit WINE
sudo dnf install wine.i686
# Install 64-bit WINE
sudo dnf install wine
win --version
## wine-8.0
But the wine-8.0 from dnf repo does not support many new/latest version of Windows apps, and I would like to install the latest version of 64-bit WINE, which is WINE64 v9.4 as of 10 March 2024. then we need to remove the old versions first.
sudo dnf remove wine wine.i686
Step 1: Run system update
Before setting up anything let’s first install the available updates for the system packages using DNF. The given command will also refresh the repos.
sudo dnf update
sudo reboot
Step 2: Install Development Tools, EPEL, PowerTools and other Dependencies
Now, install the Development tools that we needed to build the Wine Source code on our AlmaLinux or Rocky Linux 9 system.
sudo dnf groupinstall 'Development Tools' -y
As there is no official repository of Wine for AlmaLinux or Rocky, we will build it from the source. Therefore for building source code, we need development tools and some other the required dependencies available in EPEL. Thus, enable it first:
sudo dnf install epel-release
sudo dnf config-manager --set-enabled crb
## the PowerTools repo in RHEL 8/ Rocky Linux 8 was renamed to crb in version 9.x
sudo dnf update
Apart from the above command, run this one as well for additional dependencies.
## dependencies - Generally necessary
sudo dnf -y install cmake gcc mingw64-gcc mingw64-gcc-c++ mingw32-gcc mingw32-gcc-c++ glibc-devel.i686 alsa-firmware alsa-lib alsa-plugins-pulseaudio alsa-plugins-oss alsa-tools-firmware alsa-utils pipewire-alsa alsa-plugins-speex alsa-sof-firmware libgensio-sound dbus-libs fontconfig-devel freetype freetype.i686 freetype-devel freetype-devel.i686 gnutls-devel mesa-libGL-devel mesa-libOSMesa libunwind-devel libX11-devel libX11-xcb libX11-xcb.i686 libX11-devel.i686 libX11-common libXcomposite-devel libXcursor-devel libXfixes-devel libXi-devel libXrandr-devel libXrender-devel libXext-devel libdbus*
## dependencies - Needed for many applications
sudo dnf -y install gstreamer1-devel gstreamer1-plugins-base-devel SDL2-devel libudev-devel vulkan-headers vulkan-loader qt6-qtwayland wayland-utils
## dependencies - Rare or domain-specific
sudo dnf -y install cups-devel libgphoto2-devel libpng-devel libjpeg-devel libtiff-devel sane-backends-devel krb5-devel samba-devel ocl-icd-devel libpcap-devel libusbx-devel libv4l-devel
## just in case of not-enough dependencies
## sudo yum -y build-dep wine wine-devel ## Should remove `wine` in this line?
Step 3: Download Wine HQ’s latest source code
To compile the source code, let’s download the latest available one i.e Wine 9.4. You can go for any other version as well. Check out the available versions on the official page.
sudo dnf -y install wget
wget https://dl.winehq.org/wine/source/9.x/wine-9.4.tar.xz
Note: For any other Wine Source code version, the above command will be the same, just change the version number given in it.
Step 4: Make and install Wine on Rocky Linux 9
Let’s now extract and compile the WineHQ source code on the system :
tar xvf wine-*.tar.xz
Build and Compile:
cd wine-*/
./configure --enable-win64 ## (Keep installing libs if the result is unsatisfacory)
make
sudo make install
The make command will take quite some time, say almost 1.5 hours (6:36pm-8:04pm).
Step 5: Check the installed Wine Version
To confirm that it is configured on the system successfully, let’s check its version.
wine64 --version
## wine-9.4
which wine64
## /usr/local/bin/wine64
## wine --version
## wine-8.0
wine64 --help
Step 6: Configure the Wine Interface
To configure the WINE for future installing,
## winecfg ## Cannot run with wine64
It will launch a dialogue for you to play around.
Step 7: Start installing Windows Software: WeChat
Now, start installing the Windows programs that you want to run on your Rocky Linux, Say the latest WeChat v3.9.10 and Notepad++ v8.6.5:
wget https://dldir1v6.qq.com/weixin/Windows/WeChatSetup.exe
wine64 ./WeChatSetup.exe ## There is issue
wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.6.5/npp.8.6.5.Installer.exe
wine64 ./npp.8.6.5.Installer.exe ## There is issue
Alternatively, we could try to use Crossover.
17) Optional: Install CrossOver to Rocky Linux 9
First of all, we can install Crossover v24 from the official repo as below:
wget https://media.codeweavers.com/pub/crossover/cxlinux/demo/crossover-24.0.0-1.rpm
sudo dnf install crossover-24.0.0-1.rpm
Then run CrossOver to install Windows app, say WeChatSetup.exe..