User Tools

Site Tools


deploying_sis_on_debian

Deploying the Student Information System on Debian)

Only experience IT staff should try any of this. Basic Linux experience is highly desirable.

The Pacific Student Information System (FedSIS, MISIS) is based on openSIS. So here we document how to install that on a Debian server (e.g. a Debian Virtual Machine). This could be useful to bring the SIS with your for training where Internet is unreliable or not existant.

First, you need to ssh into the server from your own machine as shown below

user@yourmachine:~$ ssh user@ip.address.of.server
The above ip.address.of.server will depend on your network.

Alternatively you can work directly in the console of the virtual machine (e.g. VirtualBox's console of the VM).

Once logged in make sure are as root user and browse to the /var/www/ directory.

user@server:~$ su
root@server:~# cd /var/www/

Before installing anything upgrade the system and make sure some of the basic software is already installed.

root@server:~$ sudo apt-get update
root@server:~$ sudo apt-get upgrade
root@server:~$ sudo apt-get install wget rsync openssh-server sudo vim tar gzip aptitude

Download the latest OpenSIS into a zip file. This step will depend if you are installing a new setup or a clone of your country's production system with all it's current data.

For a new installation use this.

root@server:~$ wget -c https://codeload.github.com/OS4ED/openSIS-Responsive-Design/zip/master -O opensis.zip

For a clone of your own production system it will look more like this.

root@server:~$ wget -c https://www.pacific-emis.org/files/misis.pss.edu.mh.tar.gz

Decompress the files. Use one of the following commmand only depending on which files you downloaded in previous step.

root@server:~$ unzip opensis.zip
root@server:~$ tar zxvf misis.pss.edu.mh.tar.gz

Change the ownership.

root@server:~$ sudo chown www-data:www-data -R /var/www/misis.pss.edu.mh/
Above we copied to misis.pss.edu.mh as example for RMI deployment. In FSM you could call it fedsis.doe.fm

Now we install the web server and other dependencies.

root@server:~$ sudo apt-get install php php-cli php-common php-mysql php-imagick php-intl php-gd php-pear imagemagick apache2 libapache2-mod-php mcrypt

Now configure a virtual host to run the SIS web application. Open the file below (called differently based on country or school).

root@server:~$ nano /etc/apache2/sites-available/misis.pss.edu.mh.conf

And copy the following text in it. you save it the same way as above: press Control-X (i.e. the Control key followed by the x key at the same time) following by Y and Enter to say yes and close the text editor.

<VirtualHost *:80>
    ServerAdmin webmaster@nuzusys.com
    ServerName misis-offline.pss.edu.mh
    ServerAlias misis-local.pss.edu.mh
    DocumentRoot /var/www/misis.pss.edu.mh
    LogLevel info
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Now activate your newly setup virtual host website and restart the web server (or reload it).

root@server:~$ a2ensite misis.pss.edu.mh.conf
root@server:~$ systemctl restart apache2

Now install the database server MariaDB (MySQL.) You will need to enter the password. Use the same as your VM root password so you don't forget.

This is not best security practice as far as passwords go but for the purposed of training and testing on virtual machines it is fine.
If you already have the MariaDB server installed then the following steps (i.e. next three commands) are not necessary. If you have MariaDB already installed you may have to Reset MySQL root password if you do not know it.
root@server:~$ apt-get install mariadb-server

Make sure the mariadb server is enabled and started.

root@server:~$ systemctl enable mariadb.service
root@server:~$ systemctl start mariadb.service

(Optional) Change an important setting of the MariaDB server. You will have to enter the MariaDB root password for the following command.

root@server:~$ mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"

Optionally check the above setting was changed.

root@server:~$ mysql -u root -p -e "SELECT @@GLOBAL.sql_mode;"

Now if you are cloning your existing production system with the data you will need to create a database for it and load the backup into it. To do this you will have to login the MariaDB database server.

root@server:~$ mysql -u root -p
mysql# 

Then create the database.

mysql# CREATE DATABASE misisoffline;
mysql# quit;

Load the database backup which should have been included for you in the download file.

root@server:~$ mysql -u root -p misisoffline < /var/www/misis.pss.edu.mh/mysql-misis-22022021-125047-backup.sql

At this point you should be able to login. As a final step for the workstations on the network you want to find the offsite installation you will need to configure them a DNS entry in the hosts file. As an administrator open notepad and open the file C:\Windows\System32\drivers\etc\hosts. Add the following line so other can connect to your server with the hostname and save.

ip.address.of.server    misis-offline.pss.edu.mh

Open a browser and point it to http://misis-offline.pss.edu.mh/

You can stop here if this was a clone of your production system. If you were setting up a brand new installation you need to complete as follows. Click New Installation.

Make sure you have all dependencies met. Click Continue.

Enter the MySQL Server details (i.e. the password put previously). Click Save & Next.

Enter the database name. Click Save & Next.

Enter the school details. Click Save & Next.

Enter the first admin user as follows. Click Save & Next.

You should see the following. Click on Proceed to openSIS Login.

Login with your admin user.

deploying_sis_on_debian.txt · Last modified: 2021/02/22 03:29 by ghachey