15 Home
iBNu Maksum edited this page 2024-08-02 09:22:35 +07:00

System Requirements

Most current web servers with PHP & MySQL installed will be capable of running PHPNuxBill

Minimum Requirements

  • Linux or Windows OS
  • PHP Version 7.4 or above
  • Both PDO & MySQLi Support
  • GD2 Image Library
  • CURL support
  • MySQL Version 4.1.x and above

can be Installed in Raspberry Pi Device.

The problem with windows is hard to set cronjob, better Linux

Installation

Git Clone

clone this repository or download zip or release

  1. Rename pages_template to pages
  2. Rename config.sample.php to config.php and make it writeable (chmod 777)
  3. make writeable folder ui/cache/ and ui/compiled
  4. Open web and run installation
  5. set cronjob or scheduller for system/cron.php
  6. make config.php unwriteable (chmod 644)
  7. Now go to Getting-Started

Composer install

Go to directory you want to install Install Composer in your system

# Debian/Ubuntu
sudo apt install composer
# Centos/Redhat
sudo yum install composer

install on curent directory

composer create-project hotspotbilling/phpnuxbill .

install on new directory

composer create-project hotspotbilling/phpnuxbill phpnuxbill

Manual Installation

  1. Download project from Master Branch or from Release
  2. unzip and upload it to server
  3. Rename pages_template to pages
  4. Rename config.sample.php to config.php and make it writeable (chmod 777)
  5. make writeable folder ui/cache/ and ui/compiled
  6. Open web and run installation
  7. set cronjob or scheduller for system/cron.php
  8. make config.php unwriteable (chmod 644)
  9. Now go to Getting-Started

Docker installation

Download PHPNuxBill installation, extract to folder you want to use,

you can use Docker Compose, rename docker-compose.example.yml to docker-compose.yml, edit according your configuration,

or do it manually

Open Terminal go to PHPNuxBill folder and run this command inside phpnuxbill folder.
Change port 8880 according to your need.

docker run -d -p 8880:80 --name PHPNuxBill -v "$PWD":/var/www/html php:8.2-apache

Install PHP Extension

docker exec PHPNuxBill apt-get update
docker exec PHPNuxBill apt-get install -y --fix-missing apt-utils gnupg cron
docker exec PHPNuxBill echo "deb http://httpredir.debian.org/debian bookworm all" >> /etc/apt/sources.list
docker exec PHPNuxBill echo "deb-src http://httpredir.debian.org/debian bookworm all" >> /etc/apt/sources.list
docker exec PHPNuxBill apt-get update
docker exec PHPNuxBill apt-get install -y zlib1g-dev libzip-dev \
    libpng-dev libjpeg-dev libgif-dev libwebp-dev \
    libfreetype6-dev libjpeg62-turbo-dev libxpm-dev
docker exec PHPNuxBill docker-php-ext-configure gd --enable-gd \
    --with-webp --with-jpeg \
    --with-xpm --with-freetype
docker exec PHPNuxBill docker-php-ext-install json
docker exec PHPNuxBill docker-php-ext-install gd
docker exec PHPNuxBill docker-php-ext-install curl
docker exec PHPNuxBill docker-php-ext-install xml
docker exec PHPNuxBill docker-php-ext-install mbstring
docker exec PHPNuxBill docker-php-ext-install pdo
docker exec PHPNuxBill docker-php-ext-install pdo_mysql
docker exec PHPNuxBill docker-php-ext-install zip
docker exec PHPNuxBill service apache2 reload

Setup Cron

cat <<EOF | docker exec --interactive PHPNuxBill sh
crontab -l | { cat; echo "0 * * * * cd /var/www/html/system && php cron.php"; } | crontab -
crontab -l | { cat; echo "0 7 * * * cd /var/www/html/system && php cron_reminder.php"; } | crontab -
EOF

For connecting to mysql in your host, use host.docker.internal for Mysql Host

UPGRADE

for old version, below Version 6, backup system/config.php, delete all file except folder pages, upload all new files, put config.php in root folder (not in system folder), got to folder /install and run Update.

for version 6 above, just replace all files, using filezilla can choose overwrite if different file size or time.

or git pull if you use git clone

Login Page Mikrotik

Customer need to register at PHPNuxBill, so you need to add link on Mikrotik Login page, just add anywhere this link on Mikrotik Login page, this link, change domain to your server IP or Domain.

<a href="http://domain/?nux-mac=$(mac-esc)&nux-ip=$(ip)&nux-router=1" class="btn btn-block btn-success">Register<a>

?nux-mac=$(mac-esc)&nux-ip=$(ip)&nux-router=1 this will help user to auto login from User Dashboard

nux-router is Optional, See mikrotik ID in Networks -> Routers, it will make Customer show only Package for that Router/Location