Hello, In this tutorial I will show you how to install theese tools in Debian Squeeze.

Step1. Install Apache2 PHP5 Postgresql and phppgadmin

apt-get update && apt-get install apache2 libapache2-mod-php5 php5 postgresql-8.4 phppgadmin

This command will update the repositories and install all the dependencies.

The following extra packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common file libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
libcap2 libdb4.7 libexpat1 libmagic1 libonig2 libpcre3 libpq5 libqdbm14 libxml2 lsb-release mime-support openssl perl perl-modules
php5-cli php5-common php5-pgsql php5-suhosin postgresql-client-8.4 postgresql-client-common postgresql-common postgresql-doc
postgresql-doc-8.4 python python-minimal python-support python2.6 python2.6-minimal sgml-base ssl-cert ucf xml-core
Suggested packages:
www-browser apache2-doc apache2-suexec apache2-suexec-custom php-pear lsb ca-certificates perl-doc libterm-readline-gnu-perl
libterm-readline-perl-perl make postgresql slony1-bin oidentd ident-server python-doc python-tk python-profiler python2.6-doc
python2.6-profiler binutils binfmt-support sgml-base-doc openssl-blacklist debhelper
The following NEW packages will be installed:
apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common file libapache2-mod-php5 libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libdb4.7 libexpat1 libmagic1 libonig2 libpcre3 libpq5 libqdbm14 libxml2
lsb-release mime-support openssl perl perl-modules php5 php5-cli php5-common php5-pgsql php5-suhosin phppgadmin postgresql-8.4
postgresql-client-8.4 postgresql-client-common postgresql-common postgresql-doc postgresql-doc-8.4 python python-minimal
python-support python2.6 python2.6-minimal sgml-base ssl-cert ucf xml-core
0 upgraded, 46 newly installed, 0 to remove and 0 not upgraded.

 

Step2. Configure  PostgresSQL.

Continue Reading…

In this tutorial I will show you how you can run virtual machines with VirtualBox  on a Debian Squeeze server and how to manage your virtual machines with phpvirtualbox.
Phpvirtualbox is a web based VirtualBox front-end written in PHP that allows you to access and control remote VirtualBox machines.

Step1. First we need to create an user called Administrator and group with the same name.

[email protected]:~# groupadd administrator
[email protected]:~# useradd -d /home/administrator -m -g administrator -s /bin/bash administrator
[email protected]:~# passwd administrator
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Step2. Install VirtualBox
Add the VirtualBox repository in your sources.list file and download the VirtualBox public key:

echo “deb http://download.virtualbox.org/virtualbox/debian squeeze contrib non-free” >> /etc/apt/sources.list
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | apt-key add -

Now install VirtualBox using the following command: Continue Reading…

A little while ago  I ran into memory problems on an VPS.  It turned out to be due to the GD library having issues with large images.
I  discovered is that the PHP memory limit  only applies to actual PHP code and not C libraries like GD that are called from PHP.
To put a cap on the memory usage of Apache I set process limits for the main Apache process  using ulimit.

On Debian this can be done by adding this to the bottom of /etc/default/apache2:

ulimit -v 1048576

NOTE:  This is for a limit of 1GB of virtual memory.

Enjoy.

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…

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…

Page 1 of 71234567