How to Install PartKeepr on Debian Latest
PartKeepr is a free and open-source inventory management application that helps you keep track of your electronic components, datasheets, and suppliers. It is written in PHP and uses a MySQL database to store information.
This tutorial will guide you through the process of installing PartKeepr on a Debian Latest system.
Prerequisites
Before you begin, ensure that you have:
- A Debian Latest system with root or
sudoaccess. - Apache web server installed and running.
- PHP 7.2 or higher installed.
- MySQL database installed and running.
Step 1: Install Required Packages
First, you need to install some packages that are required by PartKeepr to run.
Open a terminal window and execute the following command:
sudo apt-get install git unzip php-zip php-dom php-mysql php-curl php-gd php-xml php-mbstring
This command will install Git, Unzip, and other PHP modules that are needed to run PartKeepr.
Step 2: Install Composer
Composer is a dependency manager for PHP. PartKeepr uses Composer to install its dependencies.
Use the following command to install Composer:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
This command will download and install Composer globally on your system.
Step 3: Download PartKeepr
Now, clone the PartKeepr repository from GitHub. Run the following command in the terminal:
sudo git clone https://github.com/partkeepr/PartKeepr.git /var/www/partkeepr
This will clone the PartKeepr repository into the /var/www/partkeepr directory.
Step 4: Install PartKeepr
In this step, we will install PartKeepr using Composer.
Change your current working directory to the PartKeepr directory:
cd /var/www/partkeepr
Now, run the following command to install PartKeepr:
sudo composer install --no-dev
This command will download and install all the necessary dependencies for PartKeepr.
Step 5: Configure PartKeepr
In this step, we will configure PartKeepr to connect to the MySQL database.
Copy the config/autoload/local.php.dist file to config/autoload/local.php:
sudo cp config/autoload/local.php.dist config/autoload/local.php
Open the config/autoload/local.php file with your favorite text editor:
sudo nano config/autoload/local.php
Find the doctrine section and modify the connection array to match your MySQL database credentials:
'connection' => [
// ...
'user' => 'your_database_username',
'password' => 'your_database_password',
'host' => 'localhost',
'dbname' => 'partkeepr',
],
Save and close the file.
Step 6: Set Permissions
In this step, we will set the appropriate permissions to the var directory.
Run the following command to set the permissions:
sudo chown www-data:www-data -R var/
sudo chmod 775 -R var/
This will give the Apache web server write permissions to the var directory.
Step 7: Enable Apache Rewrite Module
Finally, enable the Apache rewrite module to allow PartKeepr to use friendly URLs. Use the following command:
sudo a2enmod rewrite
Step 8: Restart Apache
To apply the changes, restart the Apache web server:
sudo systemctl restart apache2
Step 9: Access PartKeepr
Now, you can access PartKeepr by navigating to http://<your-server-ip>/partkeepr or http://localhost/partkeepr in your web browser.
If everything is set up correctly, you should see the PartKeepr login page.
Conclusion
You have successfully installed PartKeepr on Debian Latest.
Now you can start managing your electronic components, datasheets, and suppliers with ease.