3

I'm trying to teach myself how to use Java with Pivotal TC server. I have a Cloud9 account where I set up a server with Pivotal TC. I also created a simple Hello World app in Spring Tool Suite and exported it on my desktop as a WAR file.

So I have this WAR file, and I have this server on Cloud9. I've googled where to put it, and I've gotten different results, and none of them have related to my set up.

I have the directory in my server as /opt/pivotal/pivotal-tc-server-standard-3.1.3.SR1/tomcat-8.0.30.C.RELEASE, and inside of that I have a bin and lib folder. Where exactly do I put my WAR file so that my app is correctly placed in my server?

Am I over-simplifying this? Are there other steps that I just skipped? Or do I just need to play the WAR file somewhere? This was my understanding. I'm pretty new to Java so bear with me.

aCarella
  • 2,369
  • 11
  • 52
  • 85

1 Answers1

2

First you need to create instance (like domain) for hosting your app

# lets alias tc-server location to shorten commands
$TC_SERVER=/opt/pivotal/pivotal-tc-server-standard-3.1.3.SR1
$TC_SERVER/tcruntime-instance.sh create myserver 

After that new director myserver will appear inside $TC_SERVER (like /opt/pivotal/pivotal-tc-server-standard-3.1.3.SR1/myserver)

Put your war inside $TC_SERVER/myserver/webapps To start the app

cd $TC_SERVER/myserver/bin
./tcruntime-ctl.sh start  
inigo skimmer
  • 908
  • 6
  • 12
  • Thanks for your help. I'm running into a problem. When I run the first couple lines, I get the error `The JAVA_HOME environment variable is not defined`. I've tried to set this in /etc/environment and /etc/profile, but it still gives me this error. – aCarella May 15 '16 at 20:23
  • Forget it. I got it to work. The directories are a bit different. Thanks for your help! – aCarella May 15 '16 at 21:45