Debian and Ubuntu packages from Percona are signed with a key. Before using the repository  you ought to add the key to apt.

For that run the following commands:

Step1. Add the Percona repository:

gpg –keyserver hkp://keys.gnupg.net –recv-keys 1C4CBDCDCD2EFD2A
gpg -a –export CD2EFD2A | sudo apt-key add –
echo “deb http://repo.percona.com/apt squeeze main” >> /etc/apt/sources.list
echo “deb-src http://repo.percona.com/apt squeeze main” >> /etc/apt/sources.list

Step2. Install Percona Server:

apt-get update
apt-get install  percona-server-server-5.5

Continue Reading…

Step1. Install Apache2 using the command:

apt-get install apache2-mpm-worker

Now you cand navigate from  your browser to http://your-ip to check if Apache2 is working (you should see the Apache2 default page with message:  It works).

Step2.  Install PHP5-FPM.

We will make PHP5 work in Apache2 through PHP-FPM and Apache2  mod_fastcgi module.
We need to install apache mod-fastcgi first:

apt-get install libapache2-mod-fastcgi php5

Now install php-fpm:

echo “deb http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
echo “deb-src http://packages.dotdeb.org stable all” >> /etc/apt/sources.list
wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg |apt-key add –
apt-get update
apt-get install php5-fpm

Step3. Enable the  Apache2 modules: Continue Reading…

phpMyAdmin is a popular software  and as such is a target for various scripted attacks. If you run phpMyAdmin installation somewhere you should really make sure it is secured.

There are some things you can do to keep you safer:

1. Remove setup directory from phpMyAdmin. You will not use it after initial setup:

 rm -rf /usr/share/phpmyadmin/setup/

2. Prevent access to libraries directory from browser.  You can use a .htaccess file for this.

3. In case you don’t want all  users  to access phpMyAdmin  you can use AllowDeny rules to limit them:

Use the following in the file config,inc.php of phpMyAdmin to restrict access to from remote machines.

vim /usr/share/phpmyadmin/config.inc.php


Continue Reading…

APC  Configuration:

Once you have installed following this tutorial http://www.debian-tutorials.com/general/installing-apc-alternative-php-cache-into-php5-on-debian  you need to configure it.

APC makes use of a shared memory segment to cache php scripts. This enables multiple processes to access the cache. You can configure how massive that segment is in megabytes:

apc.shm_size=100M

By default,  APC will cache every php file requested by visitors to your website. On a typical server you will have lots of thousands of source files. So in the event you monitor the output of apc.php you will find that with time even 100MB of memory is not sufficient for APC. It will keep running  out of space as it tries to cache all the files.
To deal with this, APC will swap out old files from the cache according to this setting which specifies the time to live in seconds of files that have not been accessed recently:

apc.ttl=1300

You may prefer to cache only some of the files such as those used by the most popular websites on the server. To do that you must first set this option:

Continue Reading…

Using Dotdeb is very simple.

1. First add these two lines to your /etc/apt/sources.list file:

deb http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all

2. Now fetch the appropriate GnuPG key:

wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | sudo apt-key add –

3.Install PHP 5.4: Continue Reading…