{"id":27916,"date":"2018-08-29T04:14:03","date_gmt":"2018-08-29T09:14:03","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=27916"},"modified":"2022-06-03T03:34:42","modified_gmt":"2022-06-03T08:34:42","slug":"how-to-install-invoice-ninja-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-invoice-ninja-on-centos-7\/","title":{"rendered":"How to Install Invoice Ninja on CentOS 7"},"content":{"rendered":"
<\/p>\n
This tutorial covers the installation of Invoice Ninja onto Centos 7 VPS<\/a> with Apache, PHP, and MariaDB. Invoice Ninja is a free and self-hosted platform for invoicing, billing, and payment management based on Laravel. It is very easy to use and it can be integrated with most of the popular payment gateways, including PayPal, 2CheckOut, Stripe, WePay, and many more… which makes it a perfect solution for freelancers and small or medium-sized businesses. Looking to get some fully managed hosting for your InvoiceNinja account? We offer complete migration, installation, optimization, and customization – 100% free of charge! Check out our premium affordable VPS hosting packages<\/a> and switch to a more secure, more efficient server with 24\/7\/265 amazing customer support today.<\/p>\n <\/p>\n – Create invoices and quotations in no time – CentOS 7 VPS with 2GB of RAM We will install Invoice Ninja through the command line interface, so first, we need to login to the CentOS 7 VPS via SSH as user root<\/p>\n Once you are logged in, don’t forget to update all packages installed on the server<\/p>\n Apache can be easily installed from the official CentoOS 7 repositories using the following command<\/p>\n After the installation manager complete the installation, start the web server and enable it to start automatically after a restart<\/p>\n CentOS 7 by default comes with PHP 5.4 which has reached the end of life and it is no longer supported. So, in this tutorial we will install PHP 7 instead. For this purpose we have to add the Webtatic EL yum repository.<\/p>\n Once the repository is added, we can proceed to install PHP and several PHP modules<\/p>\n verify that PHP 7 is installed<\/p>\n Invoice Ninja stores its information in a database. So, we will install MariaDB database server and create a new database along with a user able to access it. Run the following command to install MariaDB server<\/p>\n Start the server and enable it to start upon reboot<\/p>\n Run the ‘mysql_secure_installation’ post installation script to secure your MariaDB server and set a password for the MySQL ‘root’ user.<\/p>\n Next, login to the database server as user root,<\/p>\n Replace ‘PASSWORD’ with an actual strong password.<\/p>\n Download the latest stable of Invoice Ninja to your server. At the moment of writing this article it is version 4.5.3<\/p>\n unpack the downloaded ZIP file to the document root the directory of your server. The ZIP file includes all necessary third party libraries.<\/p>\n The content of Invoice Ninja will be stored in a new ‘ninja’ directory.<\/p>\n <\/a><\/p>\n Configure Invoice Ninja to use the newly created MariaDB database<\/p>\n Open the .env file and find and modify the following lines<\/p>\n Save the changes and run the following commands necessary to prepare the MariaDB database<\/p>\n Set the correct ownership to the Invoice Ninja directory<\/p>\n In order to be able to access Invoice Ninja with your domain name, we will create Apache virtual host for the domain.<\/p>\n Create a new virtual host directive with the following content<\/p>\n Save the file and restart the web server for the changes to take effect<\/p>\n If you closely followed the tutorial, with this step the installation of Invoice Ninja is completed and you can start using it. Open your web browser and navigate it to http:\/\/your-domain.com and follow the web-based installation wizard to finalize the installation.<\/p>\n Of course, you don\u2019t have to install Invoice Ninja on CentOS 7 if you use one of our Managed CentOS Hosting<\/a> or Linux VPS hosting<\/a> plans, in which case you can simply ask our expert Linux admins to install Invoice Ninja on CentOS 7 for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS.<\/strong> <\/span>If you liked this post on how to install Invoice Ninja on CentOS 7, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks<\/p>\n\n\n <\/p>\n","protected":false},"excerpt":{"rendered":" This tutorial covers the installation of Invoice Ninja onto Centos 7 VPS with Apache, PHP, and MariaDB. Invoice Ninja is … <\/p>\n
– Easy time tracking & task creation.
– Send invoices and accept online payments
– Integrate with 30+ gateways including Stripe, PayPal, Authorize and Dwolla
– Easily create quotes and invoices online
– Custom invoice URL’s Company.InvoiceNinja.com
– iOS and Android apps<\/p>\nPrerequisites<\/strong><\/h3>\n
– SSH access with root privileges
– PHP version 5.5.9 or newer
– MySQL\/MariaDB database server
– Apache\/Nginx web server<\/p>\nLogin via SSH and update the server<\/strong><\/h3>\n
ssh root@IP_Address -p Port_Number<\/pre>\n
yum -y update<\/pre>\n
<\/a><\/h3>\n
Install Apache web server<\/strong><\/h3>\n
yum -y install httpd<\/pre>\n
systemctl start httpd\nsystemctl enable httpd<\/pre>\n
Install PHP 7<\/strong><\/h3>\n
yum -y install epel-release\nrpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/pre>\n
yum install php70w php70w-common php70w-curl php70w-mysql php70w-mbstring php70w-mcrypt php70w-xml php70w-cli php70w<\/pre>\n
php -v\nPHP 7.0.31 (cli) (built: Jul 20 2018 08:55:22) ( NTS )\nCopyright (c) 1997-2017 The PHP Group<\/pre>\n
Install MariaDB database server<\/strong><\/h3>\n
yum -y install mariadb<\/pre>\n
systemctl start mariadb\nsystemctl enable mariadb<\/pre>\n
mysql -u root -p\n\nMariaDB [(none)]> CREATE DATABASE ninja;\nMariaDB [(none)]> CREATE USER 'user'@'localhost' IDENTIFIED BY 'PASSWORD';\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON ninja.* TO 'user'@'localhost';\nMariaDB [(none)]> FLUSH PRIVILEGES\nMariaDB [(none)]> exit<\/pre>\n
Install and Configure Invoice Ninja<\/strong><\/h3>\n
curl -L https:\/\/download.invoiceninja.com\/ -o invoiceninja.zip<\/pre>\n
unzip invoiceninja.zip -d \/var\/www\/html<\/pre>\n
cd \/var\/www\/html\/ninja\/\ncp -v .env.example .env<\/pre>\n
DB_DATABASE=ninja\nDB_USERNAME=user\nDB_PASSWORD=PASSWORD<\/pre>\n
php artisan migrate\nphp artisan db:seed<\/pre>\n
chown -R apache:apache \/var\/www\/html\/ninja<\/pre>\n
Create Apache virtual host<\/strong><\/h3>\n
vi \/etc\/httpd\/conf.d\/invoiceninja.conf\n\nServerAdmin admin@your-domain.com\nDocumentRoot \/var\/www\/html\/ninja\/public\nServerName your-domain.com\nServerAlias www.your-domain.com\n\nOptions +FollowSymlinks\nAllowOverride All\n\nErrorLog \/var\/log\/httpd\/invoiceninja-error_log\nCustomLog \/var\/log\/httpd\/invoiceninja-access_log common\n<\/pre>\n
systemctl restart httpd<\/pre>\n
\n