Skip to content

Installation

Terminal window
mkdir -p /var/www/billing
cd /var/www/billing
Terminal window
curl -Lo Billing.zip https://github.com/Zastinian/Billing/releases/latest/download/Billing.zip
unzip Billing.zip
rm Billing.zip
chmod -R 755 storage/* bootstrap/cache/
mysql -u root -p
# Remember to change 'yourPassword' below to be a unique password
CREATE USER 'BillingUser'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE billing;
GRANT ALL PRIVILEGES ON billing.* TO 'BillingUser'@'127.0.0.1' WITH GRANT OPTION;
exit
Terminal window
cp .env.example .env
composer install --no-dev --optimize-autoloader
php artisan key:generate --force

If these steps are omitted, billing may not work.

Terminal window
php artisan p:update:config
php artisan migrate --seed --force
php artisan p:update:settings
Terminal window
# If using NGINX or Apache (not on CentOS):
chown -R www-data:www-data /var/www/billing/*
# If using NGINX on CentOS:
chown -R nginx:nginx /var/www/billing/*
# If using Apache on CentOS
chown -R apache:apache /var/www/billing/*

Then, let’s set up a cron job. Run the following command to open the crontab configuration.

Terminal window
crontab -e

Copy and paste the following line to the file.

Terminal window
* * * * * php /var/www/billing/artisan schedule:run >> /dev/null 2>&1

Cache the configurations and views to optimize the performance.

Terminal window
php artisan config:cache
php artisan view:cache
php artisan queue:restart
Terminal window
php artisan p:make:client example@domain.com --admin