Koozali.org: home of the SME Server

Need help with memcached

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Need help with memcached
« on: September 02, 2012, 08:03:20 AM »
It seems memcached will speed up a lot of my database queries, and some web apps. However, searching for the Centos installation instructions, websites state that it should be located in dag. enablerepo-dag install mamcached produces no packages. Is it possible with SME?
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Need help with memcached
« Reply #1 on: September 02, 2012, 08:11:20 AM »
newburns

According to this
http://www.cyberciti.biz/faq/rhel-fedora-linux-install-memcached-caching-system-rpm/

use the epel repo, which seems to work for me, whereas dag does not.

Now there, are we a happy plumber, no need for any more jibes at mary !
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Need help with memcached
« Reply #2 on: September 02, 2012, 02:37:39 PM »
Mary,

I installed memcached a couple a days ago to see what it 'did'. The server is a small one so visually I didn't notice any (speed) difference.

Then a bumped into this article:

http://www.lullabot.com/articles/installing-memcached-redhat-or-centos

especially the ' Install the Memcache PECL Extension' section, which suggests that simply yum install will do nothing other then running it as a service, not effecting speed. So it requires a custom template to function properly?

I removed it, but was wondering what you think?

Regards,
guest

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #3 on: September 02, 2012, 02:39:10 PM »
Mary, you are awesome. 5 stars
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Need help with memcached
« Reply #4 on: September 02, 2012, 02:59:22 PM »
RequestedDeletion

I did not look into it greatly, but it does seem that other packages are required to make use of memcached, refer to both articles mentioned in this thread, but there were quite a few more google hits, so read on some more.

newburns seems adventurous so maybe he will tell us the results of his forays into using memcached plus other necessary packages.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #5 on: September 03, 2012, 06:36:11 AM »
Code: [Select]
memcached         i386         1.4.5-1.el5           epel                 71 k
Installing for dependencies:
 libevent          i386         1.4.13-1              smecontribs         112 k

Code: [Select]
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel php-pecl-memcache
Code: [Select]
--> Finished Dependency Resolution
php-pecl-memcache-2.2.6-1.el5.i386 from epel has depsolving problems
  --> Missing Dependency: php-zend-abi = 20050922 is needed by package php-pecl-memcache-2.2.6-1.el5.i386 (epel)
Error: Missing Dependency: php-zend-abi = 20050922 is needed by package php-pecl-memcache-2.2.6-1.el5.i386 (epel)

Memcache seems to be installed as the config file is present in /etc/sysconfig/memcache, however, I am not sure how to start the service, or even if it is useful without the php client/extension being that I want to use it for most of my cache for websites
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #6 on: December 05, 2012, 11:11:06 PM »
Felt adventurous.
A webapp asked me if I had memcached, and I said "If I don't, I should"!  :grin: So......
1. Installed through yum : gcc
2. Installed through yu,: zlib-devel
3. Compiled libmemcached
4. Tried to make && make install, but version of gcc won't properly compile libmemcahed (according to reviewers)

I have stopped trying to get this to go through, and would like to take another approach. What is necessary to compile everything on Centos so that I am left with an installable .rpm for SME?

http://www.bxtra.net/articles/2011-03-22/how-to-install-memcached-on-centos-memcached-pecl-update-20110322
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #7 on: January 26, 2013, 07:51:36 PM »
Code: [Select]
chmod 755 /etc/rc.d/init.d/tomcat
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc7.d/S97memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc6.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc2.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc1.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc0.d/K02memcached

Found out I never started the service!
Now you can either
Code: [Select]
/etc/rc.d/init.d/memcached startor you can
Code: [Select]
service memcached status
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #8 on: January 27, 2013, 08:41:01 AM »
Okay.
Install memcached from the Epel Repo
Code: [Select]
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel memcached
Start the service and make it a part of auto startup
Code: [Select]
chmod 755 /etc/rc.d/init.d/tomcat
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc7.d/S97memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc6.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc2.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc1.d/K02memcached
ln -s /etc/rc.d/init.d/memcached /etc/rc.d/rc0.d/K02memcached

Code: [Select]
service memcached start
Install gcc and zlib-devel
Code: [Select]
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel zlib-devel gcc
Then enable the PECL extension to interact with PHP
Code: [Select]
pecl install memcacheEverything should compile properly
Create a directory
Code: [Select]
mkdir /etc/e-smith/templates-custom/etc/php.iniUnless you already have that directory, then create a new file
Code: [Select]
nano -w 92memcache
Inside the file copy and paste
Code: [Select]
extension=memcache.so
Now expand and restart
Code: [Select]
expand-template /etc/php.ini
/etc/init.d/httpd-e-smith restart

Go to Wordpress, and look in your Cache plugin to see the newly available "Memcache".

I was trying to go with eAccelerator, but it seemed more complicated than this way. Anything is better than basic disk caching, so I'm happy.

Please try these instructions, and let me know if it works. I will put into a page if all goes well
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #9 on: June 23, 2013, 04:09:04 AM »
Turns out Memcache is slower than Disk Caching, however, should I add this to the Wiki?
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Need help with memcached
« Reply #10 on: June 23, 2013, 07:52:30 AM »
Turns out Memcache is slower than Disk Caching, however, should I add this to the Wiki?

Definetly, somone may benefit from your experiences..
--
qui scribit bis legit

Offline newburns

  • *
  • 345
  • +0/-0
  • A good plumber, noob developer
    • Mt. Rose MEdia
Re: Need help with memcached
« Reply #11 on: July 23, 2013, 05:30:53 PM »
If i compile memcache with another machine, how can I transfer it? I have a new SME 8.0 machine being installed, but I don't want to compile on the new machines. Can I compile on one machine, and use that for all my machines?
SME 8.0
Quad 6600
8gb DDR2 800
8 TB RAID 5
Dual Gigabit NIC
I Still Don't KNOW WHAT I AM DOING. Please, don't assume I know anything about Linux or Centos, I just know hardware