Keep your documents organized with SeedDMS

Installing SeedDMS

SeedDMS installation could be documented and integrated better than it is. It surely helps to have some previous experience with installing LAMP (Linux + MySQL + Apache + PHP) applications in Linux, but either way, the process is still manageable without particular pain. You'll need to go through the following phases, which are quicker than they look:

  1. Prepare a database (optional).
  2. Unpack the code archive in the correct folder.
  3. Create a flag file and set access permissions.
  4. Edit the configuration file.
  5. Configure PHP and the web server.
  6. Finish the configuration from the web interface.

SeedDMS can use the serverless SQLite, as well as the MySQL/MariaDB or PostgreSQL database engines. At this time of writing, support for PostgreSQL is officially considered less finished than the other options. SQLite is the easiest to adopt because it is directly supported by PHP. However, at least within SeedDMS, it is slower and less robust than the others if your installation must handle more than very few users or a few hundred files.

To make SeedDMS run with MySQL or MariaDB, you must first create a dedicated database and user for it, then populate that database with the right tables. The steps for creating a database are well documented [4], so I will not describe them here. You can add the tables to the newly created database by typing the following command:

#>  cat SEEDDMS/seeddms/install/create_tables-innodb.sql | mysql -u SEEDDMS_USER -p SEEDDMS_DB

where create_tables-innodb.sql is the file that contains all the necessary MySQL commands, and the three uppercase strings are placeholders for the base directory of your SeedDMS installation, the name of the database it must use, and its dedicated user.

The SeedDMS distribution includes similar instruction files for the SQLite and PostgreSQL databases, and you can also perform the same operations in the graphical interface of Step 6 by ticking one box.

Installing SeedDMS

The SeedDMS website hosts several releases of SeedDMS versions 5 and 6. Unless you need to customize SeedDMS or run it with a heavily customized PHP configuration, it is highly recommmended to download and use only the compressed tar files that have a "quickstart" suffix. Those archives contain all the SeedDMS code, plus all the PHP PEAR modules it needs to work, as well as a complete directory tree that will also serve as a template for shared installations. The screenshots and instructions in this tutorial come from the 6.0.15 "quickstart" version of SeedDMS, installed on an Ubuntu 20.04 Linux system with the Apache web server, using the following commands:

#> wget seeddms-quickstart-6.0.15.tar.gz
#> tar xf seeddms-quickstart-6.0.15.tar.gz
#> sudo cp -r -p seeddms60x /var/www/html/dms

After putting all the SeedDMS files in a folder where they will be reachable by your web server, move to that folder and run the following commands (assuming your web server user is www-data):

#> chown -R www-data www-data data
#> chown www-data www-data conf/settings.xml
#> touch conf/ENABLE_INSTALL_TOOL

The first two instructions make the configuration file and the data folder of SeedDMS writable by the web server. The third creates an empty "flag" file that authorizes the graphical install tool to work.

The SeedDMS configuration file settings.xml contains plenty of configurable variables, together with documentation of what they do. Unless you have special needs, however, you will only need to change one or two settings before moving to the next step. One is server rootDir, which must point to the SeedDMS subfolder inside your SeedDMS root. Because I had copied all the files into /var/www/html/dms, I set this variable to:

server rootDir="/var/www/html/dms/seeddms/"

The other variable that might need editing is database db_driver, which specifies the database to use. However, as you can see in Figure 1, you could pass this information to SeedDMS from the graphical administration interface the first time you log in as administrator.

Figure 1: The final phase of a SeedDMS installation, where you can specify database and search engine parameters.

PHP and Web Server Configuration

Even the "quickstart" versions of SeedDMS depend on several general-purpose PHP packages. If they are not already present on your Linux server, the graphical interface will ask you to install them. On Ubuntu 20.04, for example, I had to install the following packages from the command line: m

#> sudo apt install php-xml php7.4-gd php-mbstring php-pdo-sqlite

For security reasons, only the www subfolder of a SeedDMS installation must be directly accessible from web browsers. Therefore, if you are running an Apache web server as I did, you should first set the DocumentRoot variable for your SeedDMS in your Apache configuration file to the complete path to that folder (/var/www/html/dms/www in my case). Next, you should also enable the rewrite and headers modules of Apache with the following commands, and then restart the server:

#> sudo a2enmod rewrite
#> sudo a2enmod headers
#> sudo systemctl restart apache2

These commands will make Apache load and use the security settings, written in several .htaccess files shipped with SeedDMS, that block unwanted direct access to your data.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News