July 5th, 2017 by Gia
vi /etc/selinux/config      #disable selinux
yum -y update
yum -y install wget httpd mysql-server mod_perl perl-core procmail perl-Archive-Zip perl-XML-LibXML perl-XML-LibXSLT perl-XML-Parser perl-Crypt-SSLeay perl-LDAP perl-Net-DNS perl-TimeDate perl-Template-Toolkit
wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-5.0.20-01.noarch.rpm
rpm -ivh otrs-5.0.20-01.noarch.rpm
service httpd start
vi /etc/my.cnf
  ## add this line under mysqld section
  max_allowed_packet=20MB
  innodb_log_file_size=512MB
  ## end
service mysqld start
mysql_secure_installation
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT     #allow tcp 80, HTTP
chkconfig --levels 2345 httpd on
chkconfig --levels 2345 mysqld on

Access http://yourserver/otrs/installation.pl from your browser to start installation process.
After installation process, run this command in shell to run OTRS Daemon.

su -c "/opt/otrs/bin/otrs.Daemon.pl start" -s /bin/bash otrs
Tags: ,
Posted in centOS, Linux | No Comments »
April 5th, 2017 by Gia

PROCEDURE :

DROP PROCEDURE IF EXISTS `p_terbilang`;
DELIMITER ;;
CREATE PROCEDURE `p_terbilang`(IN angka bigint, OUT retval TEXT)
BEGIN 
  -- @rgiapratama - 2017
	DECLARE tmp1 TEXT;
	DECLARE tmp2 TEXT;
	
	SET max_sp_recursion_depth := 20;

	IF(angka = 0) THEN 
		SET retval = '';
  ELSEIF(angka < 12) THEN 
		SET retval = ELT(angka,'satu','dua','tiga','empat','lima','enam','tujuh','delapan','sembilan','sepuluh','sebelas');
  ELSEIF (angka < 20) THEN
		CALL p_terbilang((angka-10),tmp1);
		SET retval = CONCAT(tmp1,' belas');
  ELSEIF (angka < 100) THEN 
		CALL p_terbilang(FLOOR(angka/10),tmp1);
		CALL p_terbilang((angka%10),tmp2);
		SET retval = CONCAT(tmp1,' puluh ',tmp2);
  ELSEIf (angka < 200) THEN 
		CALL p_terbilang((angka-100),tmp1);
		SET retval = CONCAT('seratus ',tmp1);
  ELSEIF (angka < 1000) THEN
		CALL p_terbilang(FLOOR(angka/100),tmp1);
		CALL p_terbilang((angka%100),tmp2);
		SET retval = CONCAT(tmp1,' ratus ',tmp2);
  ELSEIF (angka < 2000) THEN
		CALL p_terbilang((angka-1000),tmp1);
		SET retval = CONCAT('seribu ',tmp1);
  ELSEIF (angka < 1000000) THEN
		CALL p_terbilang(FLOOR(angka/1000),tmp1);
		CALL p_terbilang((angka%1000),tmp2);
		SET retval = CONCAT(tmp1,' ribu ',tmp2);
  ELSEIF (angka < 1000000000) THEN
		CALL p_terbilang(FLOOR(angka/1000000),tmp1);
		CALL p_terbilang((angka%1000000),tmp2);
		SET retval = CONCAT(tmp1,' juta ',tmp2);
  ELSEIF (angka < 1000000000000) THEN
		CALL p_terbilang(FLOOR(angka/1000000000),tmp1);
		CALL p_terbilang((angka%1000000000),tmp2);
		SET retval = CONCAT(tmp1,' milyar ',tmp2);
  ELSE SET retval = 'GIA';
  END IF;
END
;;
DELIMITER ;

FUNCTION :

DROP FUNCTION IF EXISTS `f_terbilang`;
DELIMITER ;;
CREATE FUNCTION `f_terbilang`(angka BIGINT) RETURNS text CHARSET latin1
BEGIN
-- @rgiapratama - 2017
    DECLARE v_result TEXT;
    CALL p_terbilang(angka, v_result);
    RETURN REPLACE(v_result,'  ',' ');
END
;;
DELIMITER ;

Hasil :

mysql> SELECT f_terbilang(19048500);
+----------------------------------------------------------+
| f_terbilang(19048500)                                    |
+----------------------------------------------------------+
| sembilan belas juta empat puluh delapan ribu lima ratus  |
+----------------------------------------------------------+
1 row in set (0.07 sec)

mysql>
Tags:
Posted in Database, MySQL | No Comments »
November 25th, 2015 by Gia

When I upgraded my laptop from Windows 7 to Windows 10, my GSM modem (Huawei E272) not detected by system. Try this steps to solved the problem :

  1. Uninstall your existing Mobile Partner application.
  2. Download Mobile Partner (for Mac10.9&win8.1) from Huawei website (bit.ly/1jjasQF).
  3. Install that.
  4. Download DataCard Client Software to upgrade your GSM modem (bit.ly/1P8rO0M).
  5. Run that.
  6. Finish.
June 11th, 2015 by Gia
[[email protected] ~]$ zmcontrol -v
Release 8.6.0_GA_1153.RHEL7_64_20141215151110 RHEL7_64 FOSS edition, Patch 8.6.0_P2.
[[email protected] ~]$ /opt/zimbra/bin/zmcertmgr createcsr comm -new -keysize 2048 -subject "/C=ID/ST=Jabar/L=Bandung/O=rgiapratama/OU=IT/CN=mail.rgiapratama.net" -subjectAltNames "mail.rgiapratama.net"
[[email protected] ~]$ vi /opt/zimbra/ssl/zimbra/commercial/commercial.csr

Submit commercial.csr to Comodo, after approval process you’ll get email from Comodo with your EssentialSSL Certificate in zip file. After download, upload zip file to your mailserver and extract it.

[[email protected] ~]$ unzip mail_rgiapratama_net.zip
[[email protected] ~]$ cat AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ca_chain.crt
[[email protected] ~]$ /opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key mail_rgiapratama_net.crt ca_chain.crt
** Verifying /opt/zimbra/mail_rgiapratama_net.crt against /opt/zimbra/ssl/zimbra/commercial/commercial.key
Certificate (/opt/zimbra/mail_rgiapratama_net.crt) and private key (/opt/zimbra/ssl/zimbra/commercial/commercial.key) match.
Valid Certificate: /opt/zimbra/mail_rgiapratama_net.crt: OK
[[email protected] ~]$ /opt/zimbra/bin/zmcertmgr deploycrt comm mail_rgiapratama_net.crt ca_chain.crt
[[email protected] ~]$ /opt/zimbra/bin/zmcertmgr viewdeployedcrt
[[email protected] ~]$ service zimbra stop
[[email protected] ~]$ /opt/zimbra/bin/zmcertmgr addcacert /opt/zimbra/ssl/zimbra/commercial/commercial.crt
[[email protected] ~]$ service zimbra start
Posted in Zimbra | No Comments »
September 10th, 2014 by Gia
[[email protected] /]# vi /etc/selinux/config  ## disable selinux
[[email protected] /]# reboot
[[email protected] /]# yum remove postfix
[[email protected] /]# yum -y update
[[email protected] /]# yum -y install wget perl nmap-ncat libaio unzip perl-core sysstat net-tools
[[email protected] /]# wget http://files2.zimbra.com/downloads/8.5.0_GA/zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz
[[email protected] /]# wget http://files2.zimbra.com/downloads/8.5.0_GA/zcs-patch-8.5.0_GA_3043.tgz

[[email protected] /]# vi /etc/hosts     ## add this line -> 127.0.0.1 mail.rgiapratama.net mail

[[email protected] /]# tar -zxvf zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz 
[[email protected] /]# cd zcs-8.5.0_GA_3042.RHEL7_64.20140828204420
[[email protected] /]# ./install.sh
[[email protected] /]# cd ..

[[email protected] /]# tar -zxvf zcs-patch-8.5.0_GA_3043.tgz
[[email protected] /]# cd zcs-patch-8.5.0_GA_3043
[[email protected] /]# ./installPatch.sh
January 6th, 2014 by Gia
[email protected]:~# apt-get update
[email protected]:~# apt-get install git-core curl build-essential openssl libssl-dev
[email protected]:~# apt-get install daemon
[email protected]:/var/tmp# cd /var/tmp
[email protected]:/var/tmp# git clone https://github.com/joyent/node.git
[email protected]:/var/tmp/node# cd node
[email protected]:/var/tmp/node# git tag (to show all version of node)
[email protected]:/var/tmp/node# git checkout v0.10.15
[email protected]:/var/tmp/node# ./configure
[email protected]:/var/tmp/node# make
[email protected]:/var/tmp/node# make install
[email protected]:/var/tmp/node# node -v
[email protected]:/var/tmp/node# cd ..
[email protected]:/var/tmp# curl https://npmjs.org/install.sh | sudo sh
[email protected]:/var/tmp# npm -v
[email protected]:/var/tmp# npm install -g jsbin
[email protected]:/var/tmp# vi /usr/local/lib/node_modules/jsbin/config.default.json (change url:host value from localhost to IP public address)
[email protected]:/var/tmp# daemon /usr/local/bin/jsbin
November 27th, 2013 by Gia
  • Access your Openfire server (ex. http://54.254.190.215:9090/)
  • Click Continue
    Openfire - 01
  • Input a domain or IP AddressOpenfire - 02
  • Click ContinueOpenfire - 03
  • Input a Database settings
    Openfire - 04
  • Click ContinueOpenfire - 05
  • Input Administrator account email and password
    Openfire - 06
  • Setup Complete !
    Openfire - 07
  • Login to Administration Console (Access your domain/IP Address using port 9090 in your browser)Openfire - 08
  • Administration Console
    Openfire - 09
Posted in centOS, Linux | No Comments »