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 »
November 14th, 2013 by Gia
*Disabled SELinux
[root@FMIVPLOPNFR01 ~]# vi /etc/selinux/config
change SELINUX=enforcing to SELINUX=disabled
[root@FMIVPLOPNFR01 ~]# reboot (to affect SElinux config)

*Download and install Openfire
[root@FMIVPLOPNFR01 ~]# yum -y install wget mysql-server glibc.i686
[root@FMIVPLOPNFR01 ~]# wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-3.8.2
2-1.i386.rpm
[root@FMIVPLOPNFR01 ~]# rpm -ivh openfire-3.8.2-1.i386.rpm
Preparing...                ########################################### [100%]
   1:openfire               ########################################### [100%]
[root@FMIVPLOPNFR01 ~]# service openfire start
Starting openfire:
[root@FMIVPLOPNFR01 bin]# service openfire status
openfire is running
[root@FMIVPLOPNFR01 bin]# chkconfig --level 2345 openfire on

*Disabled firewall for temporary :
[root@FMIVPLOPNFR01 ~]# service iptables stop
iptables: Flushing firewall rules: [  OK  ]
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Unloading modules: [  OK  ]
[root@FMIVPLOPNFR01 ~]# chkconfig --level 2345 iptables off

*Setup MySQL
[root@FMIVPLOPNFR01 ~]# service mysqld start
[root@FMIVPLOPNFR01 ~]# mysql_secure_installation
[root@FMIVPLOPNFR01 ~]# mysqladmin -uroot -p
mysql> create database openfire;
Query OK, 1 row affected (0.06 sec)
mysql> grant all privileges on openfire.* to 'openfire'@'localhost' identified by 'openfirepassword';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> quit
Bye
[root@FMIVPLOPNFR01 ~]# chkconfig --level 2345 mysqld on

If get error like this (or Openfire can’t start) :

[root@FMIVPLOPNFR01 bin]# ./openfire.sh
./openfire.sh: /opt/openfire/jre/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
./openfire.sh: line 165: /opt/openfire/jre/bin/java: Success

Install a glibc.i686 using YUM

[root@FMIVPLOPNFR01 ~]# yum -y install glibc.i686
September 15th, 2013 by Gia

Environment :
– CentOS 6.4 (64bit)
– FreeSWITCH 1.5.6b git fb238ed 2013-09-13 15:44:10Z
– FusionPBX 3.3

This error will shown if you using https to access FusionPBX

Freeswitch log :

2013-09-14 22:11:43.120093 [ERR] mod_xml_cdr.c:365 Got error [404] posting to web server [http://127.0.0.1/app/xml_cdr/v_xml_cdr_import.php]
2013-09-14 22:11:43.120093 [ERR] mod_xml_cdr.c:372 Retry will be with url [http://127.0.0.1/app/xml_cdr/v_xml_cdr_import.php]
2013-09-14 22:11:43.120093 [ERR] mod_xml_cdr.c:383 Unable to post to web server, writing to file

Fix it :D

vi /usr/local/freeswitch/conf/autoload_configs/xml_cdr.conf.xml

Change http with https (in url parameter) :

FusionPBX CDR

Don’t forget to reloadxml in fs_cli :D

September 5th, 2013 by Gia

Query to generate CSV file :

mysql> SELECT * FROM tablename
INTO OUTFILE '/tmp/csvfile.csv'
FIELDS terminated by ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

Error when user don’t have privilege to create file :

mysql>SELECT * FROM tablename
INTO OUTFILE '/tmp/csvfile.csv'
FIELDS terminated by ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
ERROR 1045 (28000): Access denied for user 'demo'@'localhost' (using password: YES)

Add grant to create file (execute using root user or user with grant option) :

mysql> GRANT FILE ON *.* TO 'demo'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql>FLUSH PRIVILEGES;

** GRANT FILE only works with ON *.*

If you want delete, remove or revoke GRANT file :

mysql> REVOKE FILE on *.* FROM 'demo'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql>FLUSH PRIVILEGES;
Tags: ,
Posted in Database, MySQL | No Comments »
May 27th, 2013 by Gia

RB951G-2HND + Huawei E272Environment :

  • RB951G-2HnD
  • RouterOS v6.0
  • Huawei E272

Installation step :

  1. Plug a modem to USB Port
  2. Check a modem in Resources – USB menu from Winbox
    MKT-Huawei02 Read the rest of this entry »