Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Membase 1.7.1 on Linux, setting up CentOS 64-bit

9 replies [Last post]
  • Login or register to post comments
Mon, 08/15/2011 - 14:50
tgraupmann
Offline
Joined: 07/21/2011
Groups: None

Following the steps here:
http://www.couchbase.org/products/sdk/membase-php

Installed Apache2
Installed Php 5.3.3

Copied memcached.so here:

ldd /usr/lib64/php/modules/memcached.so
linux-vdso.so.1 => (0x00007ffffdf5d000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00002acd95e8d000)
libc.so.6 => /lib64/libc.so.6 (0x00002acd960a2000)
/lib64/ld-linux-x86-64.so.2 (0x0000003090a00000)

Edited /etc/php.ini

Set the timezone (New York)

Added to the section:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

extension=/usr/lib64/php/modules/memcached.so

Restarted httpd:
/etc/init.d/httpd restart

Created a php file with phpinfo.

And when httpd starts it logs the following error:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: memcached_touch in Unknown on line 0

What did I miss?

Top
  • Login or register to post comments
Tue, 08/16/2011 - 08:45
ingenthr
Offline
Joined: 03/16/2010
Groups:

That looks correct to me, as we've bundled everything in. We'll have a look at it.

Top
  • Login or register to post comments
Tue, 08/16/2011 - 15:10
tgraupmann
Offline
Joined: 07/21/2011
Groups: None

Wasted half a day trying to build php and extensions...

This was much easier.
http://itknot.blogspot.com/2011/07/install-php-536-on-centos-64bit.html

I downloaded the updated rpms to upgrade to php5.3.6:

Uninstall php5.3.3

(as root)
cd

Download these from the latest at IUS: http://www.applesauceman.com/ius/stable/Redhat/5/x86_64/

http://www.applesauceman.com/ius/stable/Redhat/5/x86_64/epel-release-5-4...
http://pkgs.org/centos-5-rhel-5/ius-i386/ius-release-1.0-8.ius.el5.noarc...

yum install php53u-pear && yum install php53u php53u-cli && yum install php53u-common && yum install php53u-devel && yum install php53u-gd && yum install php53u-mbstring && yum install php53u-mcrypt && yum install php53u-mysql && yum install php53u-pdo && yum install php53u-soap && yum install php53u-xml && yum install php53u-xmlrpc && yum install php53u-bcmath && yum install php53u-pecl-apc && yum install php53u-pecl-memcache && yum install php53u-snmp && yum install phpu-mssql

pressed 'y' a bunch of times.

And then I had the memcache Linux client running on CentOS 5 64-bit in under 10 minutes!!!!!!

Top
  • Login or register to post comments
Tue, 08/16/2011 - 15:44
ingenthr
Offline
Joined: 03/16/2010
Groups:

Apologies that it didn't work out of the box. It is intended to, and we'll resolve what's causing the issue.

I think this is okay for you, but just so you know the version you're running is standard pecl-memcache, which is not the preferred client in either the Couchbase or memcached community. I'd highly recommend you look at pecl-memcached.

The client we provide is built atop pecl-memcached and it has some new functionality compatible with Couchbase Server 2.0 developer preview. From what you posted, it's something with this new functionality that was the problem for you. We're looking into it and I'll update this thread when we have an answer.

Top
  • Login or register to post comments
Thu, 11/10/2011 - 04:32
jan
Offline
Joined: 02/15/2011
Groups: None

This looks like packaging bug on our end, I opened http://couchbase.org/issues/browse/PCBC-17 to track this.

Thanks for the report!

Cheers
Jan
--

Top
  • Login or register to post comments
Sun, 11/20/2011 - 06:51
pk899
Offline
Joined: 11/20/2011
Groups: None

Wow this looks rudimentary!

I'm thinking of replacing my Postgresql with Couchbase (membase as it's now called? This is supremely confusing).

My database on a high traffic website has over 70 million records. Is membase even in contention as a smart nosql replacement?

I already use PHP 5.3.8 and memcached 1.4.10. All works, but memcached's role is just to ease the SELECT burden on Postgresql. All my code for INSERT/UPDATE/DELETE still goes to postgresql (persistent storage) so I am wondering...

Questions:

1 . Are membase 1.7.2 or couchbase 2.0 ready to play this role of replacing a proper RDBMS that's just not fast enough?

2. I need a simple *procedural* code sample to look at to see how to add records to membase, how to edit them, how to delete them, etc. Is this the same as with the memcache code, based on key/value pairs? I do NOT NOT NOT want any "OOP" code please. No classes and constructions, just simple functions to get the job done in a few lines. Possible?

Much appreciate your reading this, and any directions/advice.

Top
  • Login or register to post comments
Mon, 11/21/2011 - 19:06
ingenthr
Offline
Joined: 03/16/2010
Groups:

On number one, the answer is yes. It's a yes with a caveat, as you didn't describe which of the many "proper RDBMS" features you need. Membase effectively approximates what you would do by sharding your RDBMS and putting memcached in front of it. Couchbase Server 2.0 (currently in developer preview) goes a few steps further by giving you Couch views (a method of incrementally processing data through MapReduce to access it in different ways).

On number two, the answer to "Is this the same as with the memcache code?" the answer is yes. If you use JSON for the data items you put in the server, you'll be able to do quite a bit more once Couchbase Server 2.0 ships.

Hope that helps,

Matt

Top
  • Login or register to post comments
Thu, 11/24/2011 - 18:56
pk899
Offline
Joined: 11/20/2011
Groups: None

The RDBMS is postgresql. I'm from the SQL world. I see zero code samples for people like me, of which I bet there are gazillions, to INSERT/UPDATE/SELECT/DELETE records.

So, again: is there a simple procedural PHP code sample somewhere that shows me HOW to access the database, put records into it, get records from it?

For memcached, I just serialize a regular array and save it with a key/value pair. But there are many keys to access the data -- one may be the record ID, but another may be the user saving the record. I may sometimes need the user to be the "key" in the key/value pair, for example when showing a logged in user only his records. In the RDBMS world, this is straightforward. In the key/value NoSQL world, how does this map?

I need basic startup help for now. All the geek speak about MapReduce and all is probably for much later.

Thanks for any pointers!

Top
  • Login or register to post comments
Tue, 12/27/2011 - 22:38
chuyskywalker
Offline
Joined: 12/27/2011
Groups: None

jan wrote:
This looks like packaging bug on our end, I opened http://couchbase.org/issues/browse/PCBC-17 to track this.

Just as an FYI, this bug is still about. I just hit it in CentOs 6.2. Both the prebuild package, and compiling from source (which, btw, doesn't work right, I had to hack some manifest files) have the same issue.

Top
  • Login or register to post comments
Fri, 01/11/2013 - 01:16
krish
Offline
Joined: 01/11/2013
Groups: None

I'm facing the same issue. I'm trying to make memcached run with PHP on CentOS.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker