Xenforo

How Can We Help?
< Back
Print

Install: Quick Install Xenforo on OpenLiteSpeed

After you install OpenLiteSpeed, follow the instructions below to get your Xenforo site working.

  1. Install PHP modules
  2. MariaDB Installation
  3. Create XenforoDB Account
  4. Set Index File and rewrite rules
  5. Download and Extract Xenforo
  6. Run the Xenforo install script

Install PHP Modules

The easiest way to install PHP for OpenLiteSpeed (without ols1clk) is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to install and enable the LiteSpeed Repository.

Step 1. Install PHP

Use the following command to install PHP with the modules required:

yum install lsphp70 lsphp70-common lsphp70-gd lsphp70-process lsphp70-mbstring lsphp70-mysqlnd lsphp70-xml lsphp70-json lsphp70-opcache

Note: There are multi versions of LSPHP (lsphp53, lsphp54, lsphp55, lsphp56, lsphp70, lsphp71, lsphp72) available.

Step 2. Set up PHP

Visit http://your_server_IP:7080. Navigate to Server Configuration > External app, then click the second icon Edit on the right hand side in order to edit this application.
Modify:
Name: lsphp → lsphp70
Address: uds://tmp/lshttpd/lsphp.sock → uds://tmp/lshttpd/lsphp70.sock
Command: $SERVER_ROOT/fcgi-bin/lsphp5 → $SERVER_ROOT/lsphp70/bin/lsphp

If you are not using RPM/APT, or you prefer to build PHP by yourself, see our instructions for building PHP here.

Step 3. Restart LSWS

When you are finished, click the Save icon to save your changes, then click the Graceful Restart button.

Step 4. PHP Verification (Optional)

Visit http://your_server_IP:8088/phpinfo.php and make sure PHP Version shows 7.0.x.

MariaDB Installation

Install MariDB:

yum install mariadb-server
systemctl start mariadb

Set new password:

/usr/bin/mysql_secure_installation

Enter $yourpassword

Create Xenforo DB Account

mysql -u root -p$yourmysqlpassword
create database xenforo; 
grant all privileges on xenforo.* to xenforo@localhost identified by 'xenforo'; 
exit;

Set Index File

An index file needs to be set in LiteSpeed Web Admin Console. Navigate to Virtual Hosts > Select Virtual Host from List > General > Index Files, click Edit in the top right corner, and enter index.html,index.php in the Index Files box.

Download and Extract Xenforo

To illustrate setting up Xenforo on a vhost we’ll use the default virtual host, “Example”. You can download XenForo.zip from the XenForo Customer Area. Please note that the document root of ‘Example’ virtual host is /usr/local/lsws/Example/html/.

cd /usr/local/lsws/Example/html
### Copy xenforo_xxx.zip here
unzip xenforo_*.zip
mv upload xenforo 

Grant the Web Server User Write Permission to Create wp-config.php During Installation

chown -R nobody:nobody xenforo

Graceful Restart

When you are finished, click the Save icon to save your changes, then click the Graceful Restart button.

Run the Xenforo Install Script

Step 1. Run Installation Script

Point your browser with default port to http://server_ip:8088/xenforo

Step 2. Set up Database

We’ve created the database above. Just enter the database details and click Save and continue. If the xenforo installer is successfully able to connect to the database, you can click begin button and it will start the installation process.

Step 3. Configure Site

On this step, the installer will let you configure settings for your site. Example settings are:

  • Site name: Litespeedtech
  • Site email address: xenforo@example.com
  • Username: litespeedtech
  • Password: litespeedtech

 

Once you are satisfied, you can finally click Create Administrator and you have successfully completed your installation. You will now be redirected to the Xenforo homepage, which looks something like:

You’ve successfully installed XenForo. Now you can browse at:

  • Front page: http://server_IP:8088/xenforo/index.php
  • Admin page: http://server_IP:8088/xenforo/admin.php

Set Up Xenforo Caching (Optional)

Follow the steps described on this page to set up the LSCache for Xenforo plugin