`
like.eagle
  • 浏览: 249608 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Drizzle安装

阅读更多

(一)安装drizzle所需的环境:

 

#CentOS-5.2-x86_64-bin-DVD.iso

由于官方推荐drizzle安装在64位操作系统上,所以需要先在宿主机中创建新的虚拟机并且安装64位centos操作系统。

 

(二)drizzle安装

 

http://docs.drizzle.org/installing/redhat.html

方法一:取sourc直接编译安装
#http://docs.drizzle.org/installing/from_source.html#compile-source
./config/autorun.sh   #取个最新版本的Source,然后解压缩,里面应该有autorun.sh文件的。
./configure
make
make install

方法二:利用官方提供的rpm包安装手顺安装(推荐)
#redhat和centos是一样的吧
http://docs.drizzle.org/installing/redhat.html
①Install EPEL Repository on 64-bit Linux 5.X:
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
#远程安装不行的话,可以先下载下来在安装\(^o^)/~

 


②To add the Drizzle repository to your system you also need to create a /etc/yum.repos.d/drizzle.repo file with the following content:

RedHat→ 
[drizzle]
name=drizzle
baseurl=http://rpm.drizzle.org/7-dev/redhat/$releasever/$basearch/
enabled=1
gpgcheck=0

[drizzle-src]
name=drizzle-src
baseurl=http://rpm.drizzle.org/7-dev/redhat/$releasever/source
enabled=1
gpgcheck=0
 $releasever uses RHEL 5 or RHEL 6, and $basearch is the architecture (i386 or x86_64).

因此对于本系统来说,上述/etc/yum.repos.d/drizzle.repo的内容应该是:
 
[drizzle]
name=drizzle
baseurl=http://rpm.drizzle.org/7-dev/redhat/5/x86_64/
enabled=1
gpgcheck=0

[drizzle-src]
name=drizzle-src
baseurl=http://rpm.drizzle.org/7-dev/redhat/5/source
enabled=1
gpgcheck=0
 
③You can then install Drizzle by running the following command:
sudo yum install drizzle7-server drizzle7-client
或者
yum install drizzle7-server drizzle7-client

(三)服务器端和客户端启动

参考:
http://wiki.drizzle.org/Starting_drizzled#Starting_drizzled
http://www.lupaworld.com/article-133135-2.html

利用上述方法二安装好drizzle之后,请按照如下手顺启动drizzle服务:

安装完成后,就要为数据库服务器创建一个非特权组和用户,如下:
shell> groupadd drizzle  
shell> useradd -g drizzle drizzle 
另外还要创建一个目录以存放数据库文件,并给予适当的权限,如下:
shell> mkdir /usr/local/drizzle  
shell> mkdir /usr/local/drizzle/data  
shell> cd /usr/local/drizzle  
shell> chown -R drizzle .  
shell> chgrp -R drizzle . 
然后,用以下命令启动Drizzle服务器:
shell> /usr/sbin/drizzled --user=drizzle --basedir=/usr/local/drizzle/ --datadir=/usr/local/drizzle/data/ &  

出现错误如下:Plugin 'md5' init function returned error

解决办法:yum install libgcrypt-devel

然后继续启动:
[root@rdb6 include]# /usr/sbin/drizzled --user=drizzle --basedir=/usr/local/drizzle/ --datadir=/usr/local/drizzle/data/ &
[1] 19209
[root@rdb6 include]# InnoDB: Log scan progressed past the checkpoint lsn 48941
110407 11:36:08  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
110407 11:36:09  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
Listening on /tmp/mysql.socket

然后尝试打开客户端:
[root@rdb6 tmp]# /usr/bin/drizzle
Welcome to the Drizzle client..  Commands end with ; or \g.
Your Drizzle connection id is 2
Connection protocol: mysql
Server version: 2011.03.11 Source distribution (drizzle)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

drizzle>

连接成功了,说明启动成功。

Shutting down drizzle    
/usr/bin/drizzle --shutdown
Shutting down drizzle on certain port    
/usr/bin/drizzle --shutdown --port=<PORT_NUMBER>


 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics