Before installing NetXploreIt, make sure to first install the following pre-requisite software:
1 – Default Java Development Kit
$ sudo apt update
$ sudo apt install default-jdk
Answer Y to the prompt: Do you want to continue? [Y/n]
Verify the installation:
$ java -version
(you should get an output similar to the below)
openjdk version “11.0.10” 2021-01-19
$ javac -version
(you should get an output similar to the below)
javac 11.0.10
2 – Java 8
$ sudo apt-get install openjdk-8-jdk
Answer Y the prompt: Do you want to continue? [Y/n]
This will also install the required Java runtime engine.
Verify the installation:
$ cd /usr/lib/jvm/java-8-openjdk-amd64/jre/bin
$ ./java -version
(you should get an output similar to the below)
openjdk version “1.8.0_282”
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
3 – TFTP
You can verify if TFTP package is already installed using:
$ dpkg –list | grep tftp
(you should get an output similar to the below)
ii tftpd-hpa 5.2+20150808-1ubuntu3 amd64 HPA’s tftp server
Otherwise, install using:
$ sudo apt install -y tftpd-hpa
Check the default TFTPd configuration:
$ cat /etc/default/tftpd-hpa
The file would be similar to:
————————————————————
# /etc/default/tftpd-hpa
TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/var/lib/tftpboot”
TFTP_ADDRESS=”:69″
TFTP_OPTIONS=”–secure”
————————————————————
Run sudo -s and enter ubuntu administrator password:
$ sudo -s
[sudo] password for administrator:
#
Make a copy of tftpd configuration:
# cp /etc/default/tftpd-hpa /etc/default/tftpd-hpa-Original
Modify the /etc/default/tftpd-hpa configuration file, run the following command:
# nano /etc/default/tftpd-hpa
Change the TFTP_DIRECTORY to /private/tftpboot and Add the -–create option to the TFTP_OPTIONS.
The final configuration file should look as follows:
————————————————————
# /etc/default/tftpd-hpa
TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/private/tftpboot”
TFTP_ADDRESS=”:69″
TFTP_OPTIONS=”–secure –create”
————————————————————
Create a new directory /private/tftpboot. To do that, run the following command:
# mkdir -p /private/tftpboot
Change the owner and group of the tftpboot directory to ubuntu administrator with the following command:
# cd /private
# chown administrator:administrator tftpboot
(Note that the account is the OS administrator account used when you installed Ubuntu).
Restart the tftpd-hpa service with the following command:
# systemctl restart tftpd-hpa
4 – OpenSSH
OpenSSH is installed by default on Ubuntu 18.04.
To verify if it is installed run:
$ ssh -V
(you should get an output similar to the below)
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
If it is not present, then install it using:
$ sudo apt install openssh-client
5 – Process Manager
This utility is used to start up the various server components with a single command line, as well as verifying their running status.
To install it, run:
$ wget -qO- https://getpm2.com/install.sh | bash
during installation, provide “sudo” password.
After installation, you should get below message:
PM2 Successfully installed
You can also verify the installation by getting the version:
$ pm2 -v
(you should get an output similar to the below)
4.5.0
6 – OS Tuning
- add below lines to /etc/sysctl.conf
net.core.rmem_max=26214400
net.core.rmem_default=26214400
vm.max_map_count=262144
vm.swappiness=1
- add below line to etc/security/limits.conf
admin – nofile 65535
where “admin” is the administrator account used while installing the OS.
- Make sure that the below line in “/etc/pam.d/su” is uncommented:
session required pam_limits.so
Add this line if it is not already present in the “/etc/pam.d/su” file.
- Reboot the server
It is important to reboot the server at this stage, for the above changes to take effect.
