Pages

Install WordPress with OpenLiteSpeed on Ubuntu 16.04

Thứ Sáu, 15 tháng 9, 2017

Today we will show you How to install and conUbuntu 16.04 VPS. OpenLiteSpeed is a lightweight, open source HTTP server developed and copyrighted by LiteSpeed Technologies, Inc. It provides a user friendly web interface and supports various operating systems, including Linux, Mac OS, SunOS and FreeBSD.
figure WordPress with OpenLiteSpeed on your
It is fairly easy to install WordPress with OpenLiteSpeed on an Ubuntu 16.04 VPS. The installation process should take about 15-20 minutes if you follow the very easy steps described below.

INSTRUCTIONS:

First of all login to your Ubuntu 16.04 VPS via SSH as user root
ssh root@IP_address
At the very beginning, it is best to start a screen session by executing the following command
screen -U -S openlitespeed
Update the system:
apt-get update && apt-get -y upgrade
Make sure to always keep your server up to date.

Install MariaDB

To install MariaDB, run the following command:
apt-get install -y mariadb-server
When the installation is complete, run the following command to secure your installation:
mysql_secure_installation
Configure it like this:
Enter current password for root (enter for none): Enter
Set root password? [Y/n]: Y
New password: 
Re-enter new password: 
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Next, we need to create a database for our WordPress installation.
[user]$ mysql -u root -p

MariaDB [(none)]> CREATE DATABASE wordpress;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'your-password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q
Do not forget to replace ‘your-password’ with a strong password.

Install OLS

Download the OLS 1-click script on your server:
cd /opt
wget https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh
In order to run the script we need to make the file executable with the following command:
chmod +x ols1clk.sh
For this guide we are going to assume that you want to use PHP7 and install only OLS without WordPress being installed (We prefer to install wordpress separately). So lets run the following command:
./ols1clk.sh --lsphp 70
When the installation is complete, configure an administrative username and password for the OpenLiteSpeed’s web interface by running the following command:
/usr/local/lsws/admin/misc/admpass.sh
You will be asked to provide a username for the administrative user. If you just press ENTER, the username “admin” will be selected. Afterwards, you will be asked to select and confirm a new password for the account.
Let’s verify OLS is up and running https://your-ip-address:7080. You should be able to log into OLS WebAdmin. Now lets get WordPress installed and then we will configure OLS.

Install WordPress

Lets move to the directory where we want to download the WordPress core files:
cd /usr/local/lsws/Example
Download WordPress using the wget command:
wget https://wordpress.org/latest.zip
Now we will unzip the WordPress zip file:
unzip latest.zip
Give permission of the entire directory structure to the user that the web server runs under so that changes can be made through the WordPress interface:
chown -R nobody:nogroup /usr/local/lsws/Example/wordpress/
Now lets go into the /wordpress directory:
cd wordpress
We are going to configure WordPress to work with our current database we setup earlier. First we will rename the wp-config-sample.php to wp-config.php using the following command:
mv wp-config-sample.php wp-config.php
Open the WordPress configuration file with your favorite text editor and change the database values with the ones you gave at the time of the database creation.
nano wp-config.php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wordpressuser');

/** MySQL database password */
define('DB_PASSWORD', 'your-password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Configure OpenLiteSpeed

We will be modifying the default virtual host that is already present in the OpenLiteSpeed configuration so that we can use it for our WordPress installation.
First, login to the OLS WebAdmin panel at https://your-ip-address:7080.

Subscribe your email address now to get the latest articles from us

Không có nhận xét nào:

Đăng nhận xét

 
Copyright © 2015. VPS Review.
Design by Herdiansyah Hamzah. Published by Themes Paper. Powered by Blogger.
Creative Commons License