腾讯云主机piggydb的架设
建立zbjxb.service服务(using systemd)
sudo cd /lib/systemd/system/ sudo touch zbjxb.service sudo vim zbjxb.service sudo chmod 644 zbjxb.service sudo systemctl start zbjxb sudo systemctl enable zbjxb journalctl -u zbjxb
在zbjxb.service服务中启动piggydb的run脚本
[Unit] Description=zbjxb.cn http server
[Service] ExecStart=/bin/sh /home/ubuntu/download/piggydb/run.sh
[Install] WantedBy=multi-user.target
run.sh脚本
#!/bin/bash
MY_FOLDER=/home/ubuntu/download/piggydb
#java -Dpiggydb.database.prefix=file:~/piggydb -Dpiggydb.database.name=piggydb -Dpiggydb.enableAnonymous=false -jar winstone.jar --warfile=piggydb-7.0.war $1 $2 $3 $4 $5 java -Dpiggydb.database.prefix=file:~/piggydb -Dpiggydb.database.name=piggydb -Dpiggydb.enableAnonymous=true -jar ${MY_FOLDER}/winstone.jar --warfile=${MY_FOLDER}/piggydb-7.0.war $1 $2 $3 $4 $5
java -jar winstone.jar --warfile=piggydb.war \ --httpsListenAddress=0.0.0.0 --httpsPort=443 \ --httpPort=-1 --ajp13Port=-1 \ --httpsKeyStore=your_keystore_name.jks --httpsKeyStorePassword=your_keystore_password
重启服务: