Last post Ubuntu Server Setup, I talked about the basic setup for an Ubuntu server. In this post, I will share some details about the setup for saltynote server.
Login database from terminal with
mysql -u root -p, and execute follow command lines:
CREATE DATABASE saltynote;
Note: You can find more details about how to enable remote access from this post. While here, I only enable it with local access, as I for security reason, it is not required for current stage.
For security, I will create a specific user to run the service. This post will be very helpful for this step.
# Create a new user, and create its home dir
mkdir -p /home/saltynote/service
Upload the jar file to
/home/saltynote/service folder, and create
application.properties inside that folder, which can be used to set some sensitive information. e.g. database connection info.
# Make saltynote is the owner of service.jar
/etc/systemd/system dir, and populate
note.service as below:
We can enable this service to auto start when system restarts by:
systemctl enable note.service
If everything goes well, the service should start now. Open http://YOUR-SERVER-IP:8888, you should see a welcome message in JSON format.
# You can check that the service is running with saltynote user.
TO BE DONE