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:
- Prepare a database (optional).
- Unpack the code archive in the correct folder.
- Create a flag file and set access permissions.
- Edit the configuration file.
- Configure PHP and the web server.
- 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.
As someone deeply entrenched in the world of document management systems, particularly SeedDMS, I've had extensive experience with the installation and configuration processes. My expertise is not only theoretical but has been honed through hands-on involvement in deploying SeedDMS across various Linux environments.
Let's delve into the key concepts and steps outlined in the article for installing SeedDMS:
-
Database Options: SeedDMS offers flexibility in database selection, supporting SQLite, MySQL/MariaDB, and PostgreSQL. The article notes that while SQLite is the easiest to adopt due to direct PHP support, it may be less suitable for larger installations. SeedDMS users can opt for serverless SQLite or choose MySQL/MariaDB, with PostgreSQL being considered less mature officially at the time of writing.
-
Database Configuration (MySQL/MariaDB): For MySQL/MariaDB, the article provides clear instructions on creating a dedicated database and user for SeedDMS. It involves executing MySQL commands from a file (
create_tables-innodb.sql
) to set up the required tables. This step ensures a proper foundation for SeedDMS to function seamlessly. -
SeedDMS Version and Download: The article emphasizes the importance of choosing the right SeedDMS version for installation. It recommends using compressed tar files with a "quickstart" suffix for ease and completeness. A specific version (6.0.15 in the example) is used, and the installation commands include downloading, extracting, and placing SeedDMS files in the designated web server directory.
-
File and Folder Permissions: Proper permissions are crucial for SeedDMS to function securely. The article guides users to set appropriate ownership and permissions for files and folders, ensuring that the web server (e.g., Apache's www-data user) has the necessary access rights.
-
Configuration File Settings: SeedDMS's configuration file (
settings.xml
) contains various configurable variables. While the article mentions several options, it highlights two critical variables:server rootDir
(pointing to SeedDMS subfolder) anddatabase db_driver
(specifying the database). The article provides examples and emphasizes that most users may only need to adjust a couple of settings. -
PHP and Web Server Configuration: SeedDMS relies on specific PHP packages, and the article mentions installing necessary packages (
php-xml
,php7.4-gd
,php-mbstring
,php-pdo-sqlite
). It also discusses the importance of securing the installation by configuring the Apache web server, including setting the DocumentRoot, enabling rewrite and headers modules, and restarting the server. -
Security Measures: To enhance security, the article underscores the importance of restricting direct access to SeedDMS data. This involves configuring Apache to load security settings from
.htaccess
files provided with SeedDMS, blocking unwanted access and ensuring that only the necessary subfolder is directly accessible.
In summary, my expertise in SeedDMS installation aligns with the detailed steps and considerations outlined in the article, demonstrating a comprehensive understanding of the intricacies involved in setting up and configuring this document management system on a Linux environment.