How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

January 28, 2013

Centos 6 pecl install memcached error

Filed under: Linux — Tags: , , , — admin @ 5:50 pm

Today I try to install memcached on a server with centos 6. So basically when I hit
pecl install memcached
I get a lot of errors
checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir= < DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/var/tmp/memcached/configure' failed

So if I try to install libmemcached by using
yum install libmemcached libmemcached-devel
I see that version of libmemcached will be smaller then 1.0.x

So to install it
cd /usr/local/src
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
tar -zxvf libmemcached-1.0.15.tar.gz
cd libmemcached-1.0.15
./configure
make
make install

After this try
pecl install memcached

For me this was the working version.

January 4, 2013

how to modify nginxcp vhost templates

Filed under: Linux — admin @ 1:52 pm

Hmm
Today I face a little problem. I install on a server nginxcp, and because I wanted varnish also, I have to modify nginx to run on other port then 80. So basically I modify zones every time after I have add them, but how to automate this.

After a little search and no answer I found the file that is responsibly for this.

So basically in /scripts/ you will find a new file called createvhosts.py

You have to modify here what you want to be keep into your zone automatically.
So to change the port from 80 to 81, I just have to modify this line
listen %s:80;
into
listen %s:81;

Please notice that are 2 modification that you have to do on that file.

If this help you please make a social bookmark for our site / page

Regards

December 16, 2012

How to update DomainKeys on a cpanel server with existing accounts

Filed under: Linux — Tags: , , , — admin @ 2:30 pm

Hello ,
Well, I have a main server with cpanel , because is easy to make e-mail account’s there , and other server for other big sites. So basically I create account on cpanel server and after that I move ip to point to other server.
However if you server crash and you restore the cpanel account it appear that cpanel rebuild the dns zone, and you have to work twice, to redo the ip to old server .
If is one domain is easy but if you have a few , then a solution is to, restore /var/named files from backup that you made, and /etc/named.conf. After this what I do was to chattr +i /var/named/*.db . In this way cpanel will keep my old configuration. However your cpanel serve will create new dkim files for you, and you will have old values on your *.db files.
So, how we fix that ?
Firs of all when the restore is done make then movable again chattr -i /var/named/*.db
After this just run :
for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_uninstall $user ; done
This will erase old dkim configuration for you, when is done run :
for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_uninstall $user ; done

Now you have all information updated . Off course you should use those generated files from /var/cpanel/domain_keys on other server if you send mail from there also .

Best regards

November 14, 2012

How to disable eximstats from ssh console

Filed under: Linux — admin @ 11:05 am

Today I was facing a problem. What I want is to stop eximstats from ssh. Well after I serach on cpanel.config and didn’t find anything, I figure it out how to stop it from ssh.

/usr/local/cpanel/bin/tailwatchd --status
This will print if eximstats is active
tailwatchd is enabled
Running, PID 29074
Driver (Active: 1) Cpanel::TailWatch::cPBandwd
Driver (Active: 0) Cpanel::TailWatch::Antirelayd
Driver (Active: 1) Cpanel::TailWatch::ChkServd
Driver (Active: 1) Cpanel::TailWatch::Eximstats

So if you want to stop one of them just run
/usr/local/cpanel/bin/tailwatchd –disable=Cpanel::TailWatch::Eximstats

This will disable eximstats for you.

October 16, 2012

How to erase your mbr in linux

Filed under: Linux — admin @ 6:52 pm

Warning, do this if you only understand what it does.
To remove only the MBR ( boot loader)
dd if=/dev/zero of=/dev/sda bs=446 count=1

To remove your MBR & partition table
dd if=/dev/zero of=/dev/sda bs=512 count=1

The sda is the hard that you want to erase.

« Newer PostsOlder Posts »

Powered by WordPress