Elkarte is an open source discussion forum written in PHP that allows web developers to create a community forum fully responsive to mobile and wireless devices.
This tutorial was tested and written for an Ubuntu VPS, but it should work on any Debian based Linux distribution.
This install guide assumes that Apache, MySQL and PHP are already installed and configured on your virtual server. At the time of writing this tutorial, the latest stable version of Elkarte is 1.0.6 and it requires:
- PHP 5.3.x with the GD graphics library version 2.0.x+, XML, MySQLi and BCMath PHP extensions enabled;
- Apache Web Server >= 2.0 compiled with mod_rewrite module and with the following directives allowed: RewriteEngine, RewriteBase, RewriteCond and RewriteRule.;
- MySQL 5.0.19 or higher installed on your virtual server.
Let’s start with the installation. Make sure your server OS packages are fully up-to-date:
apt-get update apt-get upgrade
Download the latest version of Elkarte available at https://github.com/elkarte/Elkarte/releases/ to the server and extract it using the following commands:
cd /opt wget -O elkarte.zip https://github.com/elkarte/Elkarte/releases/download/v1.0.6/ElkArte_v1-0-6_install.zip mkdir -p /var/www/html/elkarte unzip -o elkarte.zip -d /var/www/html/elkarte/
Create a new MySQL database for Elkarte to use and assign a user to it with full permissions:
mysql -u root -p mysql> CREATE DATABASE elkartedb; mysql> GRANT ALL PRIVILEGES ON elkartedb.* TO 'elkarteuser'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION; mysql> FLUSH PRIVILEGES; mysql> quit
Do not forget to replace ‘your-password’ with a strong password.
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘elkarte.conf’ on your virtual server:
Then, run the following command:
ln -s /etc/apache2/sites-available/elkarte.conf /etc/apache2/sites-enabled/elkarte.conf
Or, use the a2ensite to enable the ‘elkarte.conf’ configuration in Apache:
sudo a2ensite elkarte.conf
Edit the ‘elkarte.conf’ configuration file:
and add the following lines to it:
<VirtualHost *:80> ServerAdmin firstname.lastname@example.org DocumentRoot /var/www/html/elkarte/ ServerName yourdomain.com ServerAlias www.yourdomain.com <Directory /var/www/html/elkarte/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/yourdomain.com-error_log CustomLog /var/log/apache2/yourdomain.com-access_log common </VirtualHost>
In order to set memory_limit, max_execution_time, max_input_time, post_max_size and upload_max_filesize and disable safe mode and Register Globals in PHP, edit the php.ini configuration file and add/modify the following lines:
register_globals = Off post_max_size = 128M upload_max_filesize = 128M memory_limit = 128M max_execution_time = 300 max_input_time = 300 safe_mode = Off
Optionally, add/modify the following lines in php.ini:
display_errors = Off html_errors = Off display_startup_errors = Off log_errors = On default_charset = "UTF-8" mbstring.func_overload = 0
Set the proper file permissions for the Apache web server to write to the Elkarte document root (‘/var/www/html/elkarte’) directory:
sudo chown -R www-data:www-data /var/www/html/elkarte/
Enable the Apache2 rewrite module if it is not already done so:
sudo a2enmod rewrite
Restart the Apache web server for the changes to take effect:
service apache2 restart
Open your favorite web browser, navigate to http://yourdomain.com , start the installation process and follow the easy instructions: enter your MySQL username, password and database name, then create an administrator account. For security reason, it is recommended to delete the install.php file.
Log in to the administration back-end of the Elkarte community forum at http://yourdomain.com/index.php?action=login and configure it according to your needs, install add-ons etc.
That is it. The Elkarte installation is now complete.
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install Elkarte forum for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.