Issue
I have a Spring MVC project (not really small) with a MySQL and want to run it on a linux VPS. I can't find a tutorial of how to do it (i'm using Window and have never touch linux). I had thinked of running Eclipse just like the localhost on the VPS but i don't know if i should do that. Can i get some advice ?
Solution
It is tough to explain entire tutorial here. However, I can provide major steps involved. You can google detailed steps for these
- Step 1 - Install Mysql on VPS Step 2 - Allow mysql for remote connections Step 3 - Add a remote user to mysql server Step 4 - Install Java on VPS Step 5 - Install tomcat server on VPS Step 6 - Configure new mysql details in application.properties Step 7 - Extend your Spring boot application class with SpringBootServletInitializer Step 8 - Configure pom.xml to generate war file Step 9 - Run project as "Maven Install". A war would be generated Step 10 - Copy the war file to {tomcat install path}/webapps folder Step 11 - Restart server and tail tomcag logs for any error
Answered By - Sridhar Patnaik
Answer Checked By - Candace Johnson (JavaFixing Volunteer)