我正试图在我的计算机(Windows )上本地安装Weceem (Grails ),但是设置JAVA_OPTS变量JAVA_OPTS非常困难。
我的环境如下:
将Path
E 215环境
H 121一个名为E 122weceemE 223的数据库,其中E 124weceeme 225作为用户名和密码创建的,用于创建各种数据库对象。H 226G 227/code>问题
为了安装WECEEM GRAILS,您必须在Tomcat的类路径中有一个weceem.properties文件。我很难安排这件事。我所做的如下:
weceem.properties
在tomcat_home/lib下创建了一个,设置如下:dataSource.driverClassName=com.mysql.jdbc.Driver dataSource.username=weceem dataSource.password= weceem dataSource.dbCreate=update up tomcat6w.exe并在Java Tab\Java选项textarea下添加了以下JAVA_OPT:
-Dweceem.config.location=C:\Program Files\\Tomcat 6.0\lib\weceem.properties
Place weceem-1.1.2.war,在tomcat_home\webapps
Double下单击tomcat6.exe,tomcat_home\bin
Everything下的似乎正在部署/初始化,但我注意到,在开始时,它是这样写的: Classpath:\Program\\Tomcat 6.0\lib\weceem.properties无法打开,因为它不存在。有谁知道怎么解决这个问题吗?
关于如何安装Weceem,有什么好的一步一步的详细解决方案?
谢谢你,维里亚托
发布于 2012-03-21 18:22:32
我已经让它在Linux上工作了。这也让我头疼,但我就是这么做的:
CREATE DATABASE weceem CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'weceem' IDENTIFIED BY 'weceem';
GRANT ALL ON *.* TO 'weceem'@'%';然后将weceem.properties文件放在tomcat_home/conf.下用服务器名或服务器IP地址替换本地主机。
dataSource.pooled=true
dataSource.driverClassName=com.mysql.jdbc.Driver
dataSource.username=weceem
dataSource.password= weceem
dataSource.dbCreate=update
dataSource.url=jdbc:mysql://localhost:3306/weceem最后,在标头注释之后使用以下内容编辑catalina.sh
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx512m -
XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -
XX:+DisableExplicitGC -Dweceem.config.location=file:/usr/share/apache-tomcat-
6.0.32/conf/weceem.properties"如果有人知道如何在Windows上执行此操作,请共享,因为我的tomcat_home/bin文件夹中没有等效的catalina.sh (catalina.bat)。
发布于 2012-04-06 08:30:24
我在窗户上用了weceem (和postgres一起)。从上面调整的步骤
创建c:/apps/weceem/在上面的文件夹中创建一个文件weceem.properties。以下内容
# Control whether or not connection pooling is enabled
dataSource.pooled=true
# Set the JDBC driver class name - class must be on classpath
dataSource.driverClassName=org.postgresql.Driver
# The user name for the SQL databasee
dataSource.username=weceem
# The password for the SQL database
dataSource.password=weceem
# The database update mode. Leave as "update"
dataSource.dbCreate=update
# The JDBC URL of your database
dataSource.url=jdbc:postgresql://localhost:5432/weceem
# OR you can specify a JNDI data source with just this line, and nothing else
# but you must have configured the JNDI database resource in your servlet container/
#dataSource.jndiName=java:comp/env/jdbc/WeceemDS
# The path to use for storing search index files - MUST be writable
searchable.index.path=c:/temp/weceem/search-indexes只创建了一行setenv.bat
set CATALINA_OPTS=-Xmx1100m -XX:MaxPermSize=300m -Dweceem.config.location=file:///C:/apps/weceem/weceem.properties必须保留文件名。它一定在tomcat的bin目录中。catalina.bat源从文件中获取值。还请注意,weceem.config.location是URL,所以必须以file:///开头)
我将postgresqljdbc.jar复制到应用程序库区域( tomcathome\webapps\weceem-1.1.2\WEB-INF\lib )
在postgres中创建用户和数据库
postgres=# create user weceem password 'weceem';
postgres=# create database weceem owner weceem encoding 'UTF8';https://stackoverflow.com/questions/9793637
复制相似问题