2014年12月11日星期四

Linux下执行脚本导出mysql表数据

mysql -uroot -ppassword asteriskcdrdb -e "select * from cdr" > b.txt
连接上mysql,使用root,password登录 asteriskcdrdb数据库,
执行select *from cdr并将数据内容输出至b.txt

2014年2月8日星期六

ubuntu 13.04 linphone enable g729

My HP 8540W installed Ubuntu 13.04, I want to install voip softphone, the first choice is Ekiga. After installed Ekiga, There was not G729 codec, so I give up.
The second choice is linphone,  serach in google, somebody saies install the linphone use ppa,  g729 can use.
Now, this is the step by step
1.add linphone source
sudo add-apt-repository ppa:linphone/release
2.updae the source
sudo apt-get update
3.install linphone
sudo apt-get install linphone
4.config the linphone
Open the Option menu -  preferences -  codecs, G729 was not in the codecs list,  but AMR in the list.
5.find out the difference between G729 and AMR
dpkg -L linphone-plugin-amr
the libmsamr.so model in this directory /usr/lib/mediastreamer/plugins
dpkg -L linphone-plugin-g729
the libmsbcg729.so model in this directory /usr/lib/x86_64-linux-gnu/mediastreamer/plugins/

6.copy the model to /usr/lib/mediastreamer/plugins
sudo cp -d /usr/lib/x86_64-linux-gnu/mediastreamer/plugins/libmsbcg729.*  usr/lib/mediastreamer/plugins

that's right! Now G729 in the codecs list, enjoy it


2014年1月24日星期五

eclipse sqlexplorer 配置

Install eclipas
HowTO
http://tutorialforlinux.com/2013/09/27/how-to-install-eclipse-ide-for-java-developers-ubuntu-13-04-raring13-10-saucy/
download eclipse from this sit
http://www.eclipse.org/downloads/

extract eclips package
sudo mv eclipse /opt
ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

Install JDK
HowTo
http://tutorialforlinux.com/2013/10/23/how-to-install-oracle-java-jdk7-on-ubuntu-13-10-saucy-i386amd64-easy-visual-guide/
download Oracle jave JDK from this site
http://www.oracle.com/technetwork/java/javase/downloads/index.html

extract JDK package

relocate JDK7
sudo su
if [ ! -d '/usr/lib/jvm' ]; then mkdir /usr/lib/jvm; fi
mv /tmp/jdk1.7* /usr/lib/jvm/

update system java to oracle JDK
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7*/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7*/bin/javac 1065
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.7*/bin/jar 1065
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7*/bin/javaws 1065
update-alternatives --config java

install Eclipse SQL Explorer
run eclipse, help-install new software
add Eclipse SQL Explorer site http://eclipsesql.sourceforge.net/

1:Microsoft SQL Server
http://www.microsoft.com/en-us/download/details.aspx?id=11774
sqljdbc_4.0.2206.100_enu.tar.gz
download sqljdbc_4.0.2206.100_enu.tar.gz

eclipse config
window-preferences-sql explorer-jdbc drivers-Microsoft MSSQL Server JDBC Driver

Edit - Extra Class Path
Add sqljdbc4.jar(atfer extract the tar.gz file)

Driver Class Name:
com.microsoft.sqlserver.jdbc.SQLServerDriver

Example URL:
jdbc:sqlserver://<server_name>:<1433>;databaseName=databasename
jdbc:sqlserver://192.168.2.73:1433;databaseName=dlt
---------------------------------------------------------------------------------------------------------------------

2:Oracle Thin Driver
download oracle thin client driver
eclipse config
window-preferences-sql explorer-jdbc drivers-Oracle Thin Driver


Edit - Extra Class Path
Add ojdbc14.jar.jar(atfer extract the file)

Driver class Name:
oracle.jdbc.driver.OracleDriver
Example URL:
jdbc:oracle:thin:@<server>:1521:<database_name>
jdbc:oracle:thin:@192.168.2.31:1521:erpg
---------------------------------------------------------------------------------------------------------------------

3:My Sql
dev.mysql.com/downloads/connector/j/
download mysql-connector-java-5.1.28.tar.gz

Edit - Extra Class Path
Add mysql-connector-java-5.1.28.jar(atfer extract the file)

Driver class Name:
com.mysql.jdbc.Driver

Example URL: 
jdbc:mysql://<hostname>[<:3306>]/<dbname>
jdbc:mysql://192.168.2.45:3306/test

 


















2014年1月23日星期四

ubuntu安装qq international

ubuntu版本:13.10
安装playonlinux
1:install a non-listed program
2: install a program in a new virtual drive
3:wine版本1.7.4
4:安装的库文件riched20 msxml6 ie8 vcrun2008

5:qq版本qq intl 2.1
6:重要一点,将windows目录内tahoma字体复制到windows,font目录
安装完毕后即可正常使用,不过密码只能用软键盘输入