-
Notifications
You must be signed in to change notification settings - Fork 1
/
TAKServerMintInstall.txt
133 lines (120 loc) · 5.74 KB
/
TAKServerMintInstall.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
################################################################
# Mitch Winkle mitch@radcommsoft.com 2021-05-08
# Linux Mint 20 Install for TAK Server
################################################################
################################################################
# See the TAKServerSetup.txt file for further TAK server configuration
################################################################
# 1. Standard Mint Live install works flawlessly from a USB device when booted
# via Win10 Settings, "Updates & Security/Recovery, Advanced startup/Restart now"
# and selecting "Use a device", the select the USB stick from the list.
# 2. Once booted, configure the WiFi or ethernet conenction so that there is
# internet access available. Then choose the option in the menu system to
# "Install to Hard Disk". Once the installation is compelte, POWER OFF the pc
# to clear any locks on the apt package utility.
#sudo halt
# Remove the USB stick before starting the PC, or simply restart the VM.
# 3. Run an update to freshen package lists
sudo apt update
# 4. If required, enable sshd so that the device may be reached
# via shell over ssh. Then start the ssh server
sudo systemctl enable sshd
sudo systemctl start sshd
# 5. OPTIONAL Install the pps tools for messing with the GPS unit
#sudo apt install pps-tools
# 6. Install dependencies for the TAK server
sudo apt install openjdk-11-jdk
# postgresql currently installs version 12 and already initdb's the system
sudo apt install postgresql
# 7. Select the jdk11 as the default Java version by
# choosing the java-11-openjdk from the list by numeral
sudo update-alternatives --config java
# 8. on the new Minty system, add the "tak" group and user
sudo groupadd tak
sudo useradd -d /opt/tak -G tak tak
# 9. Install the TAK Server from the TAK server rpm file
# Unarchive the .rpm file to the file system using the
# rpm2cpio and cpio tools in Mint/Debian/Ubuntu.
#
sudo apt install rpm2cpio
# The process is:
# With the .rpm file in a temp folder, do:
#
#rpm2cpio takserver<version>.rpm | cpio -idvm
#
# That will create the full file system in the temp folder, then:
#
# tar cvzf takserver<version>.tar.gz ./opt/*
##### Now this tarball can be used for multiple server builds #####
#
# Move the tar.gz to your new system and untar it (as root user)
# into the ROOT of the file system, since the tar starts with /opt
# sudo tar xvzf takserver<version>.tar.gz -C /
# May already be correct, but....
cd /opt
sudo chown tak.tak tak
# def need to do this, so that the proper
# group number is applied to the file system
cd /opt/tak
sudo chown -R tak.tak ./*
# and initialize the ATAK database with the setup script
#############################################################
# NOTE: If this file does not exist, it must be copied from #
# elsewhere or manually edited to fix the paths for PGDATA #
# and other variables in the script. #
#############################################################
sudo /opt/tak/db-utils/takserver-setup-db-mint.sh
#############################################################
### Copy over the startup scripts to /etc/init.d
sudo cp /opt/tak/API/takserver-api /etc/init.d
sudo cp /opt/tak/messaging/takserver-messaging /etc/init.d
sudo cp /opt/tak/launcher/takserver /etc/init.d
sudo chmod 755 /etc/init.d/takserver*
sudo cp /opt/tak/API/takserver-api.sh /opt/tak
sudo cp /opt/tak/messaging/takserver-messaging.sh /opt/tak
sudo chmod 544 /opt/tak/takserver*.sh
# Remove the init functions from the takserver scripts
# because this is not a native file in Debian nor are the functions
# actually called by the scripts.
sudo sed -i 's/. \/etc\/rc.d\/init.d\/functions/#&/' /etc/init.d/takserver
sudo sed -i 's/. \/etc\/rc.d\/init.d\/functions/#&/' /etc/init.d/takserver-messaging
sudo sed -i 's/. \/etc\/rc.d\/init.d\/functions/#&/' /etc/init.d/takserver-api
###
# 10. Check the system d status of the takserver.service and reboot
# now enable it at boot
sudo systemctl enable takserver
sudo reboot
# now check the systemd status
sudo systemctl status takserver
# now check it
ps ax|grep tak
# that should show multiple "java" processes running along with the
# originating shell scripts for them.
###################################################################
# 11. Open various firewall ports
###################################################################
sudo firewall-cmd --add-port=6969/udp --permanent
sudo firewall-cmd --add-port=8080/tcp --permanent
# These two can be closed later
sudo firewall-cmd --add-port=8088/udp --permanent
sudo firewall-cmd --add-port=8088/tcp --permanent
# End These two can be closed later ^^
sudo firewall-cmd --add-port=8089/tcp --permanent
sudo firewall-cmd --add-port=8089/udp --permanent
sudo firewall-cmd --add-port=8443/tcp --permanent
sudo firewall-cmd --add-port=8446/tcp --permanent
sudo firewall-cmd --add-port=8446/tcp --permanent
# 13. Change the limits.conf to allow lots of open file descriptors
sudo echo -e "* soft nofile 32768\n* hard nofile 32768" | sudo tee --append /etc/security/limits.conf > /dev/null
###################################################################
# 14. OPTIONAL - install remote desktop protocol for remote control
###################################################################
#sudo apt install xrdp -yum
#sudo systemctl enable xrdp
#sudo systemctl start xrdp
#sudo firewall-cmd --add-port=3389/tcp --permanent
#sudo firewall-cmd --reload
################################################################
################################################################
# See the TAKServerSetup.txt file for TAK server configuration
################################################################