uPortal4.1.0安装部署
uPortal4.1.0安装部署 常见问题 1. Linux 下目录的访问权限问题 1.1 用正确的帐号登录,以及用正确的帐号上传文件 1.2 尽量上传压缩的文件,不要从别的机器上复制已经解压缩的文件夹 1.3 压缩文件上传后,再解压 一 、软件要求Jdk:jdk7最好,jdk8支持情况待验证,jdk6不支持。 Maven:3.0.3及以上 Ant: 1.8.2及以上 Container: Tomcat7及以上、jetty7及以上 DataBase:DB2、HypersonicSQL、MS SQL Server and MS JDBC Driver、MySQL、Oracle、PostgreSQL、Sybase SQL Server、JNDI managed DataSources 二、环境变量1、HOME配置exportJAVA_HOME=/path/to/java/jdk1.x export M2_HOME=/path/to/apache-maven/apache-maven-3.0.x exportANT_HOME=/path/to/apache-ant-1.8.2 2、PATH配置export PATH=$JAVA_HOME/bin:$PATH:$M2_HOME/bin:$PATH:$ANT_HOME/bin
3、MAVEN内存配置export MAVEN_OPTS="-Xmx1024M-XX:MaxPermSize=512m"
以上参数在windows上的配置略
三、配置容器本文以Tomcat7为例: 1、配置HOMEexportTOMCAT_HOME=/path/to/your/tomcat(linux) CATALINA_HOME :C:apache-tomcat-7.x(windows) 2、共享lib修改CATALINA_BASE/conf/catalina.properties文件 <!-- In older versions prior to uPortal 4.0.10--> shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
<!-- In uPortal 4.0.10+,shared/classes is NOT necessary:-> shared.loader=${catalina.base}/shared/lib/*.jar
3、共享sessionsuPortal要想支持JSR168或者JSR268的标准的portlets之间的session共享,需要在CATALINA_BASE/conf/context.xml文件中加入:
修改server.xml文件: <Connector port="8080"protocol="HTTP/1.1" connectionTimeout="20000"redirectPort="8443"emptySessionPath="true"/>
4、tomcat内存配置uPortal requires a larger than standardPermGen space and more heap than may be allocated by default,在tomcat的bin目录下加入一下文件: setenv.sh orsetenv.bat
5、GZipping HTML(可选)浏览器端性能可能会略有改善GZip-ping在适当的地方下载的内容。uPortal 4已经GZipsCSS和JavaScript。然而,uPortal并不GZipuPortal页面本身。GZipping可以通过执行Tomcat的HTML内容。要启用该功能,设置压缩=””好了Tomcat连接器,并设置compressable mime类型的列表。有关此功能的更多信息可以在Tomcat配置页面。 修改server.xml文件: <Connectorport="8080"protocol="HTTP/1.1" connectionTimeout="20000"redirectPort="8443" compression="on"compressableMimeType="text/html,text/xml,text/plain"/>
四、下载uPortal从官网下载uPortal的安装包,URL:http://www.jasig.org/uportal/
五、配置uPortal1、修改build.properties文件在uPortal的根目录下的用的内容覆盖的内容。 并找到 2、配置filters在uPortal的根目录下进入filters目录,主要修改local.properties文件,该文件可以配置uPortal的数据库连接、uPortal的服务配置、CAS服务的配置、日志信息以及LDAP的配置,代码如下: ## HSQL Configuration environment.build.hsql.port=8887
## Database Connection Settings (Uncomment the Maven Filterssection in rdbm.properties) environment.build.hibernate.connection.driver_class=org.hsqldb.jdbc.JDBCDriver environment.build.hibernate.connection.url=jdbc:hsqldb:hsql://localhost:${environment.build.hsql.port}/uPortal environment.build.hibernate.connection.username=sa environment.build.hibernate.connection.password= environment.build.hibernate.dialect=org.hibernate.dialect.HSQLDialect
# uPortal server configuration properties environment.build.uportal.server=localhost:8080 environment.build.uportal.protocol=http environment.build.uportal.context=/uPortal environment.build.uportal.email.fromAddress=portal@university.edu
# CAS server configuration properties environment.build.cas.server=localhost:8080 environment.build.cas.protocol=http
# Log4J values applied to portlets and portals. Seelog4j.properties file # in WEB-INF or resources directory foreachportlet. This provides a # single point of control formostlogging.
environment.build.log.rootLevel=INFO # Directory to place portal and portlet log files into. environment.build.log.logfileDirectory=${catalina.base}/logs # Assume a DailyRollingFileAppender is used. Set the pattern todaily log-file roll-overs. # Can also set to hourly,weekly,etc. Use yyyy-MM-dd-HHforhourly. # Seehttp://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html environment.build.log.rollingLogFileDatePattern=yyyy-MM-dd # Pattern to specify format of each log file entry. Seehttp://logging.apache.org/log4j/1.2/apidocs/index.html. environment.build.log.layoutConversionPattern=%5p [%t]%c{2}.[%x] %d{ISO8601} - %m%n environment.build.logback.layoutConversionPattern=%-5level[%thread] %logger{36} %d{ISO8601} - %msg%n
# LDAP server connection settings (optional) # To connect to LDAP,provide your connection information hereand uncomment one # or both integration beans inuportal-war/src/main/resources/properties/contexts/ldapContext.xml environment.build.ldap.url= environment.build.ldap.baseDn= environment.build.ldap.userName= environment.build.ldap.password=
3、发布uPortal在uPortal的根目录(uPortal-4.1.0-quick-startuPortal-4.1.0)下面执行以下命令: ant initportal
运行最后(这个过程大约需要8到30分钟不等)出现“BuildSuccessfully”则表示发布成功。
4、访问uPortal在第三步执行成功之后,重启tomcat,访问http://localhost:8080/uPortal/ 会出现下图:
六、修改数据库第一步: 配置数据库1.在filter目录,找到local.properties, 即uPortal-4.1.x/filters/local.properties,然后配置数据 uPortal/filters/local.properties
第二部: 增加数据库驱动1.打开uportal-db/pom.xml这个文件,添加(取消comment即可)postgresql的依赖 2.注意,一定要在 uPortal 源码下的 pom.xml中添加postgresql依赖的版本参数
uportal-db/pom.xml
uportal源码/pom.xml <hibernate.version>4.1.9.Final</hibernate.version> <hibernate-jpamodelgen.version>1.2.0.Final</hibernate-jpamodelgen.version> <hibernate-jpa-api.version>1.0.1.Final</hibernate-jpa-api.version> <hsqldb.version>2.3.2</hsqldb.version> <postgres.version>9.1-901.jdbc4</postgres.version> <icu4j.version>53.1</icu4j.version> <jackson2.version>2.3.3</jackson2.version> 然后在uPortal源码目录下,运行以下命令,进行项目编译和数据库的测试 ant dbtest -Dmaven.test.skip=true 在编译的时候,部分portlet会因为jar下载失败而编译失败,这些portlet可以取消编译,方法如下: 注意 CAS 是必须的 修改 uportal-portlets-overlaypom.xml <modules> <module>AnnouncementsPortlet</module> <module>basiclti-portlet</module> <module>BookmarksPortlet</module> <!--<module>CalendarPortlet</module>--> <module>cas</module> <module>cas-proxy-test-portlet</module> <!--<module>email-preview</module>--> <module>FunctionalTestsPortlet</module> <module>jasig-widget-portlets</module> <module>pluto-testsuite</module>
<!--<module>NewsReaderPortlet</module> <module>NotificationPortlet</module>--> <module>sakai-connector-portlet</module> <module>SimpleContentPortlet</module>
<!--<module>WeatherPortlet</module>--> <!--<module>WebProxyPortlet</module>--> </modules> 由于,这些portlet又是uportal-ear项目的依赖项,因此,需要在 uportal-earpom.xml中注释掉这些依赖 <!-- <dependency> <groupId>org.jasig.portal.portlets-overlay</groupId> <artifactId>BookmarksPortlet</artifactId> <version>${project.version}</version> <type>war</type> </dependency>
<dependency> <groupId>org.jasig.portal.portlets-overlay</groupId> <artifactId>CalendarPortlet</artifactId> <version>${project.version}</version> <type>war</type> </dependency> --> 然后在uPortal源码目录下,运行以下命令,进行项目编译和数据库的初始化 ant cleaninitportal -Dmaven.test.skip=true 然后,启动Tomcat; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- System.IO.FileNotFoundException:“未能加载文件或程序集“
- Trunk、Hybrid、Access、Tag、Untag、Pvid的关系与区别
- ruby-on-rails – 如果存在则更新,否则什么也不做?
- react Native 运行程序报错解决笔记
- SWF 文件不能访问本地资源
- Flex中遇到“1000: 对 setStyle 的引用有歧义。”的解决方法
- c# – 开发应用程序的版本号
- 使用正则表达式从字符串中删除垃圾字符
- mybookmark = mrc.bookmark----------书签的作用
- ruby-on-rails – SQLite3 :: SQLException:迁移时重复的列