CMS Shell

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
Shell script for Linux/Windows to start a shell prompt which gives you access to OpenCms
+
Shell script for Linux/Windows to start a shell prompt which gives you access to OpenCms.
  
java -Djava.ext.dirs=./lib/ org.opencms.main.CmsShell
+
Under Linux I used the following commands to run the shell:
  
Then like you said:
+
"'''cd'''" to the WEB-INF folder of the OpenCMS web application. In that folder you will see the cmsshell.sh. "''chmod 755''" it if it's not an executable.
 +
Then copy the "''servlet-api.jar''" and "''jsp-api.jar''" to the "''./lib/''" folder. Using the following command you should now be able to start the shell.
  
login "Admin" "password"
+
'''java -Djava.ext.dirs=./lib/ org.opencms.main.CmsShell'''
  
createDefaultProject "Offline" "The Offline Project"
+
'''login "Admin" "password"'''
  
 +
Under the shell you can execute commands like the following:
  
I copied these two jar into the opencms lib folder. Then deleted them after I was done.
+
'''createDefaultProject "Offline" "The Offline Project"'''
servlet-api.jar
+
 
jsp-api.jar
+
 
 +
Note: I had trouble getting the ''-classpath'' to work with my JDK 1.6, so I used the "''-Djava.ext.dirs=''" instead. That's why I copy the two jars above into that folder. If someone has a method that works better please post the update here.

Revision as of 18:34, 7 April 2008

Shell script for Linux/Windows to start a shell prompt which gives you access to OpenCms.

Under Linux I used the following commands to run the shell:

"cd" to the WEB-INF folder of the OpenCMS web application. In that folder you will see the cmsshell.sh. "chmod 755" it if it's not an executable. Then copy the "servlet-api.jar" and "jsp-api.jar" to the "./lib/" folder. Using the following command you should now be able to start the shell.

java -Djava.ext.dirs=./lib/ org.opencms.main.CmsShell

login "Admin" "password"

Under the shell you can execute commands like the following:

createDefaultProject "Offline" "The Offline Project"


Note: I had trouble getting the -classpath to work with my JDK 1.6, so I used the "-Djava.ext.dirs=" instead. That's why I copy the two jars above into that folder. If someone has a method that works better please post the update here.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox