How to install & create user & create database mysql on linux

Temans ceritanya saya mau install database mysql beserta membuat user & create databasenya di linux centos 6.6 untuk kebutuhan instalasi web apps liferay, langsung aja yah :

  1. yum install -y mysql-server
  2. chkconfig –levels 235 mysqld on
  3. service mysqld start
  4. mysql -u root
  5. CREATE USER ‘liferay’@’localhost’ IDENTIFIED BY ‘liferay123’;
    GRANT ALL PRIVILEGES ON * . * TO ‘liferay’@’localhost’;
    FLUSH PRIVILEGES;
    SELECT User,Host FROM mysql.user;
  6. CREATE DATABASE liferay;

#dahgituaja

Advertisements

How to setup liferay portal on linux

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

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 🙂

Merubah JVM (java virtual memory) di tomcat

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 🙂