cd /tmp
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-amd64.deb
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-amd64.deb.sha512
shasum -a 512 -c elasticsearch-7.4.2-amd64.deb.sha512
sudo dpkg -i elasticsearch-7.4.2-amd64.deb
| // inspired by https://stackoverflow.com/questions/1591401/javascript-jquery-check-broken-links | |
| function urlExists(element, callback) { | |
| var xhr = new XMLHttpRequest(); | |
| xhr.onreadystatechange = function() { | |
| if (xhr.readyState === 4) { | |
| callback(xhr.status < 400); | |
| } | |
| }; | |
| xhr.open('HEAD', element.attr("href")); |
While trying to create a poorman's auditing system with Liferay 7 I ran into some challenges. So to prevent you make the same mistakes you can learn from my mistakes.
First you need to create a portal-log4j-ext.xml that will be used to override portal-log4j.xml Mine looks like this but yours might be totally different:
<?xml version="1.0"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
| { | |
| "availableLanguageIds": [ | |
| "en_US" | |
| ], | |
| "defaultLanguageId": "en_US", | |
| "fields": [ | |
| { | |
| "label": { | |
| "en_US": "Url" | |
| }, |
A quick summary of https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/using-resources-and-permissions
To see the security settings for the service you MUST have a portlet reference. If you don't have a portlet just yet try to refer to an existing one like com_liferay_blogs_web_portlet_BlogsPortlet
Create a file portlet.properties in .../[project]-service/src/main/resources/
Add resource.actions.configs=META-INF/resource-actions/default.xml in the file.
Howto install apache felix web console on liferay dxp 7.2
First locate the url for the webconsole jar-file at https://felix.apache.org/downloads.cgi
In this example I use the following:
http://apache.mirror.triple-it.nl//felix/org.apache.felix.webconsole-4.3.12-all.jar
Now, head over to your gogo shell (web|telnet|blade sh)
| <#-- | |
| Web content templates are used to lay out the fields defined in a web | |
| content structure. | |
| Please use the left panel to quickly add commonly used variables. | |
| Autocomplete is also available and can be invoked by typing "${". | |
| --> | |
| <#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> | |
| <#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> |
| <#if entries?has_content> | |
| <#list entries as curEntry> | |
| <#assign renderer = curEntry.getAssetRenderer() /> | |
| <#assign journalArticle = renderer.getArticle() /> | |
| <#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> | |
| <#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) /> | |
| <#if categories?has_content> | |
| <#list categories as category> | |
| ${category.getName()} |
| #noip | |
| sudo apt-get update | |
| sudo apt-get install build-essential | |
| cd /usr/local/src | |
| sudo wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz | |
| sudo tar xzf noip-duc-linux.tar.gz | |
| cd noip-2* | |
| sudo make install | |
| sudo su |
| <#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> | |
| <#assign dLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")> | |
| <img data-fileentryid="37308" | |
| src="/documents/20143/0/photo.jpeg/85140258-1c9d-89b8-4e45-d79d5e262318?t=1518425" /> | |
| <#if entries?has_content> | |
| <#list entries as curEntry> | |
| <#assign renderer = curEntry.getAssetRenderer() /> | |
| <#assign docPK = curEntry.getClassPK() /> |