MariaDB is a fork of the MySQL relational database management system. You can install it by running the following command:
sudo apt-get install mariadb mariadb-server -y
Next, start the MariaDB service and enable it to start at boot time with the following command:
sudo systemctl start mysqlsudo systemctl enable mysql
Next, secure MariaDB installation with the following command:
Answer all the questions:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
Remove anonymous users? [Y/n] Y
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
- Removing privileges on test database...
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Your MariaDb installation is now secure.
Next, login to MariaDB console with the following command:
mysql -u root -p
Enter your root password when prompted, then create a database user and password for Mantis BT.
MariaDB [(none)]>CREATE DATABASE mantis;
Next, create a user and password with the following command:
MariaDB [(none)]>CREATE USER 'mantisuser'@'localhost' IDENTIFIED BY 'yourpassword';
Next, grant privileges to the Mantis BT database with the following command:
MariaDB [(none)]>GRANT ALL PRIVILEGES ON mantis.* TO 'mantisuser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
Next, run the FLUSH PRIVILEGES command so that the privileges table will be reloaded by MySQL and we can use new credential:
MariaDB [(none)]>FLUSH PRIVILEGES;
Finally, exit from the MariaDB console with the following command:
Install Mantis BT
You can download the latest version of the mantis from their official website. You can download it with the wget command:
DirectoryIndex index.php index.html
Require all granted
Save and close the file. Then enable the virtual host with the following command.
sudo a2ensite mantis.conf
Finally, restart the apache service for the changes to take effects:
sudo systemctl restart apache2
Mantis BT runs on port 80, so you will need to allow port 80 through UFW firewall. By default, UFW is disabled in Ubuntu, so you will need to enable it first. You can enable it by running the following command:
sudo ufw enable
After enabling UFW, allow port 80 through UFW with the following command:
sudo ufw allow 80
Access Mantis BT
Once everything is configured. Open your web browser and navigate the URL http://yourdomain.com, you should see the Pre-installation Check page in the following image:
Provide all the required information such as database name, database username, password, admin username and password. Then click on the "Install/Upgrade" Database button. Once the installation is completed, you should see the following page:
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...