DB2 学习--(1)--安装教程
db2 linux 安装部署
1 解压文件
tar -zxvf db2_v101_linuxx64_expc.tar.gz
2 切换路径
cd expc/
3 启动安装程序
./db2_install
然后它会询问用户是否将软件安装在 /opt/ibm/db2/V10.1 目录,选择 yes
4 创建用户名和用户组
groupadd db2iadm1
groupadd db2fadm1
useradd -m -g db2iadm1 db2inst1
useradd -m -g db2fadm1 db2fenc1
5 修改用户密码
passwd db2inst1
passwd db2fenc1
6 安装 license (产品许可)
cd /opt/ibm/db2/V10./adm/
chmod -R *
# 后面的路径为 db2 安装时的解压目录
./db2licm -a /root/software/expc/db2/license/db2expc_uw.lic
成功后,会显示如下信息
LIC1402I License added successfully. LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V10.1/license/en_US.iso88591"
6 创建数据库实例
cd /opt/ibm/db2/V10./instance/
chmod -R *
./db2icrt -p -u db2fenc1 db2inst1
执行成功后,会显示如下信息
The execution completed successfully. For more information see the DB2 installation log at "/tmp/db2icrt.log.82277".
DBI1070I Program db2icrt completed successfully.
7 创建样本数据库
su - db2inst1
db2sampl
成功后,屏幕输出如下信息
Creating database "SAMPLE"... Connecting to database "SAMPLE"...
Creating tables and data in schema "DB2INST1"...
Creating tables with XML columns and XML data in schema "DB2INST1"... 'db2sampl' processing complete.
继续执行命令
db2start
db2 connect to sample
db2 "select * from staff"
屏幕输出如下信息,证明安装成功
ID NAME DEPT JOB YEARS SALARY COMM
------ --------- ------ ----- ------ --------- ---------
Sanders Mgr 98357.50 -
Pernal Sales 78171.25 612.45
Marenghi Mgr 77506.75 -
O'Brien 38 Sales 6 78006.00 846.55
Hanes Mgr 80659.80 -
Quigley Sales - 66808.30 650.25
Rothman Sales 76502.83 1152.00
James Clerk - 43504.60 128.20
Koonitz Sales 38001.75 1386.70
Plotz Mgr 78352.80 -
Ngan Clerk 42508.20 206.60
Naughton Clerk - 42954.75 180.00
Yamaguchi Clerk 40505.90 75.60
Fraye Mgr 91150.00 -
Williams Sales 79456.50 637.65
Molinare Mgr 82959.20 -
Kermisch Clerk 42258.50 110.10
Abrahams Clerk 37009.75 236.50
Sneider Clerk 34252.75 126.50
Scoutten Clerk - 41508.60 84.20
Lu Mgr 90010.00 -
Smith Sales 87654.50 992.80
Lundquist Clerk 83369.80 189.65
Daniels Mgr 79260.25 -
Wheeler Clerk 74460.00 513.30
Jones Mgr 81234.00 -
Lea Mgr 88555.50 -
Wilson Sales 78674.50 811.50
Quill Mgr 89818.00 -
Davis Sales 65454.50 806.10
Graham Sales 71000.00 200.30
Gonzales Sales 76858.20 844.00
Burke Clerk 49988.00 55.50
Edwards Sales 67844.00 1285.00
Gafney Clerk 43030.50 188.00 record(s) selected.
参考博客:
https://my.oschina.net/cwdong8/blog/132953
DB2 学习--(1)--安装教程的更多相关文章
- python初学者学习工具安装教程&安装步骤详解
一.python安装: 版本:3.6.8 下载地址:https://www.python.org/downloads/ 安装步骤截图: 1.点击python安装包,出现下图所示界面,注意勾选A ...
- Linux下DB2数据库安装教程
最近因为工作需要在学习DB2数据库,本教程讲解DB2数据库在inux下的安装步骤. 安装前请查看 DB2版本和许可证 说明来增加了解,先弄明白改安装什么版本,这里我用的是最新的Express-C版本, ...
- TensorFlow 中文资源全集,官方网站,安装教程,入门教程,实战项目,学习路径。
Awesome-TensorFlow-Chinese TensorFlow 中文资源全集,学习路径推荐: 官方网站,初步了解. 安装教程,安装之后跑起来. 入门教程,简单的模型学习和运行. 实战项目, ...
- gcc安装教程(学习Linux编程只需安装cygwin)
gcc安装教程(windows版本) —最好的C/C++编译器,没有之一 windows下的gcc有两个版本mingw和cygwin,二选一就好 已学会C++,做工程,建议用mingw 用cygwin ...
- TensorFlow 中文资源精选,官方网站,安装教程,入门教程,实战项目,学习路径。
Awesome-TensorFlow-Chinese TensorFlow 中文资源全集,学习路径推荐: 官方网站,初步了解. 安装教程,安装之后跑起来. 入门教程,简单的模型学习和运行. 实战项目, ...
- 学习笔记69—金蝶财务软件安装教程(KIS12.3,win10)
****************************************************** 如有谬误,请联系指正.转载请注明出处. 联系方式: e-mail: heyi9069@gm ...
- Hadoop学习---Ubuntu中hadoop完全分布式安装教程
软件版本 Hadoop版本号:hadoop-2.6.0-cdh5.7.0: VMWare版本号:VMware 9或10 Linux系统:CentOS 6.4-6.5 或Ubuntu版本号:ubuntu ...
- 深度学习工具LabelXml安装教程
LabelXml安装教程 1,下载LabelXml工具 前往github上下载labelxml,官网地址如下:https://github.com/tzutalin/labelImg 下载打包源码为z ...
- DB2 数据库的安装配置及监控
一.DB2简介 IBM公司研制的一种关系型数据库系统.DB2主要应用于大型应用系统,具有较好的可伸缩性,可支持从大型机到单用户环境,应用于OS/2.Windows等平台下. DB2提供了高层次的数据利 ...
随机推荐
- CenterOS下搭建Hadoop环境
检查防火墙状态 service iptables status 关闭防火墙 service iptables stop 查看防火墙开机启动状态 chkconfig iptables --list 关闭 ...
- 清除inline-block元素默认间距
1. font-size:0; 2.letter-spaceing:-0.5em;
- The server must be started under an unprivileged user ID to prevent
mysql8 PostgreSQL [root@test local]# postgres -D /usr/local/pgsql/data"root" execution of ...
- 理解 React,但不理解 Redux,该如何通俗易懂的理解 Redux?
作者:Wang Namelos链接:https://www.zhihu.com/question/41312576/answer/90782136来源:知乎著作权归作者所有.商业转载请联系作者获得授权 ...
- [Usaco2005 Dec]Cleaning Shifts 清理牛棚
题目描述 Farmer John's cows, pampered since birth, have reached new heights of fastidiousness. They now ...
- Jquery AJAX如何使用Promise/Deferred实现顺序执行?
有的时候有我有N个AJAX请求,第下个请求可能要依赖上个请求的返回值, 可以用 $.ajax("test1.php").then(function(data) { // data ...
- UOJ Easy Round#7
UOJ Easy Round#7 传送门:http://uoj.ac/contest/35 题解:http://matthew99.blog.uoj.ac/blog/2085 #1 题意: 在一个(2 ...
- IOS开发学习笔记(2)-----UIButton 详解
1. [代码][C/C++]代码 //这里创建一个圆角矩形的按钮 UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRou ...
- 英语发音规则---s发/s/的读音规则
英语发音规则---s发/s/的读音规则 一.总结 一句话总结:字母s的读音有/s/./z/./ʃ/./{/这几种,下面主要讲讲发/s/音的几条规则. 字母s的读音有/s/./z/./ʃ/./{/这几种 ...
- compileSdkVersion, minSdkVersion 和 targetSdkVersion详解
API level API level是一个整数,它指的是我们使用的框架(Framework)的版本,也就是我们使用的sdk中的各个平台下的android.jar. 但是这个API level又和An ...