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
[zimbra@mail ~]$ zmcontrol -v
Release 8.6.0_GA_1153.RHEL7_64_20141215151110 RHEL7_64 FOSS edition, Patch 8.6.0_P2.
[zimbra@mail ~]$ /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"
[zimbra@mail ~]$ 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.

[zimbra@mail ~]$ unzip mail_rgiapratama_net.zip
[zimbra@mail ~]$ cat AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > ca_chain.crt
[zimbra@mail ~]$ /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
[zimbra@mail ~]$ /opt/zimbra/bin/zmcertmgr deploycrt comm mail_rgiapratama_net.crt ca_chain.crt
[zimbra@mail ~]$ /opt/zimbra/bin/zmcertmgr viewdeployedcrt
[zimbra@mail ~]$ service zimbra stop
[zimbra@mail ~]$ /opt/zimbra/bin/zmcertmgr addcacert /opt/zimbra/ssl/zimbra/commercial/commercial.crt
[zimbra@mail ~]$ service zimbra start
Posted in Zimbra | No Comments »
September 10th, 2014 by Gia
[root@mail /]# vi /etc/selinux/config  ## disable selinux
[root@mail /]# reboot
[root@mail /]# yum remove postfix
[root@mail /]# yum -y update
[root@mail /]# yum -y install wget perl nmap-ncat libaio unzip perl-core sysstat net-tools
[root@mail /]# wget http://files2.zimbra.com/downloads/8.5.0_GA/zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz
[root@mail /]# wget http://files2.zimbra.com/downloads/8.5.0_GA/zcs-patch-8.5.0_GA_3043.tgz

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

[root@mail /]# tar -zxvf zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz 
[root@mail /]# cd zcs-8.5.0_GA_3042.RHEL7_64.20140828204420
[root@mail /]# ./install.sh
[root@mail /]# cd ..

[root@mail /]# tar -zxvf zcs-patch-8.5.0_GA_3043.tgz
[root@mail /]# cd zcs-patch-8.5.0_GA_3043
[root@mail /]# ./installPatch.sh
January 6th, 2014 by Gia
root@jsbin:~# apt-get update
root@jsbin:~# apt-get install git-core curl build-essential openssl libssl-dev
root@jsbin:~# apt-get install daemon
root@jsbin:/var/tmp# cd /var/tmp
root@jsbin:/var/tmp# git clone https://github.com/joyent/node.git
root@jsbin:/var/tmp/node# cd node
root@jsbin:/var/tmp/node# git tag (to show all version of node)
root@jsbin:/var/tmp/node# git checkout v0.10.15
root@jsbin:/var/tmp/node# ./configure
root@jsbin:/var/tmp/node# make
root@jsbin:/var/tmp/node# make install
root@jsbin:/var/tmp/node# node -v
root@jsbin:/var/tmp/node# cd ..
root@jsbin:/var/tmp# curl https://npmjs.org/install.sh | sudo sh
root@jsbin:/var/tmp# npm -v
root@jsbin:/var/tmp# npm install -g jsbin
root@jsbin:/var/tmp# vi /usr/local/lib/node_modules/jsbin/config.default.json (change url:host value from localhost to IP public address)
root@jsbin:/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 »