神舟通用数据库安装(交互方式)
环境:
OS:Centos 7
DB:V7
1.介质下载地址
http://www.shentongdata.com/old_bak/iso/wzsyx/ShenTong7.0_linux64.rar
2.安装rar
[root@localhost soft]# tar -xvf rarlinux-x64-5.3.0.tar.gz
[root@localhost soft]# cd rar
[root@localhost rar]# make install
3.解压数据库安装包
[root@localhost soft]#rar x ShenTong7.0_linux64.rar
[root@localhost soft]#cd ShenTong7.0_linux64/
[root@localhost ShenTong7.0_linux64]# chmod 755 setup
[root@localhost ShenTong7.0_linux64]# ./setup -console
[root@localhost ShenTong7.0_linux64]# ./setup -console
Command line arguments: -console
Select your language
0 [x] chn
1 [ ] eng
Input selection:
1
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Target Path
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Select the installation path: [/opt/ShenTong]
The target directory will be created:
/opt/ShenTong
----------------------------------------------------
Enter O for OK, C to Cancel:
o
----
full
----
Enter Y for Yes, N for No:
You can choose whether to set the agent password or not
0 [x] No password require(use default password)
1 [ ] Please input a password
Input selection:
0
You can choose whether to register ha service or not
0 [x] no
1 [ ] yes
Input selection:
0
choose jre version
0 [x] jre1.8
1 [ ] jre1.6
Input selection:
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Setup Shortcuts
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
----------------------------------
Create shortcuts in the Start-Menu
----------------------------------
Enter Y for Yes, N for No:
----------------------------------
Create shortcuts in the Start-Menu
----------------------------------
Enter Y for Yes, N for No:
n
------------------------------------------
Create additional shortcuts on the desktop
------------------------------------------
Enter Y for Yes, N for No:
n
------------------------------
create shortcut for: all users
------------------------------
Enter Y for Yes, N for No:
n
whether create db
0 [x] no
1 [ ] yes
Input selection:
1
DB Name: []
HXL ##必须大写,小写好像不管用,数据库无法启动
DB Encoding: []
utf8
DB Others: []
Installation was successful
Application installed on /opt/ShenTong
[ Writing the uninstaller data ... ]
[ Console installation done ]
这种方式安装的,是区分大小写的
SQL> show NAME_CASE_SENSITIVE;
name | setting
---------------------+---------
NAME_CASE_SENSITIVE | TRUE
(1 row)
到这里数据库已经自动启动了的
[root@localhost opt]# ss -nlp|grep 2003
u_str LISTEN 0 4096 /tmp/.s.oscar.2003 82276 * 0 users:(("oscar",pid=15278,fd=14))
tcp LISTEN 0 4096 *:2003 *:* users:(("oscar",pid=15278,fd=13))
[root@localhost opt]#
[root@localhost opt]# ps -ef|grep oscar
root 12392 1 0 13:45 pts/2 00:00:00 /opt/ShenTong/bin/oscaragent -e /opt/ShenTong
root 15278 1 0 14:57 pts/0 00:00:01 /opt/ShenTong/bin/oscar -o normal -d HXL
root 15440 3096 0 15:00 pts/2 00:00:00 grep --color=auto oscar
若是oscaragent没有启动的话,可以使人如下方式进行手工启动
/etc/init.d/oscaragentd start
4.停掉数据库设置大小写不敏感
/etc/init.d/oscardb_HXLd stop
vi /opt/ShenTong/admin/HXL.conf
加入如下项目:
name_case_sensitive=false
5.启动数据库
/etc/init.d/oscardb_HXLd start
或是使用如下方式启停
systemctl start oscardb_HXLd.service
systemctl stop oscardb_HXLd.service
systemctl status oscardb_HXLd.service
6.登录数据库
./isql -h localhost -p 2003 -d HXL sysdba
密码是:szoscar55
7.彻底删除数据库
##停掉数据库
systemctl stop oscardb_HXLd.service
/etc/init.d/oscaragentd stop
##删除相关系统服务
[root@localhost system]#cd /usr/lib/systemd/system/
[root@localhost system]# rm -rf oscar*
[root@localhost system]# cd /etc/systemd/system/graphical.target.wants/
[root@localhost graphical.target.wants]# rm -rf oscar*
[root@localhost graphical.target.wants]# cd /etc/init.d/
[root@localhost init.d]# ls
functions netconsole network oscaragentd oscardb_HXLd README
[root@localhost init.d]# rm -rf oscar*
删除数据库目录
[root@localhost opt]# cd /opt
[root@localhost opt]# rm -rf ShenTong/
###############################大小写参数修改#################
1.查看大小写敏感参数
SQL> show NAME_CASE_SENSITIVE;
name | setting
---------------------+---------
NAME_CASE_SENSITIVE | TRUE
(1 row)
2.修改配置参数(没有就新增)
vi /opt/ShenTong/admin/HXL.conf
#SQL中表名和列名是否区分大小写,为FALSE时SQL里小写也可以匹配上数据库里大写的表名列名
NAME_CASE_SENSITIVE=false
3.重启
/etc/init.d/oscardb_HXLd stop
/etc/init.d/oscardb_HXLd start
再次查看参数
[root@localhost bin]# ./isql -h localhost -p 2003 -d HXL sysdba
密码是:szoscar55
SQL> show NAME_CASE_SENSITIVE;
name | setting
---------------------+---------
NAME_CASE_SENSITIVE | FALSE
(1 row)
SQL>