Skip to content
Jan Böhmer edited this page Aug 25, 2018 · 3 revisions

Requirements

Installation via Docker

Part-DB can also installed via Docker. In that case you won't need to follow the following steps and the ones on the "Installation page". See https://github.com/Part-DB/Part-DB-docker for more informations.

In order for Part-DB to run properly, the following criteria must be met:

  • Web server with at least 15MB of space (with footprint images at least 60MB)
  • PHP >= 5.6.0 (less tested lower versions), we recommend php7 with PDO incl.MySQL Plugin and MBStrings, furthermore theGettext extension is needed
  • Installation of a cache (like php7.0-opcache) is recommended to increase performance
  • MySQL database with the storage engine InnoDB (MariaDB has also been successfully tested)
  • Web browser with JavaScript and HTML5 support.

Installation of the necessary server components

If you want to set up your own web server, you will find a small manual here. The server can be a physical computer in the network, or just a virtual machine (e. g.VirtualBox orVMware). You can also install Part-DB on a webspace that you rent from a hoster, as long as it meets the requirements of Part-DB. Then you do not need to install the server components yourself, but you can start directly with theInstallation of Part-DB.

Debian / Ubuntu

All the necessary components can be installed via the terminal (or in the software center):

  • PHP7: sudo apt-get install apache2 php7.0 mysql-server php7.0-mysql php7.0-curl libapache2-mod-php7.0 phpmyadmin php7.0-opcache php7.0-gettext
  • PHP5: sudo apt-get install apache2 php5 mysql-server php5-mysql php5-curl libapache2-mod-php5 php5-gettext phpmyadmin

When installing MySQL, a password for the MySQL user "root" is requested. Don't leave this field empty, otherwise you won't have access via phpMyAdmin! You need this password (which not must match the password of the system user "root") to log in later via phpMyAdmin.

When installing phpMyAdmin you may be confronted with questions. These should be answered as follows:

  • Question: Which web server do you want to configure automatically?
    • Answer: apache2
  • Question: Do you want to configure phpMyAdmin with "dbconfig-common"?
    • Answer: Yes
  • Question: Password of the administrative database user?
    • Answer: The same password that you specified for the user "root" when installing MySQL
  • Question: MySQL application password for phpMyAdmin?
    • Answer: Press OK (or Enter) without input

For more information and installation instructions (especially for Ubuntu) see ubuntuusers Wiki: [Apache] (http://wiki.ubuntuusers.de/Apache), [PHP] (http://wiki.ubuntuusers.de/PHP,[MySQL](http://wiki.ubuntuusers.de/MySQL),[MySQL Tools] (http://wiki.ubuntuusers.de/MySQL/Werkzeuge)

Configure Apache

Part-DB uses ". htaccess"files to protect certain directories from unauthorized access. However, these are usually not included in Apache's default configuration, which is a security risk! This setting should be changed.

In addition, it is recommended to deactivate "Directory Listing" globally, so that the files and directories of the web server cannot be searched via the web browser.

Under Debian/Ubuntu, this is done as follows:

sudo gedit /etc/apache2/sites-available/default

There in the block "<Directory /var/wwww/>... " replace the line "AllowOverride None" with "AllowOverride All", and "Options Indexes[...]" with "Options -Indexes[...]". Save and close the file. Then restart Apache:

sudo service apache2 restart

For more information, please visit https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles

Configure PHP

The default settings of PHP are usually quite good. However, if you want to be able to upload larger files (e. g. file attachments in part DB), you might have to adjust the file size limit for uploads. This is done in the file "php. ini", which is located in the directory "/etc/php5/apache2/" in Debian-based operating systems.

sudo gedit /etc/php5/apache2/php. ini

Search this file for the keyword "upload_max_filesize" and adjust the value accordingly. In addition, the values "post_max_size" and "memory_limit" must be at least the same size as "upload_max_filesize".

Check installation

If Apache has been installed successfully, you can check if Apache has been installed successfully by going to http://localhost in your web browser on the server. Here, the message "It works!" appears.

You can check if phpMyAdmin and MySQL are working correctly by logging in to http://localhost/phpmyadmin with the MySQL user "root" and the password given when installing MySQL.

The address http://localhost only works on the server itself. The mentioned websites can also be accessed from other PCs on the same network as the server. Then you have to replace "localhost" with the IP address of the server.

If phpMyAdmin cannot be invoked, a symbolic link may have to be created: sudo ln -s /usr/share/phpmyadmin /var/wwww/phpmyadmin

Installation of the language files

If the language for Part-DB is not yet installed, you can install it. This is usually not necessary, as the operating system is usually installed in the language you want to use later. However, it is possible that you only have an English operating system available, then you have to install the German language files manually.

This should be possible with the following command:

sudo locale-gen en_US.utf8

This installs the language "English (United States)". It is possible that you have to enter "de_DE. utf8@euro" to use the euro sign as currency symbol.

Installation of part DB

Once the installation of the server components has been completed successfully, you can now start the installation of Part-DB. How to do this is described in here.