Solr
Download and extract vanilla Liferay + Tomcat bundle to development directory such as C:\liferay-portal-6.1.0-ce-ga1
Delete seven cogs folder from webapps
Download solr.zip(http://lucene.apache.org/solr/), solr-web.zip(From Liferay plugin setup), apache-solr.zip(http://lucene.apache.org/solr/)
Unzip apache-solr.zip to C:\liferay-portal-6.1.0-ce-ga1 Note: you can unzip to any location and change the path in solr-spring.xml. This has only the required files from apache-solr 3.5.
unzip solr-web.zip & solr.zip under C:\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.27\webapps
Copy solr.xml to C:\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\conf\Catalina\localhost
Modify solr.xml to point to the path of solr war file.
Copy solr-spring.xml to C:\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.27\webapps\solr-web\WEB-INF\classes\META-INF
Modify solr location to point to you solr url <bean id="com.liferay.portal.search.solr.server.BasicAuthSolrServer" class="com.liferay.portal.search.solr.server.BasicAuthSolrServer"><constructor-arg type="java.lang.String" value="http://localhost:8080/solr" /></bean>
Modify setenv.bat to include solr home property set "JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home=C:\liferay-portal-6.1.0-ce-ga1\apache-solr\example\solr\ -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
Start portal
This comment has been removed by the author.
ReplyDeleteHow to Disable a portlet in Liferay?
ReplyDeleteliferay-portlet.xml
Set the include value to true to if the portlet is available to the portal. If set to false, the portlet is not available to
the portal. The default value is true. Portlets that are not included as part of the portal are never available to the
user to be made active or inactive. As far the user knows, the portlets do not even exist in the system. This allows
the Liferay developers to bundle a lot of portlets in one core package, and yet allow custom deployments to turn
on or off individual portlets or sets of portlets. This follows the Siebel and Microsoft model of bundling
everything in one core package, but using XML configuration or registry settings to turn on and off features or
sets of features. We do not recommend that custom deployers modify the core source by removing specific
portlets because this prevents an easy upgrade process in the future. The best way to turn on and off portlets is
to set the include element. The advantage of this way of doing things is that it becomes very easy to deploy
Liferay. All features are available in one package. The disadvantage is that by not utilizing all of the portlets, you
are wasting disk space and may even take a small but static memory footprint. However, we feel that the extra
disk space and memory usage is a cheap price to pay in order to provide an easy installation and upgrade path.
Jenkins Setup
ReplyDelete--------------------
download jenkins war file
ReplyDeletehttp://mirrors.jenkins-ci.org/war/latest/jenkins.war
http://jenkins-ci.org/
then paste it on Tomcat webapps folder
now start accessing from the below URL
https://localhost:8543/jenkins/
Configurations:
now click on manage Jenkins link-> configure system link->
Configure JDK, Maven , SVN Url or local file system
ReplyDeletenow click on New Job link to create jobs like
ReplyDeleteto build whole source with maven
Build parameter
liferay.auto.deploy.dir
C:\Jani\deploy
Mention root pom.xml path
C:\Jani\workspace\pom.xml
Goal: clean package install
to unblock variables and services in velocity templates
ReplyDeleteThis can be done by the property
journal.template.velocity.restricted.variables=
leaving it blank will allow service locator to get the service
#set($layoutLocalService = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
ReplyDelete#set($groupId= $request.get("theme-display").get("scope-group-id"))
#set($pageUrl= "/news_details") ##change this to the friendly url of the details page used
##assumption : based on private page
#set($newsDetailsLayout= $layoutLocalService.getFriendlyURLLayout($getterUtil.getLong($groupId),$getterUtil.getBoolean("false"), $pageUrl))
#set($portlets = $newsDetailsLayout.getLayoutType().getPortlets())
#foreach( $portlet in $portlets )
#if($portlet.getPortletName()==101)
#set($instanceId = $portlet.getInstanceId())
#end
#end
#set($themeDisplay = $request.get("theme-display"))
#set($organizationLocalService= $serviceLocator.findService("com.liferay.portal.service.OrganizationLocalService"))
#set($groupLocalService= $serviceLocator.findService("com.liferay.portal.service.GroupLocalService"))
#set($organizationId=$groupLocalService.getGroup($getterUtil.getLong($groupId)).getOrganizationId())
#set($organizationUrl=$groupLocalService.getGroup($getterUtil.getLong($groupId)).getFriendlyURL())
##$themeDisplay.get("portal-url")$themeDisplay.get("path-friendly-url-public")$organizationUrl$pageUrl/-/asset_publisher/$instanceId/content/$articleId
#set($portal_url="/portal/de/web")
#set ($journalService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService"))
href="$themeDisplay.get("path-friendly-url-public")$organizationUrl$pageUrl/-/asset_publisher/$instanceId/content/$journalArticle.getUrlTitle()" target="new"
ReplyDelete1. Load Balancer - it can be software (i.e. - Apache), or hardware (F5), or whatever you wish, really. All it is doing is redirecting requests.
ReplyDelete2. Centralized Database - Hopefully, you have gotten off of HSQL and are using a real DB server. This is a JBDC connection. It is abstracted from Liferay's point of view. Any level of redundancy you have behind that JDBC connection is up to you and your DBA. Just as an example, you may choose to configure a MySQL cluster, or Oracle RAC, for DB high availability
3. Ehcache - This is what Liferay uses out-of-the-box for it's Hibernate level 2 cache. This needs to be configured to sync, else you will see inconsistencies depending on what node the load balancer redirects end users to. You are not forced to use Ehcache, it is simply what it ships with. You could use something like Terracotta, for example. If you do not do this, you will most definitely see inconsistencies depending on the node the end user is on, due to stale caches.
4. Lucene - This needs to be centralized. This can be done: a) via JDBC (can work, but there may be issues with speed and table locks), b) swapped out for something like SOLR (runs as a webapp in Tomcat), or c) starting with Liferay 5.2 SP1 there is a clusterlink feature that can be turned on where each node maintains its own replicated cache. If you do not do this, you will see inconsistencies with search and other indexed data that is returned from the DB.
5. Document Library & Image Gallery - This needs to be centralized. This is because each node keeps the assets locally on the filesystem by default. While the meta-data is in the DB, the files serve up faster this way (vs. BLOBS in a DB). So, you need to either a) point the content repository to be stored in the DB (can work but performance may suffer) via JCRHook in portal properties, or b) mount a path a shared storage (i.e. SAN or other file system storage) and configure each node to connect to this common place via AdvancedFileSystemHook in portal properties. If you do not do this, the meta-data regarding your documents will be in the DB, but when you try to retrieve them, the node may or may not find the document there, physically.