1. List the TC server instance and find out its
CATALINA_BASE
davidz-a02:demo-instance dzhou$ tcserver list
Listing instances in '/Users/dzhou/Downloads/pivotal-tc-server/instances'
demo-instance Info:
Instance Name: demo-instance
CATALINA_BASE: /Users/dzhou/Downloads/pivotal-tc-server/instances/demo-instance
CATALINA_HOME: /Users/dzhou/Downloads/pivotal-tc-server/runtimes/tomcat-9.0.63.A.RELEASE
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home
tc Runtime Version: 9.0.63.A.RELEASE
tc Server Version: 4.1.16.RELEASE
tc Server Installation Directory: /Users/dzhou/Downloads/pivotal-tc-server/standard-4.1.16.RELEASE
Running Status: Running as PID 38749
2. Switch to the directory of the TC server instance
cd /Users/dzhou/Downloads/pivotal-tc-server/instances/demo-instance/webapps/
3. Create a folder ”manager"
mkdir manager
4. Inside the "manager" folder, copy the configuration of manager app from tc Server Installation Directory, which can be found in step 1.
cd manager
cp -R /Users/dzhou/Downloads/pivotal-tc-server/standard-4.1.16.RELEASE/templates/manager-tomcat-9/webapps/manager/ .
5. Go back to the instance base folder and add user/password to create an account
cd ../../
vim conf/tomcat-users.xml
Here is a sample:
davidz-a02:demo-instance dzhou$ more ./conf/tomcat-users.xml
<?xml version="1.0"?>
<tomcat-users>
<user username="admin" password="changeme" roles="admin,manager,manager-gui"/>
</tomcat-users>
6. Allow this TC server instance in privileged mode
davidz-a02:demo-instance dzhou$ more conf/context.xml
<?xml version="1.0"?>
<Context privileged="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
</Context>
7. Restart this TC server instance
tcserver restart demo-instance
8. Open a browser at
http://127.0.0.1:8080/manager/html with the user/password in step 5. The following page indicates the manager app deployed successfully!