The admin portal installed with OpenLiteSpeed makes it easier for new users and students to manage the server. From the admin portal, one can configure advanced web server settings, manage users’ permissions and restart services. The steps below will also show you how to install MariaDB, and PHP8.0 to enable you to create a dynamic website that can run popular open-source content management systems, like WordPress, Joomla, and Drupal. If you’re looking for an alternative to popular webservers like Apache and Nginx, OpenLiteSpeed should be considered. To get started with installing OpenLiteSpeed on Ubuntu Linux, follow the steps below:
How to install OpenLiteSpeed on Ubuntu from the repository
You can build and compile OpenLiteSpeed server packages on Ubuntu Linux. However, the easiest way to get it installed on Ubuntu Linux is to add its repository, then install it from there. When you add the repository, any new updates will automatically be made available to the system. To add the repository, run the commands below: The above command will also import the OpenLiteSpeed GPG key to Ubuntu and activate it. You can then run the commands below to install OpenLiteSpeed. After installing OpenLiteSpeed, the commands below can be used to stop, start and enable OpenLiteSpeed services to automatically startup when the server boots. To see if the OpenLiteSpeed service is running, run the commands below. That should output similar lines as shown below:
How to configure OpenLiteSpeed on Ubuntu Linux
Once OpenLiteSpeed is installed, it is automatically assigned port 8088. Port 80 is the default port for the web server, so we’ll want to change OpenLiteSpeed to listen on port 80 instead. To do that, run the commands below to open its configuration file. Then look for the lines below and change the highlighted port from 8088 to 80. Save your changes and exit. Restart OpenLiteSpeed by running the commands below. Now open your browser and browse to the server hostname or IP address. That should open the OpenLiteSpeed default web server welcome page. With the default port changed to 80, run the commands below to set up the administrator password which will be used to log on to the OpenLiteSpeed admin panel. When you run the command above, it will prompt you to type in the admin username and create a password. The default username is admin. Leave blank to use it. The admin panel can be accessed using the link below: Login using the admin login details above.
How to install PHP 8.0 support for OpenLiteSpeed
When you install OpenLiteSpeed, it also installs a version of PHP that is not the latest. If you want the latest version of PHP, you can install it separately. As of this writing, the latest version of PHP is 8.0. Run the commands below to install it. To make OpenLiteSpeed use PHP 8.0, log on to the admin panel, then go to Server Configuration -> External App, and click the + button to add a new external app. When prompted to choose the type of app you want to add, choose LiteSpeed SAPI App. Then click Next (arrow). On the PHP configuration settings, use these recommended values: Save your changes. Next, go to Server Configuration ==> Script Handler and click Edit under Actions to edit the existing handler. Then choose the new PHP 8.0 handler created above and save. Restart the server, then go to the server name or IP address followed by /phpinfo.php. PHP 8.0 is now the default handler.
How to install MariaDB on Ubuntu Linux
MariaDB is fast, secure and the default server for almost all Linux servers. To install MariaDB, run the commands below: After installing MariaDB, the commands below can be used to stop, start and enable MariaDB services always to start up when the server boots. Next, run the commands below to secure the database server with a root password if you were not prompted to do so during the installation. When prompted, use the guide below to answer: To verify and validate that MariaDB is installed and working, log in to the database console using the commands below: You should automatically be logged in to the database server since we initiated the login request as root. Only the root can log in without a password, and only from the server console. If you see a similar screen as shown above, then the server was successfully installed. That should do it! Conclusion: This post showed you how to install OpenLiteSpeed with support for PHP 8.0 and MariaDB. If you find any error above or have something to add, please use the comment form below.