How to install PartKeepr on Clear Linux Latest
PartKeepr is an open-source inventory management software. In this tutorial, we will guide you through the process of installing PartKeepr on Clear Linux Latest.
Prerequisites
Before proceeding with the installation, you must have:
- A Clear Linux Latest installation that is up-to-date.
- A user account with sudo privileges.
Steps to install PartKeepr
- Update the system packages:
sudo swupd update
- Install the required packages:
sudo swupd bundle-add php-basic
sudo swupd bundle-add php-mysql
sudo swupd bundle-add mariadb-server
sudo swupd bundle-add nginx
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo systemctl enable nginx
sudo systemctl start nginx
- Download PartKeepr:
wget -O /var/www/PartKeepr.zip https://github.com/partkeepr/PartKeepr/releases/download/1.4.0/partkeepr-1.4.0.zip
- Unzip the downloaded file:
sudo unzip -q /var/www/PartKeepr.zip -d /var/www
- Rename the extracted folder:
sudo mv /var/www/partkeepr-1.4.0 /var/www/partkeepr
- Grant the required permissions:
sudo chown -R www-data:www-data /var/www/partkeepr
- Create a new PartKeepr database:
mysql -u root -p
Enter the root password when prompted.
CREATE DATABASE partkeepr;
GRANT ALL PRIVILEGES ON partkeepr.* TO 'partkeepr_user'@'localhost' IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
exit
Replace your_password with a strong password.
- Create a new virtual host for PartKeepr:
sudo nano /etc/nginx/sites-available/partkeepr
Add the following content:
server {
listen 80;
server_name your_domain.com;
root /var/www/partkeepr;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Replace your_domain.com with your domain name.
- Create a symbolic link:
sudo ln -s /etc/nginx/sites-available/partkeepr /etc/nginx/sites-enabled/
- Test the nginx configuration:
sudo nginx -t
If there are no errors, reload nginx:
sudo systemctl reload nginx
- Edit the PartKeepr configuration file:
sudo nano /var/www/partkeepr/app/config/parameters.yml
Replace the following lines:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: null
database_user: null
database_password: null
with:
database_driver: pdo_mysql
database_host: localhost
database_port: null
database_name: partkeepr
database_user: partkeepr_user
database_password: your_password
Replace your_password with the password you created earlier.
- Change the ownership of the PartKeepr cache and logs directories:
sudo chown -R www-data:www-data /var/www/partkeepr/app/cache
sudo chown -R www-data:www-data /var/www/partkeepr/app/logs
- Access PartKeepr in your web browser by visiting
http://your_domain.com.
Congratulations, you have successfully installed PartKeepr on Clear Linux Latest!