简体   繁体   中英

Bringing a remote tomcat/mySQL server to localhost Mac

I have a website someone's developing for me on a VPS (Java, javascript, CSS, HTML) that I would like to run on my Macbook Pro.

He commits the source on Github, which I download with Sourcetree.

I have Tomcat 6 and MySQL running on the Macbook fine.

Can I bring the root folder, the mySQL db and an associated media folder over without creating a .war file to run it on tomcat on localhost by simply setting up the connections properly in datanucleus, or is it much more complicated than that?

Thanks in advance for your thoughts.

Yes, you can. But it is necessary to have compiled webapp. Simply put root folder contents (your deployed application) to "/webapps/ROOT" and start tomcat by running script in "bin" folder. Make sure that you properly configured database properties of your application.

If you have only sources - it is not such simple. You have to build war and deploy it. Or ask developer to include "target" directory in git repository and then copy "classes" folder to /webapps/ROOT/"

I know people who try to develop application directly in die Webapp Folder from Tomcat but that is not the right way.

At your place i'll do this:

  1. clone the application locale on your mac
  2. Use an IDE(eclipse/Netbeans/IntelliJ) to open the project
  3. Build a local war file which you can deploy directly to your $CATALINA_HOME/webapp/
  4. Do not forget the make all required mySQL settings (context.xml) and so on...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM