`
ihuashao
  • 浏览: 4544285 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

opencms 安装与使用

阅读更多

opencms_6.2.2\install.html

1. Install the Java 2 SDK, version 1.4 or newer

2Install Tomcat

3 Install MySQL

4Deploy the opencms.war file

Copy the opencms.war file from the binary distribution ZIP file to CATALINA_HOME/webapps/. Replace CATALINA_HOME with the real path to your Tomcat installation.

Start (or restart) Tomcat. Tomcat will now deploy the web application OpenCms.

Important: OpenCms requires that it's *.war file is unpacked. OpenCms can not be deployed as war file only. Make sure Tomcat does unpack the war file and creates the CATALINA_HOME/webapps/opencms/ directory, placing the OpenCms files in this directory. The default configuration for your Servlet containers / environment could be to not unpack the deployed *.war file. If this is so you must unpack the opencms.war file manually. Use an unzip tool for this, *.war files are just *.zip files with a different extension. The OpenCms setup wizard will display a warning and not allow you to continue if you did not unpack the *.war file.

//安装OpenCms 6.2.2 for Java 1.4:

Follow the following steps to patch OpenCms 6.2.2 for Java 1.4:

1. Shutdown your OpenCms servlet container

The OpenCms Java 1.4 compatibility patch requires that you shut down OpenCms first. You can use the

Broadcast message tool in the 'Administration' view to inform users before the server is shut down.

2. Extract the OpenCms Java 1.4 compatibility patch 'opencms_6.2.2_java_1.4.zip' to

your web application directory

If you extracted the file to an external directory, copy the folder 'WEB-INF' to the OpenCms webapp directory.

Be sure that the files 'lib/*.jar' are replaced with the new versions from the archive before you

continue.

3. Start your OpenCms servlet container

You should now be able to log into the OpenCms workplace as before.

4. Finally, do a quick test if everything works

* Preview some pages in the folders demopages/ or modulesdemo/ of the default site.

* Edit a resource and modify its content.

* Publish one or more resources.

* Check the Administration view of OpenCms.

5. Install OpenCms using the Setup-Wizard

Start the Setup-Wizard by pointing your webbrowser to http://localhost:8080/opencms/setup/. Depending on your configuration, you have to replace localhost with your servername. The port 8080 is only used if you start Tomcat in standalone mode.

Follow the instructions of the OpenCms Setup-Wizard. It will set up the OpenCms database and import all availablemodules into the system. For normal installations with MySql and Tomcat running on the same server all default settings will fit your needs.
If you are using different database users with MySql, be sure that they exist before creating the database tables and importing the modules.

Important: Make sure you disable all popup blockers for the server URL you installed OpenCms on. Otherwise you will not be able to log in to the OpenCms Workplace.

step_4_database_setup.bmp 图示

user password

setup connection root *******

opencms connection root *******

注意 user 上下一致 。如果如 data2.bmp,则会不成功 (可以建数据库,但是不能成功建表)。

模版设计 openCms java api 的学习。

关于建立网站根目录 :需要注意的地方:

<shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype><shape id="_x0000_s1026" style="MARGIN-TOP: -87.6pt; Z-INDEX: 1; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line" o:allowoverlap="f" alt="" type="#_x0000_t75"><font size="3"><imagedata o:title="folder_open" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image001.gif"></imagedata><wrap type="square"></wrap></font></shape>sites <shape id="_x0000_s1027" style="MARGIN-TOP: -87.6pt; Z-INDEX: 2; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" o:allowoverlap="f" alt="" type="#_x0000_t75"><imagedata o:title="line" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.gif"></imagedata><wrap type="square"></wrap></shape><shape id="_x0000_s1028" style="MARGIN-TOP: -87.6pt; Z-INDEX: 3; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" href="javascript:parent.loadNode(document,%20542529696);" o:allowoverlap="f" alt="" type="#_x0000_t75" o:button="t"><imagedata o:title="upcross" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image003.gif"></imagedata><wrap type="square"></wrap></shape><shape id="_x0000_s1029" style="MARGIN-TOP: -87.6pt; Z-INDEX: 4; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" o:allowoverlap="f" alt="" type="#_x0000_t75"><imagedata o:title="ufolder" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image004.gif"></imagedata><wrap type="square"></wrap></shape>:

default <shape id="_x0000_s1030" style="MARGIN-TOP: -87.6pt; Z-INDEX: 5; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" o:allowoverlap="f" alt="" type="#_x0000_t75"><imagedata o:title="line" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image002.gif"></imagedata><wrap type="square"></wrap></shape><shape id="_x0000_s1031" style="MARGIN-TOP: -87.6pt; Z-INDEX: 6; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" o:allowoverlap="f" alt="" type="#_x0000_t75"><imagedata o:title="end" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image005.gif"></imagedata><wrap type="square"></wrap></shape><shape id="_x0000_s1032" style="MARGIN-TOP: -87.6pt; Z-INDEX: 7; LEFT: 0px; MARGIN-LEFT: -90pt; WIDTH: 12pt; POSITION: absolute; HEIGHT: 12pt; TEXT-ALIGN: left; mso-wrap-distance-left: 0; mso-wrap-distance-right: 0; mso-position-vertical-relative: line; mso-position-horizontal-relative: text" o:allowoverlap="f" alt="" type="#_x0000_t75"><imagedata o:title="folder" src="file:///C:%5CDOCUME~1%5Cpowinder%5CLOCALS~1%5CTemp%5Cmsohtml1%5C01%5Cclip_image006.gif"></imagedata><wrap type="square"></wrap></shape>

testWeb ,建立在sites 目录下,即可。

关于tomcat 无故 down掉的问题。参考 blog.csdn.net/xiaoli_feng .

module 模块

template 模板

新建模块 OpenCms模块创建图解

http://blog.csdn.net/qianxuncms/archive/2007/04/06/1554192.aspx
  确定当前不在online状态下,点击新建模块按钮:
  名称是模块包的名称,名称规则应该遵循java包的命名规则,此名称在模块创建后不可以再修改,在模块中可以包含java类,这些类包的名称和模块的名称一定要相同;
  模块名称中可以自由输入,如描述模块功能的名字;
  描述模块的描述信息,可以随意输入;
  模块版本:模块的版本号;
  模块组:用于把属于同类的模块分组,这样在模块列表中可以按模块组进行排序;
  动作类/行为类:在模块初始化或修改时所执行的类,这个类应该包含在模块包中,请参考JavaDoc中的I_CmsModuleAction接口。
  作者姓名作者email”中输入模块创建者的名称与email信息;
  创建模块文件夹:创建模块时在/system/modules/中创建模块包文件夹,如org.opencms.test
  创建"templates"子文件夹:在模块文件夹下创建"templates"子文件夹,用于存放模板;
  创建"elements"子文件夹:在模块文件夹下创建"elements"子文件夹,用于存放共用的元素;
  创建"resources"子文件夹:在模块文件夹下创建"resources"子文件夹,用于存放模块所需的资源;
  创建“classes”子文件夹:在模块文件夹下创建“classes”子文件夹,用于存放模块中的类;
  创建"lib"子文件夹:在模块文件夹下创建"lib"子文件夹,用于存放模块中的jar

新建一个简单的JSP模板 OpenCms JSP 模板开发——

JSP模板就是一个普通的JSP页面,在特定的位置使用标签来包含内容。

请注意:JSP模板存放的位置是在模块下的“templates”子文件夹中,只有这样做,在创建页面时模板才会出现在模板选择列表中

模板文件内容如下:

<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>

<html>

<head>

<title><cms:property name="Title" /></title>

<meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; CHARSET=<cms:property name="content-encoding" default="UTF-8" />" />

<link rel="stylesheet" type= "text/css" href="<cms:link>../resources/myStyle.css</cms:link>" />

</head>

<body>

<h2>第一个简单模板的head</h2>

<cms:include element= "body"/>

<h2>第一个简单模板的foot</h2>

</body>

</html>

在使用OpenCms标签前一定要如下声明标签: <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>,关于标签的详细说明,参见

http://blog.csdn.net/qianxuncms/archive/2007/04/09/1557085.aspx

<cms:include element="body">标签,它包含一个可编辑的页面元素。

新建一个页面,用到该jsp模板,编辑该页面,也就是编辑页面中的“body”元素,因为JSP模板指定了css,所以此处输入的内容按css样式显示。

Preview的话,除了显示 jsp模板的内容外,还会显示 编辑该页面 所插入的内容。

详情见:

http://blog.csdn.net/qianxuncms/archive/2007/04/09/1557085.aspx

温习一下 jsp开发的知。。。。

分享到:
评论

相关推荐

    OPENCMS 7.0 安装手册

    最新版的opencms 中文安装手册,详细介绍如何使用opencms. 1:安装条件 2:安装opencms 配置数据库

    OpenCMS环境的搭建及安装步骤

    本文档详细讲解了OpenCMS环境的搭建及安装步骤过程

    OpenCms 6安装

    OpenCms 6安装 OpenCms 6安装 OpenCms 6安装 OpenCms 6安装 OpenCms 6安装 OpenCms 6安装

    opencms 汉化组件

     org.opencms.locale.zh_8.0.1.zip(注意,有些网站转载汉化包后会将原zip格式转变成rar格式,导致汉化模块安装失败,请安装前做好检查,或可以直接从http://www.opencmschina.comg下载。)  使用说明:   1、...

    OpenCms 7.x和8.x 升级到 OpenCms 9.5.2

    Update your existing OpenCms installation to version 9.5.2 with the easy to use upgrade wizard. OpenCms 7.x 和8.x 升级到OpenCms 9.5.2版本安装向导。

    如何安装OPENCMS

    教你如何安装OPENCMS,从JDK开始,tomcat,mySql,以及如何配置客户端

    opencms for myeclipse插件及其使用方法

    myeclipse开发Opencms的插件。及其安装的方式。通过测试了。非常好用

    opencms 内容管理入门指南

    不错的opencms教程 详细描述OpenCMS部署、安装开发的方式具体模块的开发

    OpenCms6.2千寻汉化包1.1版

    作者希望OpenCms6.2千寻汉化包1.1版能给众多的OpenCms研究者在OpenCms的研究道路上提供一些帮助…… 作者会陆续出一些OpenCms相关的东东与大家共享……:) OpenCms是一个专业级开源网站内容管理系统,是一个J2EE的...

    OpenCms7使用说明书(上)

    OpenCms7使用说明书(上),介绍如何使用OpenCms7,安装OpenCms7后需要做的事情。

    OpenCms8.0.1汉化包

    使用说明:   1、从官方网站(http://www.opencms.org)下载OpenCms8.0.1 安装;  2、安装成功后登录OpenCms,在view中选择Administration接着执行:Module Management--&gt;Import Module with HTTP,选择org....

    OpenCMS内容管理入门指南(附源码)

    很多人都听说了OpenCms,知道了它的强大,索性的下载安装了,终于见到了久违OpenCms,看到了它简洁的界面,欣喜过后却不免一脸茫然,这个东西怎么用,我怎么用它来建站,从哪开始,无从下手,找资料,少之双少~~入门...

    OpenCms-install.rar_opencms

    OpenCms的安装(图解,包含Tomcat,Mysql的安装和配置)

    opencms11.7z

    opencms最新版,下载解压后直接放到tomcat的webapps目录下,起tomcat服务器,访问:http://localhost:8080/opencms/setup/,进行安装。 环境要求: 1.tomcat; 2.mysql 5.x及以上; 3.jdk;

    opencms文档

    NULL 博文链接:https://snowelf.iteye.com/blog/1403197

    org.opencms.welcome-8.5.2.zip

    trivet.zip,一个基于java序列化和http的普通远程处理协议。

    OpenCms7--源代码编译安装-分享[收集].pdf

    OpenCms7--源代码编译安装-分享[收集].pdf

    OpenCms8.5 安装

    NULL 博文链接:https://jiaozhiguang-126-com.iteye.com/blog/1714609

    针对OpenCms7的通用计数器

    该计数器采用标签方式,在JSP中加入简短的两行代码即可对该网页计数,如果在模板上加入计数器代码...计数器所需的数据库表能在安装模块后自生成(目前只编写了MySQL与Oracle的SQL,只在MySQL上进行了测试了) 使用示例

    OpenCms ANT Build-开源

    OpenCms ANT Build允许从构建树(例如,在您的IDE中)构建OpenCms模块,然后可以将其安装在OpenCms服务器上。 它包含2个用于编写自定义生成过程脚本的ANT任务。 包含带有build.xml的示例树。

Global site tag (gtag.js) - Google Analytics