Deploy draw.io app website on local LAN

Create a new ESXi host with 2G RAM/ 20G disk, Debian 10

# Install java JRE

sudo apt install openjdk-11-jre
java –version

# Install apache ant

wget https://downloads.apache.org/ant/binaries/apache-ant-1.10.12-bin.tar.xz
tar xvfJ apache-ant-1.10.12-bin.tar.xz
sudo mv apache-ant-1.10.12/ /usr/local/ant
sudo bash -c ” cat >>/etc/profile ” << EOF
ANT_HOME=”/usr/local/ant”
PATH=”$PATH:/usr/local/ant/bin”
export ANT_HOME
export PATH
EOF
source /etc/profile
ant –version

# Install Tomcat

sudo apt-get install tomcat9 tomcat9-admin

http://127.0.0.1:8080/
http://${SERVER_IP}:8080/
ls -l /var/lib/tomcat9/webapps/ROOT/

# Build drawio, war package

wget https://github.com/jgraph/drawio/archive/refs/tags/v17.1.3.tar.gz
tar xvfz v17.1.3.tar.gz
cd drawio-17.1.3
( cd etc/build && ant war )

# Install drwaio

sudo cp build/draw.war /var/lib/tomcat9/webapps

http://127.0.0.1:8080/draw
http://${SERVER_IP}:8080/draw

# Change draw as the root of tomcat

cd /var/lib/tomcat9/webapps
sudo rm -rf ROOT
sudo mv draw.war ROOT.war

http://127.0.0.1:8080
http://${SERVER_IP}:8080

# Change tomcat to the http default port: 80

sudo grep 8080 /etc/tomcat9/*
sudo sed -i “s/8080/80/g” /etc/tomcat9/server.xml

http://127.0.0.1
http://${SERVER_IP}

iLO4 2.78

The iLO4 2.78  (2021/05/07) of HP MicroServer Gen:

HTML5 Integrated Remote Console

The HTML5 IRC provides remote access to the system KVM and control of Virtual Media from a single console that runs in a supported browser.
 

 

 

Encrypt WordPress Server with Let’s Encrypt SSL certificate

# Install acme.sh tool
git clone https://github.com/Neilpang/acme.sh.git

cd acme.sh

./acme.sh --install

#install cert
cd ~/.acme.sh
# issue a RSA cert
sudo ./acme.sh --issue --d blog.zhenglei.net -w /var/www/html/wordpress

# issue a ECC cert
./acme.sh --issue -d blog.zhenglei.net -w /var/www/html/wordpress --keylength ec-256

# Copy the cert into target directory
sudo mkdir -p /etc/nginx/ssl

sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.ecc.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.ecc.bundle --ecc
sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.bundle
# Update nginx config
server { #listen 80; listen 443; ssl on; ssl_certificate ssl/blog.zhenglei.net.bundle; ssl_certificate_key ssl/blog.zhenglei.net.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; ... }
server {
listen 80 default_server; server_name blog.zhenglei.net;

# Let's Encrypt, http method
location ~ \.well-known
{
root /var/www/html/wordpress/;
allow all;
access_log on;
log_not_found on;
} return 301 https://$server_name$request_uri; }

Install post-view plus plugin in WordPress

Two modification in  Themes of Twentyeleven, which used by this blog:

List most top 10 articles of blog,  add following into the index.php

<?php if (function_exists(‘get_most_viewed’)): ?>
<ul>
<?php get_most_viewed(); ?>
</ul>
<?php endif; ?>

View count for each article,   add following code into content.php

<span>
<?php if(function_exists(‘the_views’)) { the_views(); } ?>
</span>
<span class=”sep”> | </span>