Koozali.org: home of the SME Server
Obsolete Releases => SME 8.x Contribs => Topic started by: newburns 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?
-
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 !
-
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
-
Mary, you are awesome. 5 stars
-
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.
-
memcached i386 1.4.5-1.el5 epel 71 k
Installing for dependencies:
libevent i386 1.4.13-1 smecontribs 112 k
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel php-pecl-memcache
--> 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
-
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
-
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
/etc/rc.d/init.d/memcached start
or you can
service memcached status
-
Okay.
Install memcached from the Epel Repo
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel memcached
Start the service and make it a part of auto startup
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
service memcached start
Install gcc and zlib-devel
yum install --enablerepo=smecontribs --enablerepo=sme7contribs --enablerepo=dag --enablerepo=fws --enablerepo=epel zlib-devel gcc
Then enable the PECL extension to interact with PHP
pecl install memcache
Everything should compile properly
Create a directory
mkdir /etc/e-smith/templates-custom/etc/php.ini
Unless you already have that directory, then create a new file
nano -w 92memcache
Inside the file copy and paste
extension=memcache.so
Now expand and restart
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
-
Turns out Memcache is slower than Disk Caching, however, should I add this to the Wiki?
-
Turns out Memcache is slower than Disk Caching, however, should I add this to the Wiki?
Definetly, somone may benefit from your experiences..
-
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?