Invoice Ninja is a free and open-source invoicing, expenses, and time-tracking software. In this tutorial, we will guide you through the process of installing Invoice Ninja on OpenSUSE Latest.
Before you start with the installation process, make sure that you have the following:
sudo
privileges.Invoice Ninja requires a web server, database server, and PHP to run. We can easily set up all these components by installing the LAMP stack. To install LAMP stack on OpenSUSE, run the following command:
sudo zypper in apache2 mariadb mariadb-client php7 php7-mysql apache2-mod_php7 php7-gettext
Next, we need to create a new database and user for Invoice Ninja. To do so, login to the MariaDB server with the following command:
sudo mysql -u root -p
Then, create a new database and a user with the following commands:
CREATE DATABASE invoiceninja;
CREATE USER 'invoiceninja'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON invoiceninja.* TO 'invoiceninja'@'localhost';
FLUSH PRIVILEGES;
Replace password
with a strong password for the user.
Next, download the latest version of Invoice Ninja from their official website with the following command:
wget https://download.invoiceninja.com --content-disposition
Extract the downloaded file and move the contents to the Apache document root directory with the following commands:
tar -xzvf invoiceninja-*.tar.gz
sudo mv invoiceninja /srv/www/htdocs/
Next, set the ownership and permission of the Invoice Ninja directory with the following commands:
sudo chown -R wwwrun:www /srv/www/htdocs/invoiceninja/
sudo chmod -R 755 /srv/www/htdocs/invoiceninja/
Next, we need to create an Apache Virtual Host configuration file for Invoice Ninja. Create a new virtual host file in the Apache configuration directory with the following command:
sudo nano /etc/apache2/vhosts.d/invoiceninja.conf
Then, paste the following content into the file:
<VirtualHost *:80>
ServerName invoiceninja.example.com
ServerAlias www.invoiceninja.example.com
DocumentRoot /srv/www/htdocs/invoiceninja/public
<Directory /srv/www/htdocs/invoiceninja>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI}::%{QUERY_STRING} \.(gif|jpg|png|ico|txt|js|css|pdf)\::.*$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ index.php [L]
</IfModule>
</VirtualHost>
Replace invoiceninja.example.com
with your domain name or IP address.
Next, enable the rewrite
module and restart the Apache service with the following commands:
sudo a2enmod rewrite
sudo systemctl restart apache2
Open your web browser and navigate to http://invoiceninja.example.com
. You will be redirected to the Invoice Ninja installation wizard. Follow the on-screen instructions to complete the installation.
During the installation, you will be asked to provide the database details that we have created earlier.
Once the installation is complete, you will have access to the Invoice Ninja dashboard.
Congratulations! You have successfully installed and configured Invoice Ninja on OpenSUSE Latest. You can now start using this awesome invoicing software and manage your invoices, expenses, and time-tracking with ease.
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!