{"id":670,"date":"2018-10-18T07:23:16","date_gmt":"2018-10-18T07:23:16","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=670"},"modified":"2018-10-18T15:37:33","modified_gmt":"2018-10-18T15:37:33","slug":"howtoinstallinvoiceninjaonubuntu1604","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/howtoinstallinvoiceninjaonubuntu1604\/","title":{"rendered":"How to Install Invoice Ninja on Ubuntu 16.04 &#8211; LinuxCloudVPS Blog"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/08\/How-to-Install-Invoice-Ninja-on-Ubuntu-16.04.jpg\" alt=\"\" width=\"600\" height=\"300\" \/><\/p>\n<p>In this article we will show you how to install Invoice Ninja on an Ubuntu 16.04 server. InvoiceNinja is a free and open source software application written in PHP used for invoicing, billing customers and time tracking management system.<\/p>\n<h3>Requirements<\/h3>\n<p>In order to run Invoice Ninja on your Ubuntu 16.04 VPS, we need the following requirements met:<\/p>\n<ul>\n<li>Apache Web Server &gt;= 2.0 compiled with mod_rewrite module, or Nginx<\/li>\n<li>MySQL 5.5 or later is recommended, or MariaDB installed on your <a href=\"https:\/\/www.linuxcloudvps.com\/\" target=\"_blank\" rel=\"noopener\">Linux virtual server<\/a>.<\/li>\n<li>PHP 7.0 or higher with the mcrypt, mbstring, xml, curl, gd, json and mysql PHP extensions enabled.<\/li>\n<li>Full SSH root access or a user with sudo privileges is also required<\/li>\n<\/ul>\n<h3>Step 1: Log in via SSH on the Ubuntu server:<\/h3>\n<p>Log in to the VPS via SSH as user root<\/p>\n<p>ssh roo@IP_Address -p Port_number<\/p>\n<h3>Step 2: Update all packages<\/h3>\n<p>Once you are logged, run the following command to make sure that all installed OS packages are up to date:<\/p>\n<p>apt-get update<br \/>\napt-get upgrade<\/p>\n<h3>Step 3: Install Apache, MySQL (MariaDB) and PHP 7<\/h3>\n<p>Install Apache, MySQL (or MariaDB) and PHP 7 on your server using the following command:<\/p>\n<p>apt-get install apache2 libapache2-mod-php mysql-server php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-mysql php7.0-xml php7.0-mcrypt php7.0-mbstring php7.0-json<\/p>\n<p>Enable the Apache mod_rewrite module:<\/p>\n<p>sudo a2enmod rewrite<\/p>\n<p>Restart the Apache web server for the changes to take effect:<\/p>\n<p>sudo systemctl restart apache2<\/p>\n<h3>Step 4: Create a MySQL database for Invoice Ninja<\/h3>\n<p>Log into MySQL console with the root account:<\/p>\n<p>mysql -u root -p<\/p>\n<p>Now we will create a MySQL database for Invoice Ninja using the following query:<\/p>\n<p>mysql&gt; CREATE DATABASE invoiceninja;<\/p>\n<p>Then, execute the following query to add a separate user for Invoice Ninja that will interact with the database:<\/p>\n<p>mysql&gt; GRANT ALL PRIVILEGES ON invoiceninja.* to &#8216;invoiceninja&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;5tr0ng_Pa55w0rd&#8217;;<\/p>\n<p>Do not forget to replace \u20185tr0ng_Pa55w0rd\u2019 with an actual strong password.<\/p>\n<p>Execute the following command to apply the privileges we set:<\/p>\n<p>mysql&gt; FLUSH PRIVILEGES;<\/p>\n<p>Now we can exit the MySQL session:<\/p>\n<p>mysql&gt; quit<\/p>\n<h3>Step 5: Install Invoice Ninja<\/h3>\n<p>Download the latest stable version of Invoice Ninja in the \/opt directory on your server and extract it in the \/var\/www\/html\/ directory:<\/p>\n<p>cd \/opt<br \/>\nwget https:\/\/download.invoiceninja.com\/ -O invoice-ninja.zip<br \/>\nunzip invoice-ninja.zip -d \/var\/www\/html\/<\/p>\n<p>Set the appropriate file permissions and ownership (www-data is the user of the Apache web server):<\/p>\n<p>chown -R www-data:www-data \/var\/www\/html\/ninja\/<\/p>\n<h3>Step 6: Configure Apache to serve Invoice Ninja<\/h3>\n<p>Now we will have to setup the Apache configuration so it can serve the Invoice Ninja directory, add the following contents below to the \/etc\/apache2\/sites-available\/invoice-ninja.conf file with nano or your favorite editor:<\/p>\n<p>sudo nano \/etc\/apache2\/sites-available\/invoice-ninja.conf<\/p>\n<p>Add the following lines:<\/p>\n<p>&lt;VirtualHost *:80&gt;<br \/>\nServerAdmin admin@your-domain.com<br \/>\nServerName your-domain.com<br \/>\nServerAlias www.your-domain.com<br \/>\nDocumentRoot \/var\/www\/html\/ninja\/public\/<\/p>\n<p>&lt;Directory \/var\/www\/html\/ninja\/public&gt;<br \/>\nOptions +FollowSymlinks<br \/>\nAllowOverride All<br \/>\nRequire all granted<br \/>\n&lt;\/Directory&gt;<\/p>\n<p>ErrorLog \/var\/log\/apache2\/ninja-error_log<br \/>\nCustomLog \/var\/log\/apache2\/ninja-access_log common<br \/>\n&lt;\/VirtualHost&gt;<\/p>\n<p>Enable the Apache Invoice Ninja configuration:<\/p>\n<p>sudo a2ensite invoice-ninja.conf<\/p>\n<p>Remove the default Apache configuration file:<\/p>\n<p>rm \/etc\/apache2\/sites-enabled\/000-default.conf<\/p>\n<p>Now restart the Apache web server:<\/p>\n<p>sudo systemctl restart apache2<\/p>\n<p>Open your favorite web browser and type in the following URL to access the Invoice Ninja web interface and start the setup:<\/p>\n<p>http:\/\/your-domain.com\/<\/p>\n<p>From here you can finish the setup by entering the following information:<\/p>\n<p>Database Connection<\/p>\n<p>Driver: MySQL<\/p>\n<p>Database: invoiceninja<\/p>\n<p>Username: invoiceninja<\/p>\n<p>Password: enter the MySQL password for the invoiceninja MySQL user.<\/p>\n<p>Email Settings<\/p>\n<p>From Name: Enter your name<\/p>\n<p>From Address: use an email address on your server<\/p>\n<p>Username: enter the username of your email account<\/p>\n<p>Host: enter your domain name<\/p>\n<p>Port: 587<\/p>\n<p>Encryption: TLS<\/p>\n<p>Password: enter your email account password<\/p>\n<p>Then, create a new administrator account: enter your first name, last name, email address and password in the User details section.<\/p>\n<p>Once you created a new administrator account, log in at http:\/\/your-domain.com\/login.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/08\/Install-Invoice-Ninja-on-Ubuntu-16.04.jpg\" alt=\"Install Invoice Ninja on Ubuntu 16.04\" width=\"600\" height=\"398\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Congratulations! Invoice Ninja has been successfully installed on your server. You can now start using Invoice Ninja and customize it according to your needs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/08\/Install-Invoice-Ninja-Ubuntu-16.jpg\" alt=\"How to Install Invoice Ninja Ubuntu 16.04\" width=\"200\" height=\"109\" \/><\/p>\n<p>If you are one of our <a href=\"https:\/\/www.linuxcloudvps.com\/ubuntu-cloud-vps.html\">Ubuntu Cloud Hosting<\/a> clients, you can let our system administrators to install Invoice Ninja on your Ubuntu 16.04 server. They are super responsive and available 24\/7.<\/p>\n<p>Be the first to write a comment.<\/p>\n<p><a href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-invoice-ninja-on-ubuntu-16-04\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article we will show you how to install Invoice Ninja on an Ubuntu 16.04 server. InvoiceNinja is a free and open source software application written in PHP used for invoicing, billing customers and time tracking management system. Requirements In order to run Invoice Ninja on your Ubuntu 16.04 VPS, we need the following &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/howtoinstallinvoiceninjaonubuntu1604\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install Invoice Ninja on Ubuntu 16.04 &#8211; LinuxCloudVPS Blog&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-670","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=670"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/670\/revisions"}],"predecessor-version":[{"id":799,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/670\/revisions\/799"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}