After being gone a while for the day job I have finally gotten around to setting up my storage file locations and permissions in Drizzle. Stuart Smith helped me get past some problems, mostly associated with not knowing basic syntax, but I also ran into one or two that are due to changes ongoing in Drizzle. After spending a lot of time not knowing what I didn’t know (one of the quirks of teaching yourself), a little chat finally straightened me out.
So after Drizzle is installed on Ubuntu you obviously have to have a place to store your data. To avoid all the time we spent figuring out what was going on, just pay attention to the last lines after you run your “make install” so you know where the damn thing is.
Run your sudo command then add your user group where drizzle is the name of the group you want to have access to the drizzle server:
$ sudo groupadd drizzle
then create a new user within that group, replacing USER with your user name.
$ sudo useradd -g drizzle USER
After running this procedure a couple times I found that on one install the directory was created for me, on another I had to create it. Either way, make sure you have a new directory for drizzle and then a data directory in that:
$ sudo mkdir /home/USER/drizzle
$ sudo mkdir /home/USER/drizzle/data
Now set up the permission on that directory for your user:
$ sudo chown -R drizzle:USER /home/drizzle/data
Finally start up the Drizzle Server with:
$ sudo -u USER /usr/local/sbin/drizzled --datadir=/home/USER/drizzle/data
You should get a bunch of lines of code saying the Drizzle server and InnoDB are now running and what ports it is listening too. Now you can start up the Drizzle Client:
sudo -u USER /usr/local/bin/drizzle
and you should see:
Welcome to the Drizzle client.. Commands end with ; or \g.
Your Drizzle connection id is 1
Server version: 2009.12.1251 Source distribution (drizzle)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
drizzle>
I found that if I installed this on a server that already had MySQL running on it, the start up command would return an error where the InnoDB (a storage engine drizzle uses) was already using the port that Drizzle wanted to use. I had to shut down MySQL on port 3306 to get it up and running. Mark Atwood helped me get past that issue.
Everything seemed to work much cleaner installing on a clean system but that I guess is to be expected. I don’t know all the ways Drizzle will overlap and conflict with other programs and I expect MySQL is the first and most frequent one I will notice.
I fancy myself an astute computer user but some of the ways to get things running in Linux are challenging for a born-and-raised windows user like myself. You don’t just click on a button to install Drizzle. I ran into a few blocks, that can mostly be attributed to me tripping over my self.
For the noobie, make sure you run all of this from the root user which means you will see a $ sign after your user name. for example, my command line starts with: kent@server:-$.
Jauder Ho had a great walk-through that I am going to steal and re-post here, with a couple alterations only for the sake of clarity and a minor change due to dependencies. His text is in red:
The Drizzle wiki was useful in getting started but did not include all of the available packages.
First, the basic dependencies:
sudo apt-get install libpcre3-dev libevent-dev autoconf automake
bison libtool ncurses-dev libreadline-dev libz-dev g++
libssl-dev uuid-dev libpam0g libpam0g-dev gperf
Next, the libevent on 8.04 is too old so a newer version needs to be installed. Did this on 9.04 too just to make sure it is up-to-date.
sudo apt-get install libevent-dev
Google’s Protocol Buffers as well as libdrizzle need to be installed and the packages are available on the drizzle-developers PPA on Launchpad.
Google Protocol Buffers is a bit more of an issue. I got an error later on that said protobuf was out of date. You need to go here to get a concise walkthrough to update your software sources on Ubuntu Desktop.
***Amendment*** if you are running Ubuntu Server (which is probably the ultimate goal) you need to access your repositories by running the following command: sudo nano /etc/apt/sources.list. Then you can add the lines as the sources walk-through suggests***
Add the PPA to your software sources, add the key and then run the following:
sudo apt-get install libprotobuf-dev protobuf-compiler
Then:
sudo aptitude installlibdrizzle-dev
I was beating my head against a wall for a while trying to install libdrizzle. I kept trying to run sudo apt-get install on libdrizzle-dev but for some reason that didn’t work. Then I did sudo aptitude install and it worked fine. If anyone can tell me why, that would be great. Aside from that Jauder’s walk through worked fine.
*** Amendment, some people mentioned that I forgot to let you know to install Bazaar to compile Drizzle as well as make. Those commands are:”sudo apt-get install bzr” and “sudo apt-get install make“***
Now it’s time to finally download, compile, and install Drizzle. Run the following commands:
bzr branch lp:drizzle
cd drizzle
./config/autorun.sh
./configure
make
sudo make install
You should now have Drizzle installed on Ubuntu 9.04 Jaunty Jackalope. If you have an problems or see a way to make anything more concise or clear please tell me.
I did find a few things in the wiki that could be made more clear for us noobies. I will get on that.
I actually spent a lot of time doing this the hard way before I found Jauder’s succinct walk-through and will elaborate in the next post. Next time I will be setting up my user accounts and beginning testing.
Last week I was at a lecture Brian Aker gave to the Seattle MySQL community. During his talk I got a feel for how the team is developing Drizzle, where they stand on various operating systems, and what they are testing on.
Drizzle, when it’s completed, will be able to run on virtually any type of system, though it is specifically designed for web servers and cloud computing. At the beginning I will be doing almost everything on a 1U 64-bit AMD Athlon 2800+ rack mounted server with two gigs of Ram. Not a beast of a machine by any measure but certainly fine for our purposes, and running Ubuntu Server on it will mean it’s pretty zippy. I also have a couple of windows machines and a server running Open-Solaris which I will be playing with. Drizzle is being tested on astonishingly powerful machines, some of which are running 64 or more processing cores and hundreds of Gigs of Ram. In other words, I will not be pushing the limits with the software just yet.
I am fan of Linux, specifically the Ubuntu distribution, because it is easy to get the feel after switching from Windows, even for the non-hacker like myself. It is not quite the type of OS I would set my grandma up with but it’s pretty straight forward.
Installing software on Ubuntu (I’m using 9.04) can be incredibly easy and beats a trip to the store to spend a few hundred bucks any day. While the Graphical interface in Ubuntu is pretty simple, in reality we will be using the command line for most of what we do with Drizzle. I suspect most people interested in anything resembling a database will be relatively familiar with command line, but for those of you who are new to that as well I will be making the commands very specific. When in doubt, copy and paste; but please don’t forget to change things like <username> to your own username. It won’t work too well otherwise.
Another piece of the puzzle we will need is a sample database. If you have one you want to use that’s great, but I was pointed in the direction of the Sakila sample database, often used for testing and practice with MySQL. After I get a feel for things I will actually use some free US environmental databases I downloaded for a project and see about real world implementation.
The next post will actually include the installation of Drizzle! I promise! I learned a few new things about compiling and dependencies, and made a couple stumbles.
I’m not really scared of rain after living in Seattle for seven years. I am a little scared of sticking my neck out and writing about something which (for the moment) I know almost nothing about.
See, I am formerly a TV Producer stretching myself to learn a few new tricks. A hacker friend has been helping me with some new concepts, including using databases in creating websites. Being a fairly well known hacker, Brian is at the heart of the team developing one of the next generation of databases. He suggested the best way to learn is to teach, so he asked me to begin contributing to the online manual for Drizzle, which I have never touched and is not even released!
The scariness of this thought aside, I was intrigued. If I write the manual as I learn, I might just come to truly understand the Drizzle DBMS. By documenting every single (many), little (large), tiny (massive), mistake I make along the way, I might just make a different kind of road-map for others to learn by as well.
We will get into the details in future posts, but the basics are:
- Drizzle is a fork from the MySQL Database; it rethinks it and refocuses it toward use on the internet and in cloud computing.
- It’s open source. Anyone can contribute and everything about the development is public.
- Drizzle is being built for the next generation of server technology and will be lean, fast, reliable, and scalable.
That’s (mostly) the extent of what I know.
I am not a developer, and certainly no expert in databases. I am simply excited by this project and more excited by my Brian’s suggestion that I get involved in something that I suspect will be very big. The philosophy of a radically open and collaborative project is infectious, and my aim is to share that excitement with a whole bunch of people who might otherwise be daunted by the thought of trying something new.
In the coming weeks and months I will dive into Drizzle, learn how to install it, use it, configure it, and maintain it. As I do, you will see links to my updates to the online manual here, as well as a more colloquial exploration of my successes and failures.
And for those of you who are familiar with Drizzle… Please keep the feedback coming.