Skip to content

Instantly share code, notes, and snippets.

View jverweijL's full-sized avatar
💭
🏴‍☠️

Jan Verweij jverweijL

💭
🏴‍☠️
View GitHub Profile
sudo docker pull mysql:5.7
CREATE DATABASE liferay71;
CREATE USER 'lportal'@'localhost' IDENTIFIED BY 'my-strong-password-here';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON liferay71.* TO 'lportal'@'localhost';
FLUSH PRIVILEGES;
@jverweijL
jverweijL / clear-cache.sh
Created June 12, 2018 09:06
clear the cache for liferay dxp 7.0
LIFERAY_HOME=/opt/liferay-dxp-digital-enterprise-7.0-sp2
sudo systemctl stop liferay
sudo rm -rf $LIFERAY_HOME/tomcat-8.0.32/temp/*
sudo rm -rf $LIFERAY_HOME/tomcat-8.0.32/work/*
sudo rm -rf $LIFERAY_HOME/tomcat-8.0.32/logs/*
sudo rm -rf $LIFERAY_HOME/osgi/state/*
sudo systemctl start liferay

First you need to install and configure the ddns update client

cd /tmp
wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz
tar xzf noip-duc-linux.tar.gz
sudo mv noip-2.1.9-1 /usr/local/src/
cd /usr/local/src/noip-2.1.9-1
sudo make
sudo make install

caching.conf

proxy_cache_path /var/cache/nginx/liferay_cache levels=1:2 keys_zone=liferay_cache:10m inactive=60m max_size=256M;
#!/bin/bash
sudo certbot renew --dry-run
read -e -p "Install new certificate? " -i "yes" answer
if [ "$answer" = "yes" ]; then
sudo certbot renew; # Fetches new certificate
fi
read -e -p "Restart nginx? " -i "yes" answer
if [ "$answer" = "yes" ]; then
#!/bin/bash
read -e -p "Do you wish to run autoremove? " -i "yes" answer
if [ "$answer" = "yes" ]; then
sudo apt-get autoremove; # Remove deprecated packages
fi
read -e -p "Fetch the list of updates available? " -i "yes" answer
if [ "$answer" = "yes" ]; then
sudo apt-get update; # Fetches the list of available updates
# start-openoffice.sh
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
@jverweijL
jverweijL / leiden-platform-developer.md
Created April 12, 2018 08:00 — forked from sammso/leiden-platform-developer.md
This file is for the students of Platform Developer at Leiden 9th April, 2018