x64 or x86/64 (amd64)
Installation
Important:
Before proceeding with command-line installation, it is assumed that you are
already familiar on how to install Ubuntu Server 24.04.3 operating system into
your machine.
Download ISO here: https://ubuntu.com/download/server
Installation of Ubuntu Server 24.04.3 Guide: https://blog.adopisoft.com/uncategorized/installing-ubuntu-server-24-04-3
Please follow the steps to build your coin operated wifi
hotspot using Mini PC:
2.
Initial Setup Admin Web Interface
1.
Command Line Installation
Command line installation is used when software image is
not available for your board/machine. First, you need to have access to the
command line of your board/machine. In this guide, we will use Ubuntu
Server 24.04.3.
Connect your LAN cable, keyboard, monitor and USB to LAN
adapter(optional) to your x64 or x86/64 (amd64) machine. Then Power on your board and login to the command line.
Execute
the following commands line by line (much easier if you remote ssh your
server and just copy paste the commands):
sudo apt-get update && sudo apt-get upgrade -y
sudo
apt-get install curl -y
curl
-sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo
apt-get install -y nodejs python nginx bind9 isc-dhcp-server
If
the above command returns Package 'python' has no installation candidate,
try the following:
sudo apt-get install -y
nodejs python2 nginx bind9 isc-dhcp-server
sudo
ln -s $(which python2) /usr/bin/python
If
the above command returns Package 'python2' has no installation candidate,
try the following:
sudo apt-get install -y
nodejs python3 nginx bind9 isc-dhcp-server
sudo
ln -s $(which python3) /usr/bin/python
Then next:
sudo apt-get install -y
iptables hostapd dmidecode build-essential openssh-server python-pip unzip
bridge-utils git iputils-arping
If
an error show Package python-pip is not available, try this:
sudo apt-get install -y
iptables hostapd dmidecode build-essential openssh-server python3-pip unzip
bridge-utils git iputils-arping
Then
proceed with the following commands:
wget -O /tmp/adopisoft-5.1.6-20251016-amd64-node-v16.20.2.deb https://github.com/AdoPiSoft/Releases/releases/download/v5.1.6-20251016/adopisoft-5.1.6-20251016-amd64-node-v16.20.2.deb
sudo apt-get install /tmp/adopisoft-5.1.6-20251016-amd64-node-v16.20.2.deb
Now,
enable and start adopisoft service and then reboot
sudo systemctl enable adopisoft
sudo
systemctl start adopisoft
sudo
reboot
2.
Initial Setup
Installation Wizard
Find your board/machine's IP address. In your
board/machine's screen, just type:
ip address
Once
you have identified your board/machine's IP address, open your browser on your
PC and type the url to your board/machine's IP address.
Example:
Setup
Account
1.
Type
your password
2.
Confirm
your password
3.
Click
Save button
NOTE: If you encounter error about UUID, just ignore it
and proceed.
Select
Board
1.
Choose
your board/machine type. Select Generic x64 or x86/64
(amd64) Machine.
2.
Click
Save
Setup
WAN
1.
Select
your WAN network interface. The system will automatically recommend the
interface connected to your network.
2.
Click
Set as WAN Interface button
3.
Configure
your WAN interface (Dynamic IP or Static IP). If not sure, check Dynamic IP
Address.
4.
Click
Save button
Setup
LAN
Important:
Make sure your board/machine has two network interface. For boards without wifi
interface, you have to insert the USB to LAN adapter first.
1.
Choose
the network interface for your LAN. It can be the wifi interface (wlan0 or
wlpsxxx) or any ethernet interface.
2.
Check
Enable Captive Portal
3.
Set
alias to LAN Interface or Built-in WiFi (or anything you like)
4.
Disable/Uncheck
Dynamic IP Address
5.
Set
Statc IP Address to 10.0.0.1
6.
Set
Network Prefix to 20
7.
Check
Use System DNS Server
8.
Check
Enable DHCP Server on this interface
9.
Set
DHCP Pool Start to 10.0.0.10
10.
Set
DHCP Pool End to 10.0.15.254
11.
Click
Save button
12.
Click
Done or Finish button.
3.
Database Settings
Note: The default database used is sqlite because it's
the only database that can be package into the debian file. But we highly
advice to change the database to postgresql after you have successfully setup
the admin.
Run
the command below:
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo -u postgres psql
postgres=# \password
Enter new password:
Enter it again:
postgres=# \q
Create Database:
sudo -u postgres createdb
adopisoft
Then reload and enable postgres service:
sudo
service postgresql reload && \
sudo systemctl
enable postgresql.service
Reboot
the machine. Then in the web admin “System → Security → Database
Connection” settings, change the config to:
Database Type: postgres
Host/IP:
localhost
Port
Number:
Database
Name: adopisoft
Username:
postgres
Password:
your password
Lastly
make sure to DISABLE SSH SERVICE. This is very important to prevent
hackers from accessing your machine. To disable the SSH service, just type:
sudo systemctl disable ssh
No comments:
Post a Comment