InvoicePlane është një aplikacion faturimi falas dhe me burim të hapur. Kodi burimor i tij mund të gjendet në këtë depo Github . Ky udhëzues do t'ju tregojë se si të instaloni InvoicePlane në një shembull të ri të FreeBSD 12 Vultr.
Kërkesat
- Nginx
- Versioni i MySQL 5.5 ose më i madh ose ekuivalent i MariaDB
- Versioni PHP 7.0 ose më i ri
- Shtesat e mëposhtme PHP duhet të instalohen dhe aktivizohen:
php-gd
php-hash
php-json
php-mbstring
php-mcrypt
php-mysqli
php-openssl
php-recode
php-xmlrpc
php-zlib
Perpara se te fillosh
Kontrolloni versionin e FreeBSD.
uname -ro # FreeBSD 12.0-RELEASE
Sigurohuni që sistemi juaj FreeBSD të jetë i përditësuar.
freebsd-update fetch install pkg update && pkg upgrade -y
Instaloni paketat e nevojshme.
pkg install -y sudo vim unzip curl wget bash socat git
Krijo një llogari të re përdoruesi me emrin e përdoruesit të preferuar. ne do të përdorim johndoe.
adduser # Username: johndoe # Full name: John Doe # Uid (Leave empty for default): <Enter> # Login group [johndoe]: <Enter> # Login group is johndoe. Invite johndoe into other groups? []: wheel # Login class [default]: <Enter> # Shell (sh csh tcsh nologin) [sh]: bash # Home directory [/home/johndoe]: <Enter> # Home directory permissions (Leave empty for default): <Enter> # Use password-based authentication? [yes]: <Enter> # Use an empty password? (yes/no) [no]: <Enter> # Use a random password? (yes/no) [no]: <Enter> # Enter password: your_secure_password # Enter password again: your_secure_password # Lock out the account after creation? [no]: <Enter> # OK? (yes/no): yes # Add another user? (yes/no): no # Goodbye!
Ekzekutoni visudokomandën dhe hiqni komentin e %wheel ALL=(ALL) ALLlinjës, për të lejuar anëtarët e wheelgrupit të ekzekutojnë çdo komandë.
visudo # Uncomment by removing hash (#) sign # %wheel ALL=(ALL) ALL
Tani, kaloni te përdoruesi juaj i sapokrijuar me su.
su - johndoe
SHËNIM: Zëvendësojeni johndoeme emrin tuaj të përdoruesit.
Vendosni zonën kohore.
sudo tzsetup
Instaloni PHP dhe shtesat e kërkuara PHP
Instaloni PHP, si dhe shtesat e nevojshme PHP.
sudo pkg install -y php72 php72-mbstring php72-tokenizer php72-pdo php72-pdo_mysql php72-openssl php72-hash php72-json php72-phar php72-filter php72-zlib php72-dom php72-xml php72-xmlwriter php72-xmlreader php72-pecl-imagick php72-curl php72-session php72-ctype php72-iconv php72-gd php72-simplexml php72-zip php72-filter php72-tokenizer php72-calendar php72-fileinfo php72-intl php72-phar php72-soap php72-xmlrpc php72-opcache php72-mysqli php72-bcmath php72-gmp
Kontrolloni versionin.
php --version # PHP 7.2.19 (cli) (built: Jun 20 2019 01:25:01) ( NTS ) # Copyright (c) 1997-2018 The PHP Group # Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
Lidhja e butë php.ini-productionme php.ini.
sudo ln -s /usr/local/etc/php.ini-production /usr/local/etc/php.ini
Aktivizo dhe nis PHP-FPM.
sudo sysrc php_fpm_enable=yes sudo service php-fpm start
Instaloni MariaDB
Instaloni MariaDB.
sudo pkg install -y mariadb102-client mariadb102-server
Kontrolloni versionin.
mysql --version # mysql Ver 15.1 Distrib 10.2.24-MariaDB, for FreeBSD12.0 (amd64) using readline 5.1
Filloni dhe aktivizoni MariaDB.
sudo sysrc mysql_enable="yes" sudo service mysql-server start
Ekzekutoni mysql_secure_installationskriptin për të përmirësuar sigurinë e instalimit tuaj MariaDB.
sudo mysql_secure_installation
Hyni në MariaDB si përdoruesi rrënjë.
mysql -u root -p # Enter password:
Krijo një bazë të dhënash dhe përdorues të ri MariaDB. Mbani mend kredencialet për këtë përdorues të ri.
CREATE DATABASE dbname; GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; exit;
Instaloni Nginx
Instaloni Nginx.
sudo pkg install -y nginx
Kontrolloni versionin.
nginx -v # nginx version: nginx/1.16.0
Aktivizo dhe nis Nginx.
sudo sysrc nginx_enable=yes sudo service nginx start
Ekzekutoni sudo vim /usr/local/etc/nginx/invoiceplane.confdhe konfiguroni Nginx për InvoicePlane.
server { listen 80; listen [::]:80; server_name example.com; root /usr/local/www/invoiceplane; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_index index.php; try_files $uri =404; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; } }
Ruani skedarin dhe dilni.
Tani duhet të përfshijmë invoiceplane.confnë nginx.confskedarin kryesor .
Ekzekutoni sudo vim /usr/local/etc/nginx/nginx.confdhe shtoni rreshtin e mëposhtëm në http {}bllok.
include invoiceplane.conf;
Testoni konfigurimin.
sudo nginx -t
Rifresko Nginx.
sudo service nginx reload
Instalo InvoicePlane
Shkarkoni versionin më të fundit të qëndrueshëm të InvoicePlane dhe nxirrni arkivin.
cd /usr/local/www/ sudo curl -O -J -L https://invoiceplane.com/download/v1.5.9 sudo unzip v1.5.9.zip sudo rm v1.5.9.zip sudo mv ip invoiceplane
Navigoni te /usr/local/www/invoiceplanedosja.
cd /usr/local/www/invoiceplane
Bëni një kopje të ipconfig.php.exampleskedarit dhe riemërtoni kopjen ipconfig.php.
sudo cp ipconfig.php.example ipconfig.php
Hapni ipconfig.phpskedarin dhe shtoni URL-në tuaj në të.
sudo vim ipconfig.php # Something like this IP_URL=http://example.com
SHËNIM: Mos harroni të zëvendësoni http://example.comURL-në me URL-në tuaj.
Ndrysho pronësinë e /usr/local/www/invoiceplanedrejtorisë në www.
sudo chown -R www:www /usr/local/www/invoiceplane
Ekzekutoni instaluesin InvoicePlane nga shfletuesi juaj i internetit dhe ndiqni udhëzimet.
http://your-domain.com/index.php/setup
Pasi të ketë përfunduar instalimi, mund të identifikoheni në InvoicePlane duke përdorur adresën e emailit dhe fjalëkalimin që keni zgjedhur gjatë instalimit.
Nëse dëshironi të siguroni instalimin tuaj, mund ta çaktivizoni konfigurimin. Për ta bërë këtë, zëvendësoni rreshtin DISABLE_SETUP=falseme DISABLE_SETUP=truenë ipconfig.phpskedarin tuaj .