-
Install Nginx in VPS
-
Install Java
sudo yum install java-11-openjdk -y // install java java -version // check version
-
Create a new halo user
useradd -m halo // new user usermod -aG wheel halo // grant permission passwd halo // set password su - halo // switch user
-
Download halo.jar
mkdir ~/app && cd ~/app // download wget https://dl.halo.run/release/halo-1.4.7.jar -O halo.jar // run
-
Configure working directory
mkdir ~/.halo && cd ~/.halo // configuration file wget https://dl.halo.run/config/application-template.yaml -O ./application.yaml vim application.yaml
-
Launch halo
cd ~/app && java -jar halo.jar
What if can’t visit halo use ip:port?
- check port firewall
firewall-cmd --query-port=8090/tcp --zone=public
- enable port
firewall-cmd --zone=public --add-port=8090/tcp --permanent
-
restart firewall
firewall-cmd --reload
Keep Halo running in VPS
-
Log in root usr
exit
-
Download halo service
wget https://dl.halo.run/config/halo.service -O /etc/systemd/system/halo.service
-
Change configuration
vim /etc/systemd/system/halo.service
YOUR_JAR_PATH -> /home/halo/app/halo.jar USER -> halo
-
reload
systemctl daemon-reload
-
Run service
systemctl start halo
-
Enable halo when service run
systemctl enable halo
-
For more information, feel free to reach out Doc link.