Archive for java

How to setup liferay portal on linux

Posted in java, Linux with tags , on October 12, 2015 by dedy efendi

Ini ceritanya kita mau setup liferay dengan database internalnya mysql

  1. Downloadnya di mari https://www.liferay.com/downloads/liferay-portal/available-releases (bundled with tomcat)
  2. Unzip filenya saya taruh di folder apps unzip liferay-portal-tomcat-6.2-ce-ga4-20150416163831865.zip
  3. Download dulu jar ini mysql-connector-java-5.1.36-bin.jar taruh di /apps/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/lib
  4. Jalankan /apps/liferay-portal-6.2-ce-ga4/tomcat-7.0.42/bin/startup.sh
  5. Buka browser http://localhost:8080 dan rubah setting database internalnya ke mysq ini url drivernya macem ini jdbc:mysql://localhost/liferay?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false, oh iya sebelumnya buat dulu database liferay di mysql yah bisa merujuk ke link ini, selesai

#dahgituaja

How to create ssl for CAS Server on tomcat

Posted in Uncategorized with tags , on October 6, 2015 by dedy efendi

Ceritanya mau gaya2an aja sih, buat ssl untuk kebutuhan CAS Server karena kudu & wajib pake ssl

langsung aja gan

cd /opt/jdk1.7.0_79/bin
./keytool -genkey -alias tomcat -keypass changeit -keyalg RSA
./keytool -export -alias tomcat -keypass changeit -file server.crt
./keytool -import -file server.crt -keypass changeit -keystore ../jre/lib/security/cacerts
./keytool -list -keystore /root/.keystore

vi /apps/tomcat8/conf/server.xml
<Connector port=”8443″ protocol=”org.apache.coyote.http11.Http11NioProtocol” maxHttpHeaderSize=”8192″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”false” disableUploadTimeout=”true”
acceptCount=”100″ SSLEnabled=”true” scheme=”https” secure=”true”
clientAuth=”false” sslProtocol=”TLS”
keystoreFile=”/root/.keystore”
keystorePass=”changeit”
truststoreFile=”/opt/jdk1.7.0_79/jre/lib/security/cacerts” />

start tomcatnya

#dahgituaja 🙂

config user on tomcat

Posted in Uncategorized with tags , on October 6, 2015 by dedy efendi

Ceritanya membuat role user untuk manager-gui di tomcat 8

cd /home/tomcat/conf

vi tomcat-users.xml

–taruh diatas ini </tomcat-users>

<role rolename=”manager-gui”/>
<user username=”admin” password=”admin” roles=”manager-gui”/>

#dahgituaja

Merubah JVM (java virtual memory) di tomcat

Posted in Uncategorized with tags , on October 6, 2015 by dedy efendi

Mau merubah JVM di tomcat, dah cek di warungpedia belum ? 😛

#cd /home/tomcat/bin

#vi setenv.sh

JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre/bin/java
JRE_HOME=/usr/lib/jvm/java-8-oracle/jre
JAVA_OPTS=”$JAVA_OPTS ”
export JAVA_HOME
export JRE_HOME
export JAVA_OPTS=”-Dfile.encoding=UTF-8 -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m”

restart tomcat, dah gitu aja 🙂