Linux
1. requirements
OSIRIS is a web application that runs on a Linux server. It is installed via the command line. You have to set up the distribution yourself, but the installation of all dependencies is also described below. OSIRIS has been tested with Debian 11 and CentOS 8, but the installation should also work on other distributions that provide the same packages.
- Linux server with root rights (not described further here)
- Web server (Apache2 recommended)
- PHP 8.x
- MongoDB server (tested with versions 5, 6 and 7)
- Composer
- Git
2. prepare server
2.1 Install Apache and PHP
Install Apache2, PHP 8 and the required PHP modules:
1 | |
1 | |
Start and activate Apache:
1 2 | |
1 2 | |
Please make sure that AllowOverwrite All is set in your Apache configuration (/etc/apache2/sites-enabled/000-default.conf).
You will need to reload Apache for the change to take effect:
1 | |
2.2 Install MongoDB
Follow the official instructions: MongoDB Installation
1 | |
1 | |
Start MongoDB and activate it at system startup:
1 2 | |
Check if MongoDB is running:
1 | |
2.3 Install MongoDB PHP driver
Important: Use the MongoDB driver version smaller 2.0!
1 | |
Add the following lines to your php.ini:
| php.ini | |
|---|---|
1 2 | |
3. download and install OSIRIS
3.1 Install Git
If Git is not yet installed, install it with :
1 | |
1 | |
3.2 Download OSIRIS
Change to the directory in which you want to install OSIRIS. The . at the end of the following command ensures that all files are loaded into the current directory. If you want to install OSIRIS in a subfolder, enter the path instead.
1 2 | |
3.3 Install Composer and resolve dependencies
Composer installs all dependencies that OSIRIS requires. This may take a few minutes.
1 2 3 | |
In case of problems:
1 | |
3.4 Customise configuration
The configuration of OSIRIS can be found in the file CONFIG.php. This file is not included in the Git repository as it must be adapted to the respective installation. Copy the CONFIG.default.php and rename it to CONFIG.php.
Important!
All server-side settings are made in the CONFIG.php file. Here you can configure the authentication method, the database connection and many other settings. This file is not overwritten during an update, so you do not have to make your settings again.
All information on the settings can be found in the Basic configuration section.
4 Configure Apache
4.1 Activate mod_rewrite
1 2 | |
1 2 | |
4.2 Note .htaccess
From OSIRIS version 1.3.6 the .htaccess file is supplied. When installing in a subfolder, please adjust RewriteBase and the ROOTPATH in config.php.
1 2 3 4 5 | |
5. test and install
Open your browser and go to:
1 | |
You should see a red box indicating that OSIRIS still needs to be installed. Don't panic, this only refers to the database. Click on "Install" and OSIRIS will create the database and prepare everything.
If you get an error message and the installation path is not found, check whether the .htaccess file exists and looks as described in 4.2. The path should also be set to "/".
Finally, the OSIRIS login page should load and the installation should be complete! 🎉
Summary: Checklist
- X] MongoDB is running
- X] Apache and PHP correctly installed
- X] MongoDB PHP driver version 1.21.0 active
- X] OSIRIS loaded from Git and Composer dependencies installed
- mod_rewrite active, AllowOverwrite All set and .htaccess customised
- X] OSIRIS loads in the browser