dotcms3:自定义安装

这两天在windows server 2008上面配置了一下dotcms,记录一下过程。

1.软件下载。http://www.dotcms.org/products/downloads/index.dot?loc=tools

dotcms_1.7a_full.zip

直接解压,注意目录名称不能出现空格


2.使用文档Install_dotCMS_Release.txt,在解压目录下。
这个是必须要看的,里面介绍了如何安装及注意的细节。

文档内容:
1.安装java环境。
Installing Java
    a) Download and install Java JDK 1.5 or higher.
       IMPORTANT: Currently Java 1.6 on Linux 64 bits doesn't work, you have to use 1.5
    b) Make sure that you have a JAVA_HOME environmental variable
       that points to the root of the jdk install directory.  
       
       IMPORTANT: On windows boxes it is important that your
       JAVA_HOME environmental variable uses 8.3 names and does
       not contain a space, i.e. JAVA_HOME=C:/Progra~1/Java/jre-1.5.1_02/

配好JAVA_HOME.这里看起来挺容易的。默认是C:/Program Files/..,但是dotcms的所有路径要求没有空格,太BT了。所以得改。重新安装jdk。但是设置好环境变量的时候,总是出现问题,报错说在C:/Program Files/路径下找不到jre,明明已经改了。怀疑是不是windows没有更新环境变量。后来重启解决问题。

2.
 Download and install the dotcms
    a) download the latest dotcms zip file from the dotCMS website.
    b) unzip the dotCMS into its own folder. The folder name must NOT contain spaces.
这一步就是之前的解压。

3.- Creating the database
    dotCMS ssupports 4 types of databases,
    PostgreSQL, MySQL, MSSQL and Oracle. Regardless of which database
    you choose to use, we recommend you create a new database.
    
    a) Create a new database called dotcms (with UTF-8 encoding for the character set, if i18n support is needed.
       Please, refer to the document entitled "i18ned databases for dotCMS.txt" for further details).        
    b) The dotCMS will create the schema and initial data it needs when it first starts.

创建数据库。
这里支持
PostgreSQL, MySQL, MSSQL and Oracle这几种数据库。
用dotcms的windows exe文件安装是默认PostgreSQL。一开会有N个线程,烦死了。

现在自定义,选了个mysql.这里最好是选自己熟悉的。我安装的服务器上有SQL server 2008,结果一堆的什么动态端口,整了好久没弄明白。后来用mysql因为比较熟悉,从下载到用上10分钟搞定。安装完后记得需要建立一个叫dotcms的schema.启动的时候dotcms会把数据库写好。会出现写的信息。

以下是数据库的配置。
修改解压目录下的conf/Catalina/localhost/ROOT.xml
文件。在<!-- POSTGRESQL -->的是注释。
注意把这个<!-- POSTGRESQL -->的-->移动到下面把配置信息注释掉。再把想要的数据库配置打开。

当然了,最后得修url。特别简单吧?



4.- Set the server IP address. [Optional]
    The dotCMS will automatically run on localhost. If you need
    the dotCMS to run on a particular IP address, you can specify it in the
    ./conf/server.xml file.     Edit the ./conf/server.xml file and search
    the connector and server tags and add the address property on both. E.G.
    
    <Server address="208.250.1.102" port="8005" shutdown="SHUTDOWN" debug="0">
    ...
     <Connector address="208.250.1.102" port="80"
                   URIEncoding="UTF-8"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="8443" acceptCount="100"
                   debug="0" connectionTimeout="20000"
                   disableUploadTimeout="true" />
    ...

修改IP:默认的是localhost,如果想通过网络访问的话,就把address="208.250.1.102"加到对应的地方。
对应的地方是:./conf/server.xml 文件的<Server 和<Connector后面,像上面所示。

5.- Set the database connection info in the conf/Catalina/localhost/ROOT.xml file.  
配置数据库上面讲了。

6.- If you are on a UNIX box, change the /bin scripts permissions,
    add execution permission to *.sh in the bin dir.
    > cd /wwwroot/test.dotcms.org/bin
    > chmod 755 *.sh

忽略。。

7.- Start the server using the bin/startup.sh or bin/startup.bat script
    and check the logs/catalina.out output.  Try tail -f ./logs/dotcms.log. On windows
    we suggest that you download the execllent tool baretail.exe and use it to monitor
    the logs.
现在可以启动了。在控制台下用安装目录下的bin/startup.bat就可以了。
很可能会有错误,这时候需要看log.就是./logs/dotcms.log文件,里面会有错误信息,比如数据库连不上呀等等。

8.- When dotCMS initally starts up, it will automatically import the starter site,
     using the dotCMS/starter.zip file.
    
这个就是上面的数据库提到的自动导入。
9.- Try to login in the backend
    http://localhost/c (or the ip address catalina is running on)
    user: test@dotcms.org
    password: test

10.- Enjoy!

Note: If you need to set up the dotCMS as a windows service follow the document
        'Setting Up dotCMS As Windows Service.txt'

 

这里最好也试了下,根据里面的要求直接改就OK了。

主要是目录名称得写对了。

 

算是应用dotcms的第一步吧,里面的说明文档很全,import and export都有详细的说明了。

doc和dotCMS里面的文本可以看一下,对初步使用很有帮助。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值