MyBB is a free, open supply and highly effective discussion board software program written in PHP language and makes use of MariaDB to retailer their knowledge. It gives a lot of options similar to help of varied plugins, widget help, customizable themes and lots of extra.
On this tutorial, we’ll discover ways to set up MyBB discussion board on Ubuntu 18.04 server.
Necessities
- A server operating Ubuntu 18.04.
- A root password is setup to your server.
Getting Began
Earlier than beginning, you will have to replace your system with the newest model. You are able to do this by operating the next command:
apt-get replace -y
apt-get improve -y
As soon as your server is up to date, restart your server to use the adjustments.
Set up LAMP Server
Subsequent, you will have to put in Apache, MariaDB server, PHP and different required packages to your server. You may set up all of them by operating the next command:
apt-get set up apache2 mariadb-server php7.2 php7.2-mysql php7.2-curl php7.2-json php7.2-cgi libapache2-mod-php7.2 php7.2-xmlrpc php7.2-gd php7.2-mbstring php7.2 php7.2-common php7.2-xmlrpc php7.2-soap php7.2-xml php7.2-intl php7.2-cli php7.2-ldap php7.2-zip php7.2-readline php7.2-imap php7.2-tidy php7.2-recode php7.2-sq php7.2-intl wget unzip -y
As soon as all of the packages are put in, open php.ini file and make some adjustments:
nano /and so forth/php/7.2/apache2/php.ini
Make the next adjustments:
file_uploads = On allow_url_fopen = On memory_limit = 256M upload_max_filesize = 30M post_max_size = 40M max_execution_time = 60 max_input_vars = 1500
Save and shut the file. Then, begin Apache and MariaDB service and allow them to start out on boot time with the next command:
systemctl begin apache2
systemctl begin mariadb
systemctl allow apache2
systemctl allow mariadb
Configure Database
By default, MariaDB isn’t secured. So, you will have to safe it. You are able to do this by operating the mysql_secure_installation script:
mysql_secure_installation
Reply all of the questions as proven under:
Enter present password for root (enter for none): Set root password? [Y/n]: N Take away nameless customers? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Take away check database and entry to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
As soon as the MariaDB is secured, log in to MariaDB shell with the next command:
mysql -u root -p
Enter your root password when immediate. Then, create a database and person for MyBB utilizing the next command:
MariaDB [(none)]> CREATE DATABASE mybbdb;
MariaDB [(none)]> CREATE USER 'mybb'@'localhost' IDENTIFIED BY 'password';
Subsequent, grant all of the privileges to MyBB database with the next command:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON mybbdb.* TO 'mybb'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
Subsequent, flush the privileges and exit from the MariaDB shell with the next command:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Set up MyBB
Subsequent, you will have to obtain the newest model of MyBB from their official web site. You are able to do it with the next command:
wget https://resources.mybb.com/downloads/mybb_1815.zip
As soon as the obtain has been accomplished, extract the downloaded file to the Apache internet root listing with the next command:
unzip mybb_1815.zip -d /var/www/mybb
Subsequent, you will have to rename default config file. You are able to do it with the next command:
cd /var/www/mybb/Add/inc
cp config.default.php config.php
Subsequent, give correct permissions to the mybb listing with the next command:
chown -R www-data:www-data /var/www/mybb/
chmod -R 755 /var/www/mybb/
After you have accomplished, you’ll be able to proceed to the subsequent.
Configure Apache for MyBB
Subsequent, you will have to create an Apache digital host file for MyBB. You may create it with the next command:
nano /and so forth/apache2/sites-available/mybb.conf
Add the next strains:
<VirtualHost *:80> ServerAdmin [email protected] ServerName instance.com DocumentRoot /var/www/mybb/Add/ <Listing /var/www/mybb/Add/> AllowOverride All enable from all </Listing> ErrorLog /var/log/apache2/mybb_error.log CustomLog /var/log/apache2/mybb_access.log mixed </VirtualHost>
Save and clsoe the file, if you find yourself completed. Then, allow mybb digital host file with the next command:
a2ensite mybb
Subsequent, allow Apache rewrite module and restart Apache service with the next command:
a2enmod rewrite
systemctl restart apache2
Subsequent, confirm the standing of Apache internet server with the next command:
systemctl standing apache2
You must see the next output:
? apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/apache2.service.d ??apache2-systemd.conf Lively: energetic (operating) since Wed 2019-01-27 8:56:45 UTC; 6s in the past Course of: 6498 ExecStart=/usr/sbin/apachectl begin (code=exited, standing=0/SUCCESS) Most important PID: 6517 (apache2) Duties: 1 (restrict: 1114) CGroup: /system.slice/apache2.service ??6517 /usr/sbin/apache2 -k begin March 27 8:56:45 ubuntu1804 systemd[1]: Beginning The Apache HTTP Server... March 27 8:56:45 ubuntu1804 apachectl[6498]: AH00557: apache2: apr_sockaddr_info_get() failed for ubuntu1804 March 27 8:56:45 ubuntu1804 apachectl[6498]: AH00558: apache2: Couldn't reliably decide the server's absolutely certified area identify, utilizing 127$ March 27 8:56:45 ubuntu1804 systemd[1]: Began The Apache HTTP Server.
Entry MyBB Web Interface
MyBB is now put in and configured, it is time to entry MyBB internet interface.
Subsequent, open your internet browser and kind the URL http://example.com. You may be redirected to the next web page:
Now, click on on the Subsequent button. You must see the License settlement within the following web page:
Now, settle for the license settlement by clicking on the Subsequent button. You must see the next web page:
Make certain all of the required packages has been put in. Then, click on on the Subsequent button. You must see the next web page:
Subsequent, present your database particulars like database identify, username, and password. Then, click on on the Subsequent button. You must see the next web page:
After creating all of the tables. Click on on the Subsequent button. You must see the next web page:
Now, click on on the Subsequent button to populate the desk. You must see the next web page:
Now, click on on the Subsequent button to load and import them and template. You must see the next web page:
Now, present all of the required board configuration particulars and click on on the Subsequent button. You must see the next web page:
Now, click on on the admin account particulars and click on on the Subsequent button. As soon as the set up has been accomplished efficiently, it’s best to see the next web page:
Now, click on on the Admin Management Panel. You must see the next web page:
Now, present your admin username and password. Then, click on on the Login button. You must see the MyBB default dashboard within the following web page:
Congratulations! you’ve efficiently put in and configured MyBB discussion board on Ubuntu 18.04 server. Be happy to ask me you probably have any questions.
Comments