安装环境及版本
Redhat Enterprise Linux 6.4 64位
Vmware Workstation 10
ase15.7 64位
查看redhat版本及位数等信息命令:
uname -a
安装包下载:
http://pan.baidu.com/s/1bnpTEkn
下载得到:ase157_linuxx86-64.tgz
安装步骤
1、使用root创建用户、用户组、安装目录
# groupadd sybase
# useradd -g sybase sybase
# passwd sybase
# mkdir /opt/sybase
# chown -R sybase:sybase /opt/sybase
# chmod -R 755 /opt/sybase
2、以sybase用户登录,将ase157_linuxx86-64.tgz上传到/home/sybase目录下
3、安装数据库
1)解压
tar -zxvf ase157_linuxx86-64.tgz
2)执行安装启动文件
# ./setup.bin
3)、安装步骤参考sybase客户端安装,文档很详细,只是安装服务装有一点点不同,一会讲清楚
文档链接:http://pan.baidu.com/s/1kTKf9EB
在文档的第7节,不要输入3,输入1,选择典型,然后跳过第8步,直接到第9步,后面都 一样了,OK。
在配置服务器时只选择第一个就可以:
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
: 2
[X] 1 - Configure new Adaptive Server
[ ] 2 - Configure new Backup Server
[ ] 3 - Configure new XP Server
[ ] 4 - Configure new Job Scheduler
[ ] 5 - Enable Self Management
[ ] 6 - Configure Sybase Control Center
To select an item enter its number, or 0 when you are finished: (DEFAULT: 0)
其它选项参考:字符集设置utf-8,sort order选binary,基本上是一路回车,默认配置就行。
4)、启动、检查、完毕
根据文档中步骤,我也遇到了如下错误,解决访求也贴出来了:
如果执行bcp命令或者isql命令报如下错,说明系统缺少依赖包,需要安装包,glibc.i686
错误信息:
-bash: /opt/sybase/OCS-15_0/bin/bcp:/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
解决方法(用root执行):
sudo yum install glibc.i686最后检查:
执行bcp命令:
# bcp
usage: bcp [[db_name.]owner.]table_name[:slice_num] [partition pname] {in | out} [filename]
[-m maxerrors] [-f formatfile] [-e errfile] [-d discardfileprefix]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-a display_charset] [-z language] [-v]
[-i input_file] [-o output_file]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N] [-W] [-X]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal] [-C]
[-V [security_options]] [-Z security_mechanism] [-Q] [-Y]
[-y sybase directory] [-x trusted.txt_file]
[--clienterr errfile] [--maxconn maximum_connections]
[--show-fi] [--hide-vcc]
[--colpasswd [[[db_name.[owner].]table_name.]column_name [password]]]
[--keypasswd [[db_name.[owner].]key_name [password]]]
[--initstring ASE initialization string] [--quoted-fname]
# cd $SYBASE/$SYBASE_ASE
# cd install/
# startserver
如果startserver报错:Cannot execute file RUN_SYBASE,找另外一个命令,在install目录下,我的机器有一个RUN_RHEL6SERVER(根据自己的机器名不同,文件名则不同,请注意查看),直接执行这个文件:
# ./RUN_RHEL6SERVER
启动ASE server;
然后,使用sa用户登录
# isql -Usa -P -S RHEL6SERVER
登录成功后,执行语句查询当前的数据库版本:
# isql -Usa -P -S RHEL6SERVER
Msg 2401, Level 11, State 2:
Server 'SYBASE':
Character set conversion is not available between client character set 'utf8'
and server character set 'iso_1'.
No conversions will be done.
1> select @@version
2> go