Force Install OpenLiteSpeed on Centos 9 and Rocky Linux 9
As of 16 Feb 2023 it is not yet possible to install OpenLitespeed on Rocky 9 with ‘dnf’ due to missing dependencies. First of all, please check this post as the problem might have been fixed by the time you read this guide.
If the problem has not yet been fixed and you are getting the following error :
# dnf install openlitespeed LiteSpeed Tech Repository for CentOS 9 - x86_64 20 kB/s | 3.6 kB 00:00 LiteSpeed Tech Update Repository for CentOS 9 - x86_64 Error: Problem: conflicting requests - nothing provides lsphp74-mcrypt needed by openlitespeed-1.7.16-3.el9.x86_64
There is a way to force install OpenLiteSpeed if you are desperate like myself. Do not proceed unless you know what you are doing .
Install the required repos if not already installed
1 – Epel
dnf install epel-release
2 – Remi (for libargon2, gd3php and oniguruma5php dependencies)
dnf install http://rpms.remirepo.net/enterprise/remi-release-9.rpm
3 – OpenLiteSpeed (There is no rpm for el9 available, most probably because of this current issue) but we can install the generic repo file and GPG key
cd /etc/yum.repos.d wget http://rpms.litespeedtech.com/centos/litespeed.repo cd /etc/pki/rpm-gpg/ wget http://rpms.litespeedtech.com/centos/RPM-GPG-KEY-litespeed
Install OpenLiteSpeed
1 – Install required lsphp74 packages except unavailable lsphp74-mcrypt
dnf install libnsl lsphp74 lsphp74-common lsphp74-imap lsphp74-json lsphp74-mbstring lsphp74-mysqlnd lsphp74-opcache lsphp74-process lsphp74-gd lsphp74-xml
2 – Force install OpenLiteSpeed RPM
cd /usr/src rpm -i --nodeps http://rpms.litespeedtech.com/centos/9/update/x86_64/RPMS/openlitespeed-1.7.16-3.el9.x86_64.rpm
Conclusion
That’s it, a working installation with just a missing PHP mcrypt extension.
Optional installation of lsphp 8.2
If you then need to install a more recent PHP and some extensions.
dnf install lsphp82 lsphp82-mbstring lsphp82-gd lsphp82-zip lsphp82-mysqlnd cd /usr/local/lsws/fcgi-bin ln -s ../lsphp82/bin/lsphp ./lsphp82
Config Openlitespeed
dnf install openlitespeed systemctl start lsws systemctl enable lsws systemctl status lsws systemctl restart lsws Setup OpenLiteSpeed Admin Password. /usr/local/lsws/admin/misc/admpass.sh Please specify the user name of administrator. This is the user name required to login the administration Web interface. User name [admin]: admin Please specify the administrator's password. This is the password required to login the administration Web interface. Password: Retype password: Administrator's username/password is updated successfully! Configure Firewall. sudo firewall-cmd --zone=public --permanent --add-port=8088/tcp sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp sudo firewall-cmd --reload Accessing OpenLiteSpeed Web Interface. Once successfully installed, open your web browser and access OpenLiteSpeed using the URL https://your-IP-address:7080. You should see the OpenLiteSpeed login page. Enter the username “admin” and the password you set during the installation process.