Host Your Own draw io, Visio style diagram maker
#ApacheTomcat #WebBasedTools #SelfHosted
Full steps can be found at https://i12bretro.github.io/tutorials/0197.html
--------------------------------------------------------------------
What is Draw.io?
--------------------------------------------------------------------
draw.io is a configurable diagramming/whiteboarding visualization application. - https://github.com/jgraph/drawio
--------------------------------------------------------------------
Install Apache Tomcat
--------------------------------------------------------------------
01. Log into the Linux device
02. Run the following commands in a terminal:
# check for and install software updates
sudo apt update
sudo apt upgrade
# install java jdk
sudo apt install default-jdk
# create tomcat group and user
sudo mkdir /var/lib/tomcat9
sudo groupadd tomcat
sudo useradd -s /bin/false -g tomcat -d /var/lib/tomcat9 tomcat
# lookup the latest tomcat 9 release
regex='≪a href="v[^/]*\/"≫v([^/]*)\/≪\/a≫' && response=$(curl -s https://downloads.apache.org/tomcat/tomcat-9/?C=M;O=D) && [[ $response =~ $regex ]] && downloadURL="${BASH_REMATCH[1]}"
# download tomcat 9
curl -O https://downloads.apache.org/tomcat/tomcat-9/v$downloadURL/bin/apache-tomcat-$downloadURL.tar.gz
# extract the download
sudo tar xzvf apache-tomcat-9*tar.gz -C /var/lib/tomcat9 --strip-components=1
# set permissions
cd /var/lib/tomcat9
sudo chgrp -R tomcat /var/lib/tomcat9
sudo chmod -R g+r conf
sudo chmod g+x conf
sudo chown -R tomcat webapps/ work/ temp/ logs/
# run tomcat as a service
sudo update-java-alternatives -l
sudo nano /etc/systemd/system/tomcat.service
03. Paste the following configuration into tomcat.service
[Unit]
Description=Apache Tomcat
After=network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
Environment=CATALINA_PID=/var/lib/tomcat9/temp/tomcat.pid
Environment=CATALINA_HOME=/var/lib/tomcat9
Environment=CATALINA_BASE=/var/lib/tomcat9
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/var/lib/tomcat9/bin/startup.sh
ExecStop=/var/lib/tomcat9/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always
[Install]
WantedBy=multi-user.target
04. Continue with the following commands in terminal:
sudo systemctl daemon-reload
sudo systemctl start tomcat
sudo systemctl status tomcat
sudo systemctl enable tomcat
05. Open a browser and navigate to http://DNSorIP:8080 to test that Tomcat is installed and running
--------------------------------------------------------------------
Installing jGraph/mxGraph from draw.io
--------------------------------------------------------------------
01. Run the following commands in terminal:
# download the draw.war file
cd ~
wget https://github.com/jgraph/drawio/releases/download/v13.8.0/draw.war
# copy draw.war to the tomcat webapps directory
sudo cp ./draw.war /var/lib/tomcat9/webapps
02. Back in the browser, navigate to http://DNSorIP:8080/draw
03. Enjoy a self-hosted diagram creation studio in your web browser
Source: https://github.com/jgraph/drawio
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro
Other Videos By i12bretro
Other Statistics
Tomcat Statistics For i12bretro
Currently, i12bretro has 732 views for Tomcat across 1 video. His channel published less than an hour of Tomcat content, making up less than 0.15% of the total overall content on i12bretro's YouTube channel.