✅ Step-by-Step Installation of PartKeepr on Ubuntu Server
1. System Preparation
bashsudo apt update && sudo apt upgrade -y
sudo apt install unzip curl git -y
2. Install Apache, PHP, and MariaDB
bashsudo apt install apache2 mariadb-server mariadb-client -y
Install PHP and required extensions:
bashsudo apt install php php-mysql php-gd php-intl php-curl php-xml php-mbstring php-zip php-bcmath php-cli php-common php-soap php-imagick libapache2-mod-php -y
Ensure you’re using PHP 7.4 or newer (as required by PartKeepr):
bashphp -v
3. Configure MariaDB
Run secure installation:
bashsudo mysql_secure_installation
Then log in and create the database and user:
bashsudo mysql -u root -p
sqlCREATE DATABASE partkeepr CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'partkeepruser'@'localhost' IDENTIFIED BY 'StrongPasswordHere!';
GRANT ALL PRIVILEGES ON partkeepr.* TO 'partkeepruser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
4. Install Composer
bashcurl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
5. Install PartKeepr
Clone PartKeepr:
bashcd /var/www/
sudo git clone https://github.com/partkeepr/PartKeepr.git
sudo chown -R www-data:www-data PartKeepr
cd PartKeepr
Install dependencies:
bashsudo -u www-data composer install --no-dev --optimize-autoloader
6. Set Permissions
bashsudo chown -R www-data:www-data /var/www/PartKeepr
sudo chmod -R 755 /var/www/PartKeepr
7. Configure Apache
Create a config file:
bashsudo nano /etc/apache2/sites-available/partkeepr.conf
Paste:
apache<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/PartKeepr/web
ServerName partkeepr.local
<Directory /var/www/PartKeepr/web>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/partkeepr_error.log
CustomLog ${APACHE_LOG_DIR}/partkeepr_access.log combined
</VirtualHost>
Enable the site:
bashsudo a2ensite partkeepr.conf
sudo a2enmod rewrite
sudo systemctl reload apache2
8. Run the Setup Wizard
Navigate to:
cpphttp://<your-server-ip>/
Follow the setup wizard to configure database access, admin account, and finalize the installation.
9. Post-Install Tips
- Backups: Regularly back up the DB and
/var/www/PartKeepr
. - Security: Consider setting up HTTPS using Let’s Encrypt (
certbot
). - Performance: Install and configure PHP OPcache for better performance.