Open dje04001 opened 4 years ago
The GTAS build process (step 8) requires the MySQL root user to have the password "admin" otherwise it'll fail. I'd recommend adding it to the guidance above.
Apache maven link is broker.
you can use this: https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
How to Install core GTAS in a VirtualBox Virtual Machine Running CentOS 7
A video deomonstrating how to install core GTAS is available on YouTube at the link below.
https://youtu.be/Jj1WeVz5Cpo
Requirements
Software
Additional Hardware Requirements for Virtual Machine (Minimum)
Other
Installation
Step 1: Create Virtual Machine and Install CentOS 7
Step 2: Install VirtualBox Guest Additions and Enable File Sharing
Step 3 : Install Oracle Java SE Development Kit 8u202
This will require registering as a user with Oracle. It's free.
Open FireFox and copy this link into the address bar to navigate to Oracle's download page. https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
Download the jdk-8u202-linux-x64.rpm
you will need to be logged in as root or use sudo to install java
move it to the /opt directory by opening Terminal (right click on desktop) and running
mv ~/Downloads/jdk-8u202-linux-x64.rpm /opt
Go to /opt directory
cd /opt/
Run local install command
yum localinstall jdk-8u202-linux-x64.rpm
Type "y" when prompted in the installation wizard
Run alternatives command
alternatives --config java
Select the correct number option for 8u202
Check version by running the command
java -version
Step 4: Install Apache Maven
In the terminal, use the wget command to download Apache Maven
wget https://us.mirrors.quenda.co/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
Expand and install
tar -xzvf apache-maven-3.6.3-bin.tar.gz
Give ownership to the user
chown -R root:root /opt/apache-maven-3.6.3/
Add Maven to your paths
echo 'export PATH=$PATH:/opt/apache-maven-3.6.3/bin' | sudo tee -a /etc/profile
Refresh profile to enforce changes
cd /etc/
. profile
Change working directory back to /opt and check version to confirm installation and
cd /opt/
mvn -version
Check paths to ensure /opt/apache-maven-3.6.3/bin is there
echo $PATH
Step 5: Install Apache ActiveMQ
In the terminal, use the wget command to download Apache ActiveMQ
wget http://archive.apache.org/dist/activemq/5.16.0/apache-activemq-5.16.0-bin.tar.gz
Expand and install
tar -xzvf apache-activemq-5.16.0-bin.tar.gz
Start ActiveMQ
./apache-activemq-5.16.0/bin/activemq start
Confirm installation and status by viewing in web browser http://localhost:8161/admin
user: admin password: admin
Step 6: Install Apache Tomcat
In the terminal, use the wget command to download Apache Tomcat
wget http://archive.apache.org/dist/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz
Expand and install
tar -xzvf apache-tomcat-9.0.37.tar.gz
Step 7: Install MariaDB Client and Server
update yum repositories
sudo yum -y update
modify MariaDB repo to select correct versions for GTAS use
sudo tee /etc/yum.repos.d/MariaDB.repo<<EOF
Copy and paste all of this text into the document editor and press "return"
sudo yum makecache fast
sudo yum -y install MariaDB-server MariaDB-client
sudo systemctl enable --now mariadb
sudo mysql_secure_installation
Step 8: Install GTAS from Source Code on GitHub
Download the source code
git clone --branch dev --single-branch https://github.com/US-CBP/GTAS.git
To create the GTAS database, navigate to gtas-commons
cd GTAS/gtas-parent/gtas-commons/
Run the following command
mvn clean install
Run each of these commands sequentially, after the previous is successful
mvn hibernate:update
mvn hibernate:drop
mvn hibernate:create
check for creation of database and table population
mysql -u root -p
enter password from MaraiDB configuration
Select GTAS database
use gtas;
check tables
show tables;
check user table
select * from user;
To compile .war files from source code, navigate to the gtas-parent directory
cd /opt/GTAS/gtas-parent/
Run clean install command
mvn clean install
Copy .war files and application.configuration file to the tomcat server
cp /opt/GTAS/gtas-parent/gtas-job-scheduler-war/target/gtas-job-scheduler.war /opt/apache-tomcat-9.0.37/webapps/
cp /opt/GTAS/gtas-parent/gtas-webapp/target/gtas.war /opt/apache-tomcat-9.0.37/webapps/
cp /opt/GTAS/gtas-parent/gtas-commons/src/main/resources/default.application.properties /opt/apache-tomcat-9.0.37/conf/application.properties
Create directories for messages. The best place for them is in the Host/Virutal Machine shared directory
mkdir /media/sf_Desktop/in
mkdir /media/sf_Desktop/working
mkdir /media/sf_Desktop/out
mkdir /media/sf_Desktop/error
Change the directory addresses in "application.properties" for the file loader to match the directories made
vim /opt/apache-tomcat-9.0.37/conf/application.properties
/opt/apache-tomcat-9.0.37/bin/catalina.sh run
Step 9 Optional: Forward ports to access GTAS on Host Machine
In the CentOS user interface, in the menu bar, go to firewall settings: Applications>Sundry>Firewall
configuration permanent add 8080
configuration runtime add 8080
on Oracle VM VirtualBox Manager go to the menu bar on the Host Machine: Network>Advanced>Port Forwarding
Add a rule