Try_files $uri $uri/ /index.php?$query_string Ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL' Ssl_certificate_key /etc/nginx/cert/ninja.key Ssl_certificate /etc/nginx/cert/ninja.crt Next, create a new virtual host configuration file inside /etc/nginx/ directory: nano /etc/nginx/conf.d/nfĪdd_header Strict-Transport-Security max-age=2592000 Configure Nginx for Invoice Ninja.Ĭreate an SSL Certificate and create a new virtual host configuration for Invoice Ninja: mkdir -p /etc/nginx/cert/openssl req -new -x509 -days 365 -nodes -out /etc/nginx/cert/ninja.crt -keyout /etc/nginx/cert/ninja.keychmod 600 /etc/nginx/cert/* Save and close the file also change some folders permissions: chown -R nginx:nginx /var/www/html/ninja/ Next, edit the app.php file with nano text editor: nano config/app.phpĪdd the key as shown below: 'key' => env('APP_KEY', 'y0urGenerated Key'), Run following command to generate the application key and note this application key: php artisan key:generate Next, seed the database with all records as shown below: php artisan db:seed You will be prompted for a run the command, type ‘yes’ and press Enter. Save the file and exit from the text editor and prepare the database with following command: php artisan migrate 'username' => env('DB_USERNAME', 'ninja'), Next, edit the database configuration in the config directory: nano config/database.phpĬhange the following lines: 'database' => env('DB_DATABASE', 'ninja_db'), Save the file and exit from the text editor. envĬhange the database values according to your database: DB_DATABASE=ninja_db Once the installation is done, rename the. Next, install all the Invoice Ninja dependencies using composer: cd /var/www/html/ninja You need to install composer: curl -sS | sudo php -install-dir=/usr/bin -filename=composer Next, start PHP-FPM and enable it to start at boot time using following commands: systemctl start php-fpmįirst thing to do is to go to Invoice Ninja’s download page and download the latest stable version of Invoice Ninja: cd /var/www/html/ Next, you will need to create a new directory for PHP session and socket file: mkdir -p /var/lib/php/sessionĬhown -R nginx:nginx /var/lib/php/session/ You will need to configure PHP-FPM pool for Nginx user: nano /etc/php-fpm.d/www.conf MariaDB > GRANT ALL PRIVILEGES ON ninja_db.* TO IDENTIFIED BY 'password' Once you are logged in to your database server you need to create a database for Invoice Ninja installation: MariaDB > CREATE DATABASE ninja_db This will prompt you for a password, so enter your MariaDB root password and hit Enter. Run the following command: mysql -u root -p Next we will need to log in to the MariaDB console and create a database for the Invoice Ninja. Remove test database and access to it? y you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB: mysql_secure_installationĬonfigure it like this: - Set root password? y You can secure MariaDB using the mysql_secure_installation script. Configuring MariaDB for Invoice Ninja.īy default, MariaDB is not hardened. Once the installation is finished, you will need to modify the php.ini configuration file: nano /etc/php.iniĬhange the following line: cgi.fix_pathinfo=0 Also install required PHP modules: yum install install php70w-fpm php70w-cli php70w-pear php70w-gd php70w-xml php70w-curl php70w-gmp php70w-pdo php70w-mysql php70w-zip php70w-mbstring php70w-mcrypt If you do not have a LEMP installed, you can follow our guide here. yum clean allĪ CentOS 7 LEMP stack server is required. First let’s start by ensuring your system is up-to-date. I will show you through the step by step installation Invoice Ninja on a CentOS 7 server. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. Invoice Ninja allows you to create your own custom invoice and show live invoice as PDF file. You can easily create and send invoices online in seconds. It is best solution for invoicing and billing customers. Invoice Ninja is a free and open source web-bases application software that can be used for invoicing, payments, time tracking and many more.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |