How to Install PartKeepr on EndeavourOS Latest

PartKeepr is an open-source inventory management software for electronic components. It helps you keep track of your inventory and search for components quickly. In this tutorial, we will show you how to install PartKeepr on EndeavourOS Latest.

Prerequisites

Before we proceed with the installation, make sure that the following prerequisites are met.

Step 1: Install Required Packages

The first step is to install the required packages on your system. Open the terminal and run the following commands.

sudo pacman -Syu
sudo pacman -S apache php php-apache mariadb mariadb-clients mariadb-libs git

The above commands will update the system packages and install Apache, PHP, MariaDB, Git, and other required packages.

Step 2: Configure Apache & PHP

The next step is to configure Apache and PHP. Open the terminal and run the following command to edit the Apache configuration file.

sudo nano /etc/httpd/conf/httpd.conf

In the Apache configuration file, find the following lines and uncomment them by removing the # symbol.

LoadModule php_module modules/libphp.so
Include conf/extra/php_module.conf

Save and close the file.

Now, edit the PHP configuration file by running the following command in the terminal.

sudo nano /etc/php/php.ini

In the PHP configuration file, find the following lines and uncomment them by removing the ; symbol.

extension=pdo_mysql
extension=mysqli

Save and close the file.

Restart Apache to apply the changes by running the following command in the terminal.

sudo systemctl restart httpd.service

Step 3: Configure MariaDB

The next step is to configure MariaDB. Run the following command in the terminal to secure the MariaDB installation.

sudo mysql_secure_installation

Follow the on-screen instructions to set a root password, remove anonymous users, disallow remote root login, and remove test databases.

Log in to the MariaDB server by running the following command in the terminal.

sudo mysql -u root -p

Enter the root password you set during the secure installation process.

Create a new database for PartKeepr by running the following command in the MariaDB console.

CREATE DATABASE partkeepr;

Create a new user for the PartKeepr database by running the following command.

CREATE USER 'partkeepruser'@'localhost' IDENTIFIED BY 'your_password';

Grant all privileges to the PartKeepr user on the partkeepr database.

GRANT ALL PRIVILEGES ON partkeepr.* TO 'partkeepruser'@'localhost';

Flush the privileges to apply the changes.

FLUSH PRIVILEGES;

Exit the MariaDB console by typing exit;.

Step 4: Download and Install PartKeepr

The next step is to download and install PartKeepr. Run the following command in the terminal to download the PartKeepr source code from GitHub.

git clone https://github.com/partkeepr/PartKeepr.git

Move the downloaded PartKeepr source code to the Apache document root directory.

sudo mv PartKeepr /srv/http/

Change the ownership of the PartKeepr directory to the Apache user.

sudo chown -R http:http /srv/http/PartKeepr/

Run the following command to change the PartKeepr configuration file.

cp /srv/http/PartKeepr/app/Config/app.default.php /srv/http/PartKeepr/app/Config/app.php

Open the PartKeepr configuration file in the terminal.

sudo nano /srv/http/PartKeepr/app/Config/app.php

Find the following lines and replace username and password with the MariaDB database user and password you set earlier.

'Datasources' => [
    'default' => [
        'host' => 'localhost',
        'port' => '3306',
        'username' => 'username',
        'password' => 'password',
        'database' => 'partkeepr',
        'log' => true,
        'url' => env('DATABASE_URL', null),
    ],
],

Save and close the file.

Restart Apache to apply the changes by running the following command in the terminal.

sudo systemctl restart httpd.service

Step 5: Configure PartKeepr

The final step is to configure PartKeepr. Open your web browser and enter the following address.

http://localhost/PartKeepr

Follow the on-screen instructions to set up PartKeepr.

Congratulations! You have now installed PartKeepr on your EndeavourOS system. You can use it to manage your electronic component inventory.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!