2014년 11월 19일 수요일

oracle top query


select * from (select * from tb_mail_log order by senddate desc) where rownum <= 10

2014년 11월 13일 목요일

Realtime mapping for 'sipregs' found to engine 'odbc', but the engine is not available

localhost*CLI> module show like odbc

if not found

yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel

cd /usr/local/src/asterisk-xxxx
make clean && make distclean
./configure && make menuselect && make && make install
./configure --libdir=/usr/lib64 && make menuselect && make && make install

/etc/init.d/asterisk restart

2014년 11월 12일 수요일

nmap command

[root@localhost src]# nmap -sU -p 22222 127.0.0.1

Starting Nmap 5.51 ( http://nmap.org ) at 2014-11-12 20:39 KST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00015s latency).
PORT      STATE SERVICE
22222/udp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
[root@localhost src]# nmap -p 5060 127.0.0.1

Starting Nmap 5.51 ( http://nmap.org ) at 2014-11-12 20:40 KST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000062s latency).
PORT     STATE  SERVICE
5060/tcp closed sip

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds

install of rtpproxy

os : centos 6.5 ( 2.6.32-431.el6.x86_64 )
rtpproxy : 1.3-beta 1

cd /usr/local/src
tar -xzvf rtpproxy-1.3-beta.1.tar.gz
cd rtpproxy-1.3-beta.1
./configure
make all
make install

cp /usr/local/src/rtpproxy-1.3-beta.1/scripts/rtpproxy.init.debian /etc/init.d/rtpproxy
vi /etc/init.d/rtpproxy —-> edit
DAEMON=/usr/local/bin/rtpproxy

vi /etc/default/rtpproxy —> create
DAEMON_OPTS="-F -s udp:127.0.0.1:22222 -l 125.133.203.202/192.168.0.200 -d DBUG:LOG_LOCAL0 -u root"

chmod a+x /etc/init.d/rtpproxy
chmod -v 0755 /etc/init.d/rtpproxy
chkconfig rtpproxy on

/etc/init.d/rtpproxy start

2014년 11월 8일 토요일

김포의 5일장

김포장 : 2일·7일
마송장 : 3일·8일
양곡장 : 1일·6일
하성장 : 4일·9일

kamailio config for the 64 bit

kamailio version : 4.2.0
os version : CentOS 6.5 64bit ( 2.6.32-431.el6.x86_64 )

vi /usr/local/etc/kamailio/kamailio.cfg

# set paths to location of modules (to sources or installation folders)
#!ifdef WITH_SRCPATH
mpath="modules_k:modules"
#!else
mpath="/usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/"
#!endif

2014년 11월 7일 금요일

export and import for the mysql

mysqldump -u root -ppassword igen > /home/20141107_db_backup.sql
mysql -u root -ppassword igen < /home/20141107_db_backup.sql

## for remote
mysqldump -h192.168.0.100 -u root -ppassword igen > /home/20141107_db_backup.sql
mysql -h192.168.0.100 -u root -ppassword igen < /home/20141107_db_backup.sql

port permit access by the iptables

iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT
iptables -I OUTPUT 1 -p tcp --dport 3306 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
iptables -L -v

2014년 11월 6일 목요일

plantronics fw update site

http://www.plantronics.com/us/support/myheadset/updater/

basic config with CentOS7

[ network ]
ip addr show

vi /etc/sysconfig/network-scripts/ifcfg-enp5s0

ONBOOT=yes

shutdown -r now

yum install net-tools

ifconfig


[ mysql ]
yum install wget
cd /home
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-server

yum list \*mysql\* | grep dev
yum install mysql-community-devel.x86_64

mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("delphi1240") where user='root';
mysql> flush privileges;
mysql> quit

mysql_secure_installation