Step1. Squid3 install.

apt-get install squid3

Step2. Rename the original squid.conf for backup:

mv /etc/squid3/squid.conf /etc/squid3/squid.conf.back

Step3. Create a new custom file squid.conf:

nano /etc/squid3/squid.conf

and paste the following content:

http_port 3128 transparent
acl localhost src
http_access allow localhost
cache_dir ufs /var/spool/squid3 7000 16 256
auth_param basic program /usr/lib/squid3/squid_db_auth --user userproxy --password parolaproxi --plaintext --persist
auth_param basic children 5
auth_param basic realm This is a welcome message that will me displayed to each user.
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off
acl db-auth proxy_auth REQUIRED
http_access allow db-auth
http_access allow localhost
http_access deny all

Step4. We will go now to the MySQL and create the database: Continue Reading…

To reset the MySQL root password, login to the mysql shell and run the following commands:

SET PASSWORD FOR [email protected]=PASSWORD('RootPasswordHere');

In the following tutorial i will describe the steps to optimize the performance of a MySQL database with the mysqltuner script:

Step1. Download the mysqltuner script:

cd /usr/bin
 chmod +x

Step2.  Run mysqltuner:

[email protected]:~# /usr/bin/

Enter the root as username and the  password and you will get a output like this:

[email protected]:~# /usr/bin/

>>  MySQLTuner 1.2.0 - Major Hayden <[email protected]>
>>  Bug reports, feature requests, and downloads at
>>  Run with '--help' for additional options and output filtering
Please enter your MySQL administrative login: root
Please enter your MySQL administrative password:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.58-1~dotdeb.1
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

Continue Reading…

1. Configure The Master
First we have to edit /etc/mysql/my.cnf

We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):

#bind-address            =

Furthermorewe have to tell MySQL for which database it should write logs,which log file it should use, and we have to specify that this MySQLserver is the master. We want to replicate the database exampledb, so we put the following lines into /etc/mysql/my.cnf:

log-bin = /var/log/mysql/mysql-bin.log

# what database you want to replication



Then we restart MySQL:

/etc/init.d/mysql restart

Then we log into the MySQL database as root and create a user with replication privileges:

mysql -u root -p
Enter password:

GRANT REPLICATION SLAVE ON *.* TO ‘slave_user’@’%’ IDENTIFIED BY ‘<your_password>’;

Next do this:


Now leave the MySQL shell:

Continue Reading…

The following tutorial is done with Debian Squeeze version 6.0.2.
In this tutorial, I will show you the shortest and easiest way to set up nginx  with PHP5, MySQL and phpmyadmin running through FastCGI:

Step 1: Installation:

apt-get install nginx mysql-server mysql-client php5 php5-cgi php5-mysql phpmyadmin

NOTE: After you have installed all above you will need to edit the php.ini file:
Open php.ini file end remove the ; in front of the line cgi.fix_pathinfo=1

Step 2: Make PHP FastCGI daemon listening on port 9000 on localhost and start at boot.

Edit the /etc/rc.local file and put the following content:

vim /etc/rc.local
/usr/bin/spawn-fcgi -a -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/

Step 3: Create virtual host file for your site:

Continue Reading…

Page 4 of 512345