-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_all.sh
More file actions
138 lines (122 loc) · 4.5 KB
/
install_all.sh
File metadata and controls
138 lines (122 loc) · 4.5 KB
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
134
135
136
137
138
#!/bin/bash
################################################################################
# CoT Server Admin Complete Installation Script
# Administration tool for TAK Server - Master installation script
#
# Copyright 2024-2025 BlackDot Technology
# Licensed under the Apache License, Version 2.0
#
# DISCLAIMER: This software is not affiliated with the TAK Product Center,
# U.S. Department of Defense, or any government agency.
################################################################################
set -e
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
print_message() {
echo -e "${GREEN}==>${NC} $1"
}
print_error() {
echo -e "${RED}ERROR:${NC} $1"
}
print_warning() {
echo -e "${YELLOW}WARNING:${NC} $1"
}
# Check if running as root
if [[ $EUID -ne 0 ]]; then
print_error "This script must be run as root (use sudo)"
exit 1
fi
echo ""
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ CoT Server Admin Installation ║"
echo "║ Administration Tool for TAK Server ║"
echo "║ ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
print_message "This script will:"
echo " 1. Install and configure TAK Server"
echo " 2. Set up PostgreSQL database"
echo " 3. Generate SSL certificates"
echo " 4. Install CoT Server Admin (web interface)"
echo " 5. Configure all services"
echo ""
read -p "Continue? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
echo ""
print_message "Step 1/2: Deploying TAK Server..."
echo "================================================"
if [ -f "./deploy_tak_server.sh" ]; then
chmod +x deploy_tak_server.sh
./deploy_tak_server.sh
print_message "✓ TAK Server deployment complete"
else
print_error "deploy_tak_server.sh not found!"
exit 1
fi
echo ""
print_message "Step 2/2: Installing CoT Server Admin..."
echo "================================================"
if [ -f "./install_cot_server_admin.sh" ]; then
chmod +x install_cot_server_admin.sh
./install_cot_server_admin.sh
print_message "✓ CoT Server Admin installation complete"
else
print_error "install_cot_server_admin.sh not found!"
exit 1
fi
echo ""
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ ║"
echo "║ Installation Complete! 🎉 ║"
echo "║ ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
# Get IP address
IP=$(hostname -I | awk '{print $1}')
echo "🌐 Access CoT Server Admin at:"
echo ""
echo " http://${IP}:5000"
echo ""
echo "📋 Login Credentials:"
echo " Username: admin"
echo " Password: See /opt/tak/.credentials file"
echo ""
echo "⚠️ IMPORTANT: Credentials are stored in /opt/tak/.credentials"
echo " This file was generated with secure random passwords."
echo ""
echo "🔒 RECOMMENDED: Enable HTTPS for secure access:"
echo " sudo ./setup_https.sh"
echo ""
echo "⚠️ IMPORTANT NEXT STEPS:"
echo ""
echo "1. Enable HTTPS (strongly recommended):"
echo " sudo ./setup_https.sh"
echo ""
echo "2. Download TAK Server from https://tak.gov"
echo " Extract to: /opt/tak/takserver-5.2-RELEASE-27/"
echo ""
echo "3. Review credentials: sudo cat /opt/tak/.credentials"
echo ""
echo "4. Generate client certificates in Web Interface"
echo ""
echo "5. Configure your TAK clients to connect to:"
echo " Server: ${IP}"
echo " Port: 8089"
echo ""
echo "📚 For detailed documentation, see README.md"
echo "🚀 For quick start guide, see QUICKSTART.md"
echo ""
echo "📊 View installation details:"
echo " cat /opt/tak/installation-info.txt"
echo ""
echo "🔍 Verify HTTPS setup:"
echo " sudo ./verify_https.sh"
echo ""
print_message "CoT Server Admin ready! 🛰️"
echo ""