How to Install OJS (Open Journal Systems) on Ubuntu
OJS (Open Journal Systems) is a web-based application used for management and publication of scientific journals with a free software license (GNU GPL). OJS has been implemented by many universities in the world.
0. The software used
Tutorial ini menggunakan:
- OS: Ubuntu 20.04
- Web Server: Apache 2.4
- PHP Runtime: PHP 7.4
- Database: MariaDB 10.3
- Subdomain: ojs.ilhamdi.com
- SSL: Let’s Encrypt
- OJS: OJS 3.2
1. Install Apache
Install Apache web server.
1 | apt install apache2 -y |
Create a virtual host for the subdomain ojs.ilhamdi.com.
1 | nano /etc/apache2/sites-available/ojs.ilhamdi.com.conf |
The contents of the virtual host configuration file.
1 2 3 4 5 6 7 8 9 10 11 | <VirtualHost *:80> ServerName ojs.ilhamdi.com DocumentRoot /var/www/ojs.ilhamdi.com <Directory /var/www/ojs.ilhamdi.com> Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/ojs.ilhamdi.com_error.log CustomLog /var/log/apache2/ojs.ilhamdi.com_access.log combined </VirtualHost> |
Create a document root folder.
1 2 | mkdir /var/www/ojs.ilhamdi.com echo "open journal system" > /var/www/ojs.ilhamdi.com/index.html |
Enable virtual host and Apache module.
1 2 3 4 | a2ensite ojs.ilhamdi.com.conf a2enmod rewrite systemctl restart apache2 systemctl status apache2 |
Test browse http://ojs.ilhamdi.com.
2. Install SSL
Install certbot Let’s Encrypt.
1 | snap install --classic certbot |
1 | certbot --apache -d ojs.ilhamdi.com |
Test browse https://ojs.ilhamdi.com.
3. Install PHP
Install PHP and its extensions.
1 | apt install php libapache2-mod-php php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-json -y |
Restart Apache service.
1 2 | systemctl restart apache2 systemctl status apache2 |
Create a phpinfo file.
1 | echo "<?php phpinfo(); ?>" > /var/www/ojs.ilhamdi.com/info.php |
Test browse https://ojs.ilhamdi.com/info.php
4. Install MariaDB
Install MariaDB database.
1 | apt install mariadb-server mariadb-client -y |
Secure MariaDB installation.
1 | mysql_secure_installation |
Answer the question.
1 2 3 4 5 6 | Enter current password for root (enter for none): ENTER Set root password? [Y/n] y 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 |
Create database and user for OJS.
1 2 3 4 5 6 7 | mysql -u root -p CREATE DATABASE ojs; CREATE USER 'ojsuser'@'localhost' IDENTIFIED BY 'ojspass'; GRANT ALL PRIVILEGES ON ojs.* TO 'ojsuser'@'localhost'; FLUSH PRIVILEGES; EXIT; |
Download OJS.
1 | wget -c http://pkp.sfu.ca/ojs/download/ojs-3.2.1.tar.gz |
Delete the document root folder that was created earlier because you want to replace it with the extracted OJS folder.
1 2 3 4 | rm -rf /var/www/ojs.ilhamdi.com tar xzvf ojs-3.2.1.tar.gz mv ojs-3.2.1 /var/www/ojs.ilhamdi.com chown -R www-data:www-data /var/www/ojs.ilhamdi.com |
Create an ojs-files folder.
1 2 | mkdir /var/www/ojs-files chown -R www-data:www-data /var/www/ojs-files |
Browse https://ojs.ilhamdi.com.
Check the system whether the prerequisites for OJS installation are met.
Create an administrator account.
Directory for uploading files.
Configure the database, choose MySQLi database drivers, username, password, and database. Uncheck Create new database because a database has been created.
Repository identifier, match the subdomain that is used. Then click Install Open Journal Systems .
The OJS installation is complete.
Administrator login URL at https://ojs.ilhamdi.com/index.php/index/login.
OJS front page view.
If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!
Donate via PayPal: https://paypal.me/musaamin