If you’re using Invoice Ninja for your production site, then you are free to use a different SSL. Let’s create that directory and navigate to it: mkdir -p /etc/nginx/ssl & cd /etc/nginx/sslĪnd run the following commands to generate the SSL cert with openssl: openssl genrsa -des3 -passout pass:x -out 2048 openssl rsa -passin pass:x -in -out ininja.key rm openssl req -new -key ininja.key -out ininja.csr openssl x509 -req -days 365 -in ininja.csr -signkey ininja.key -out ininja.crt We’ll create the SSL certificate under /etc/nginx/ssl. You’re dealing with invoices, so it’s expected that you use an SSL certificate. To do that, create a new file ‘nf’ using nano: nano /etc/opt/remi/php71/php-fpm.d/nfĪdd the following lines to the file and save it: Ĭhdir = / Installing and configuring an SSL We’ll configure the php-fpm module to run as the user ‘ninja’. Next, we need to create a user account that will be associated with our Invoice Ninja install: useradd ninja So, since we won’t use both PHP 5 and PHP 7, we’ll create a symbolic link: ln -s /usr/bin/php71 /usr/bin/php Since Invoice Ninja is built with PHP/Laravel, we’ll need to install PHP 7 and all other necessary modules: yum install php71 php71-php-fpm php71-php-gd php71-php-curl php71-php-mcrypt php71-php-cli php71-php-gmp php71-php-mbstring php71-php-zip php71-php-xml php71-php-pdo php71-php-memcached php71-php-mysqliīy default PHP version in CentOS 7 is version 5. MariaDB isn’t properly configured and secured yet, so run this script: mysql_secure_installationįollow the steps on the interactive CLI interface to properly configure MariaDB.Īfter you are done, move on to creating an actual database and user for your Invoice Ninja install.Įnter your password and then enter the following commands (update them according to your needs – change username, password etc.): CREATE DATABASE thrninja GRANT ALL ON thrninja.* to identified by 'YourStrongPassword' FLUSH PRIVILEGES exit Next, enable MariaDB to start automatically on startup: systemctl enable mariadbĪnd now start MariaDB: systemctl start mariadb The instructions are pretty much the same.įirst, install mariadb: yum install mariadb mariadb-server We’re going to use MariaDB, but you might want to use MySQL. We obviously need a database for Invoice Ninja. To install Nginx on CentOS, just run the following command: yum install nginx Now, we’re going to install some tools that we’ll soon need: yum install wget nano unzip openssl We’ll also need the remi and webtatic repositories, to add them, run these 2 commands: rpm -Uvh rpm -Uvh Īfter all the repositories are installed, we need to update the package cache again: yum update Next, install the epel-release for CentOS 7: yum repo-pkgs extras install epel-release Update your system and install necessary packagesĪlways start by updating your system. If you don’t use a root user, append ‘sudo’ on each command. All the commands in our tutorial will be executed by a root user.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |