Home >Backend Development >PHP Tutorial >SYBASE ASE FOR LINUX installation and perl connection SYBASE_PHP tutorial

SYBASE ASE FOR LINUX installation and perl connection SYBASE_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:11:46784browse

Install Sybase ASE
sybase-common-11.9.2-1.i386.rpm
sybase-ase-11.9.2-1.i386.rpm
Install Sybase OpenClient
sybase-openclient-11.1. 1-1.i386.rpm
Source:
http://www.sybase.com/products/databaseservers/linux/thankyou1192.html
Method:
rpm -hiv sybase-common-11.9 .2-1.i386.rpm
rpm -hiv sybase-ase-11.9.2-1.i386.rpm
rpm -hiv sybase-openclient-11.1.1-1.i386.rpm
its The default installation path is /opt/sybase-11.9.2. If you need to redirect the path to /home/sybase:
rpm --relocate "/opt/sybase-11.9.2"="/home/sybase" -hiv .. .
Run
$HOME/install/sybinstall.sh
$HOME/.profile
The installation program is $HOME/bin/srvbuild, which needs to be run under Xwindows and is included in .profile .
After installation, environment variables need to be set
SYBASE=/home/sybase
DSQUERY=sybase(servername)
Install PERL DBI
1 Required package
DBI-1 .xx.tar.gz
DBD-Sybase-0.xx.tar.gz
Source:
http://www.perl.com/CPAN-local/authors/Michael_Peppler/
http ://www.perl.com/CPAN-local/modules/by-module/DBI/TIMB/
2 Installation method
gunzip DBI-1.xx.tar.gz
tar xvf DBI-1 .xx.tar
perl Makefile.PL
make
make test
make install
gunzip DBD-Sybase-0.xx.tar.gz
tar xvf DBD-Sybase-0 .xx.tar
perl Makefile.PL
make
make test
make install
3 Basic programming example:
#!/usr/bin/perl
use DBI;
my $server = "sybase";
my $dbh = DBI->connect('dbi:Sybase:','sa','',{syb_dbd_server=>$server});
my $sth = $dbh->prepare("sp_help");
$sth->execute();
my $text;
while(($text) = $sth-> ;fetchrow)
{
 print $text." ";
}
exit(0);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629553.htmlTechArticleInstall Sybase ASE sybase-common-11.9.2-1.i386.rpm sybase-ase-11.9.2- 1.i386.rpm Install Sybase OpenClient sybase-openclient-11.1.1-1.i386.rpm Source: http://www.sybase.com/products/data...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn