[Unit]
Description=Run the service
[Service]
User=ubuntu
# change the workspace
WorkingDirectory=/usr/local/src
#path to executable.
#executable is a bash script which calls jar file
ExecStart=/usr/local/src/somescript
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
When you install mysql on Ubuntu (I use 16.04), it requires you to fill the admin password for the first time before finishing the installation. This prompt will wait the user input until you fill the password.
This trick is very helpful if you want to install mysql in Dockerfile, and skipping the password prompt:
Rails is one of the most popular ruby framework out there. And now, I want to try to run the simple app on Ubuntu 16.04 machine. it’s for testing purpose.
First, update the system and install essential dependencies:
Create a dedicated user for the app, for example, ubuntu user. And this also make the ubuntu user with sudo privilege and run the command without password. Which is useful to run command that needs sudo privilege in the next steps.
Install rails with gem, and create new app without writing the Gemfile. Why? because everytime I create new app, I ended up facing errors with dependencies in Gemfile. So, it safe to setup new app without the Gemfile, we’ll create it manually later.
ubuntu~$ gem install rails
ubuntu~$ rails new app --skip-gemfile
Create the Gemfile:
ubuntu~$ touch ~/app/Gemfile
ubuntu~$ vim ~/app/Gemfile
Gemfile, fill these dependencies below into the file, save and exit:
This is the step-by-step installation of vsftpd that actually works. If you have website that runs wordpress, you might want to enable this to be able install/update your wordpress plugin.