CMS Shell
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. |
− | + | Under Linux I used the following commands to run the shell: | |
− | Then | + | "'''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: | ||
− | I | + | '''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. |
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.