<\/span><\/h2>\nFirst, log in to your Ubuntu 20.04 server through SSH as the root user or any other user with sudo privileges:<\/p>\n
ssh root@IP_Address -p Port_Number<\/pre>\nOf course, you will need to replace IP_Address<\/code> and Port_Number<\/code> with your actual server IP address and SSH port number.<\/p>\nThen, run the following command to make sure that all installed packages on the server are updated to the latest available version:<\/p>\n
apt update && sudo apt upgrade<\/pre>\n<\/span>Step 2: Download and Install OpenLiteSpeed<\/span><\/h2>\nThe following command will add the necessary repository to your server for the OpenLiteSpeed server installation.<\/p>\n
wget -O - http:\/\/rpms.litespeedtech.com\/debian\/enable_lst_debain_repo.sh | bash<\/pre>\nTo install the latest version of the OpenLiteSpeed server, run the following command:<\/p>\n
apt install openlitespeed<\/pre>\nOnce, the installation is complete you can check the status of the OpenLiteSpeed service:<\/p>\n
systemctl status lshttpd<\/pre>\nYou should get the following output:<\/p>\n
\u25cf lshttpd.service - OpenLiteSpeed HTTP Server\r\n Loaded: loaded (\/etc\/systemd\/system\/lshttpd.service; enabled; vendor preset: enabled)\r\n Active: active (running)\r\n Process: 39250 ExecStart=\/usr\/local\/lsws\/bin\/lswsctrl start (code=exited, status=0\/SUCCESS)\r\n Main PID: 39278 (litespeed)\r\n CGroup: \/system.slice\/lshttpd.service\r\n \u251c\u250039278 openlitespeed (lshttpd - main)\r\n \u251c\u250039287 openlitespeed (lscgid)\r\n \u2514\u250039331 openlitespeed (lshttpd - #01)\r\n<\/pre>\nTo enable the OpenLiteSpeed service to start on system reboot execute the following command:<\/p>\n
systemctl enable lshttpd\r\n<\/pre>\nBy default, OpenLiteSpeed listens on port 8088<\/code>. It is recommended that you change the default port to 80<\/code>. To do so, edit the OpenLiteSpeed default configuration file:<\/p>\nnano \/usr\/local\/lsws\/conf\/httpd_config.conf<\/pre>\nFind the following lines:<\/p>\n
listener Default{\r\n address *:8088\r\n secure 0\r\n map Example *\r\n}\r\n<\/pre>\nAnd, replace the port 8088<\/code> to 80<\/code>:<\/p>\nlistener Default{\r\n address *:80\r\n secure 0\r\n map Example *\r\n}\r\n<\/pre>\nSave and close the file, then restart the OpenLiteSpeed service to apply the changes:<\/p>\n
systemctl restart lshttpd<\/pre>\nOpen your browser and type the server IP address:<\/p>\n
http:\/\/your-ip-address<\/pre>\nYou should see the OpenLiteSpeed default page:<\/p>\n
<\/p>\n<\/figure>\n<\/span>Step 3: Install and Configure MariaDB Server<\/span><\/h2>\nRun the following command to install the latest MariaDB server from the official Ubuntu repositories:<\/p>\n
apt install mariadb-server<\/pre>\nOnce it is installed, start the MariaDB service and enable it to automatically start up after the server boots up:<\/p>\n
systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\nAfter the installation is completed, you can improve the security of your MySQL server, by running the mysql_secure_installation script:<\/p>\n
mysql_secure_installation<\/pre>\nWe recommend answering every prompt with \u2018Y<\/strong>\u2019.<\/p>\n<\/span>Step 4: Create MariaDB Database and User<\/span><\/h2>\nOnce this is done, create a new MariaDB database and user for the Vanilla Forums installation.<\/p>\n
First, log in to MariaDB with the following command:<\/p>\n
mysql -u root -p<\/pre>\nOnce login, create a database, user, and grant privileges for the user to access the database:<\/p>\n
MariaDB [(none)]> CREATE DATABASE vanillaforum;\r\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON vanillaforum.* TO 'vanillaforum'@'localhost' IDENTIFIED BY 'Password';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> EXIT;<\/pre>\nDon\u2019t forget to replace \u2018Password\u2019 with an actual strong password.<\/p>\n
<\/span>Step 5: Install PHP and Modules<\/span><\/h2>\nBy default, OpenLiteSpeed is configured to use PHP\u00a0 7.4. To check this simply access the following URL:<\/p>\n
http:\/\/your-ip-address\/phpinfo.php<\/pre>\nYou should receive the following screen:<\/p>\n
<\/p>\n
To install all the necessary modules for Vanilla Forum, run the following command:<\/p>\n
apt install lsphp74-intl lsphp74-mysql lsphp74-curl lsphp74-imagick lsphp74-dev<\/pre>\nThen restart the OpenLiteSpeed service to apply the changes:<\/p>\n
systemctl restart lshttpd<\/pre>\n