The 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>\nRun the following command to install the latest version of the OpenLiteSpeed server.<\/p>\n
sudo apt install openlitespeed<\/pre>\nOnce the installation is complete, you can start the OpenLiteSpeed service:<\/p>\n
systemctl start lsws<\/pre>\nas well as see the status of the OpenLiteSpeed service using the following command:<\/p>\n
systemctl status lsws<\/pre>\nOutput:<\/p>\n
\u25cf lsws.service - LSB: lshttpd\r\nLoaded: loaded (\/etc\/init.d\/lsws; generated)\r\nActive: active (exited)\r\nDocs: man:systemd-sysv-generator(8)\r\nProcess: 47146 ExecStart=\/etc\/init.d\/lsws start (code=exited, status=0\/SUCCESS)<\/pre>\nWe also recommend enabling OpenLiteSpeed to start on server boot:<\/p>\n
systemctl enable lsws<\/pre>\nOpen your browser and browse to the server IP on port 8088 to view the default page: https:\/\/your-ip-address:8088<\/code><\/p>\n<\/h2>\n<\/span>Step 3: Install and Configure MySQL Server<\/span><\/span><\/h2>\nOn Ubuntu 18.04, the latest version of MySQL is included in the APT package repository by default.<\/p>\n
In order to install the MySQL server package, run the following command:<\/p>\n
apt -y install mysql-server<\/pre>\nOnce it is installed, start the MySQL service and enable it to automatically start up after the server boots up:<\/p>\n
systemctl start mysql\r\nsystemctl enable mysql<\/pre>\nOnce the MySQL installation is complete, issue the following command to improve the security of your MySQL server installation (we recommend answering with \u2018Y\u2019 to every prompt):<\/p>\n
sudo mysql_secure_installation<\/pre>\nTo start the process, the command will ask you to enter the current MySQL root password. Just press the [Enter] key once, as there is no default password for MySQL.<\/p>\n
<\/span>Step 4: Create MySQL Database and User<\/span><\/span><\/h2>\nNext, we need to create a MySQL database and user for the WordPress installation.<\/p>\n
Login to the MySQL console:<\/p>\n
mysql -u root -p\r\n\r\nmysql> CREATE DATABASE wordpressdb;\r\nmysql> GRANT ALL PRIVILEGES ON wordpressdb.* TO 'wpuser'@'localhost' IDENTIFIED BY 'PASSWORD<\/span>' WITH GRANT OPTION;\r\nmysql> FLUSH PRIVILEGES;\r\nmysql> quit<\/pre>\nDon\u2019t forget to replace \u2018PASSWORD<\/span>\u2018 with an actual, strong password.<\/p>\n<\/span>Step 5: Install PHP and Modules<\/span><\/h2>\nTo install PHP 7.2 along with all the necessary modules for WordPress, run the following command:<\/p>\n
sudo apt install lsphp72 lsphp72-curl lsphp72-imap lsphp72-mysql lsphp72-intl lsphp72-pgsql lsphp72-sqlite3 lsphp72-tidy lsphp72-snmp<\/pre>\n<\/span>Step 6: Install WordPress<\/span><\/h2>\nWe will download and place the WordPress installation in the default web server document root directory \/usr\/local\/lsws\/Example\/html\/<\/code><\/strong>.<\/p>\nLet\u2019s download the latest WordPress version from the official WordPress site and extract it in the ‘\/usr\/local\/lsws\/Example\/html\/’ directory with the following commands:<\/p>\n
cd \/usr\/local\/lsws\/Example\/html\/<\/pre>\nwget -c http:\/\/wordpress.org\/latest.tar.gz<\/pre>\nThen, extract the ‘latest.tar.gz’ archive file with:<\/p>\n
tar -xzvf latest.tar.gz<\/pre>\nThe WordPress files will be now placed in the wordpress<\/strong> directory at \/usr\/local\/lsws\/Example\/html\/wordpress<\/strong><\/p>\nWe also need to set the correct permissions of this directory so our OpenLiteSpeed server can access the files in it. To give ownership of the WordPress files to our OpenLiteSpeed server user and group, run the following command:<\/p>\n
chown -R nobody:nogroup \/usr\/local\/lsws\/Example\/html\/wordpress<\/pre>\nNext, run the following command to create a WordPress configuration file ( wp-config.php<\/strong> ). This is the default configuration file for WordPress.<\/p>\ncd \/usr\/local\/lsws\/Example\/html\/wordpress\r\nmv wp-config-sample.php wp-config.php<\/pre>\nNow open the wp-config.php<\/strong> file with your favorite text editor, for example:<\/p>\nnano wp-config.php<\/pre>\nThen update the database settings, replacing database_name_here<\/em><\/strong>, username_here<\/em><\/strong> and password_here<\/em><\/strong> with your own details:<\/p>\n\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\r\n\/** The name of the database for WordPress *\/\r\ndefine('DB_NAME', 'database_name_here<\/span>');\r\n\r\n\/** MySQL database username *\/\r\ndefine('DB_USER', 'username_here<\/span>');\r\n\r\n\/** MySQL database password *\/\r\ndefine('DB_PASSWORD', 'password_here<\/span>');\r\n\r\n\/** MySQL hostname *\/\r\ndefine('DB_HOST', 'localhost');\r\n\r\n\/** Database Charset to use in creating database tables. *\/\r\ndefine('DB_CHARSET', 'utf8');\r\n\r\n\/** The Database Collate type. Don't change this if in doubt. *\/\r\ndefine('DB_COLLATE', '');<\/pre>\nSave and exit the file.<\/p>\n