-
Installing Apache 2 in Debian with PHP5
Posted on December 29th, 2008 No commentsBy Default you will be given the package apache2-mpm-worker
apache2-mpm-worker
The worker MPM provides a threaded implementation for Apache2. It is considerably faster than the traditional model, and is the recommended MPM.
apache2-mpm-prefork
This Multi-Processing Module (MPM) implements a non-threaded, pre-forking web server that handles requests in a manner similar to Apache 1.3. It is appropriate for sites that need to avoid threading for compatibility with non-thread-safe libraries.
#apt-get instal install apache2
#apt-get install apache2-mpm-prefork
That’s it basic apache2 installation finished. If you want to test your installation go to your browser and type the following
http://youripaddress/apache2-default/
This should display welcome message then your installation is correct.
Default document root directory for apache2 is /var/www
If you want to change the default document root directory in apache2 you have to modify /etc/apache2/sites-available/default file.Edit this file and change the path to where ever you want to change.
PHP Support For Apache2
If you want to add support of php and cgi scripts install the following packages libapache2-mod-php5,php5-cli,php5-common,php5-cgi
# apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
Make sure you have all the following lines need to uncomment somewhere in your apache2.conf (or in your conf.d/php.ini) file:
LoadModule php5_module modules/libphp5.so
# Cause the PHP interpreter to handle files with a .php extension.
AddType application/x-httpd-php .php
If you want to allow the different index files types check for the following line in /etc/apache2/apache2.conf file
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml
Restart the apache server
/etc/init.d/apache2 restart
-
Upgrade php on debian
Posted on December 4th, 2008 No commentsUpgrading php to latest version is really easy under Debian and Linux. First make backup of all important data and config files.
Here we have taken the backup of php4 verison.
cp /etc/php4/cli/php.ini php.ini_bak
Then give the following command to upgrade php4 to php5
apt-get install php5-cgi php5-cli
finally you should see the following text…
Creating config file /etc/php5/cgi/php.ini with new versionSetting up php5-cli (5.2.0-8+etch13) …
Creating config file /etc/php5/cli/php.ini with new version
Note down the new config file and add whatever loaders (Ioncube, zend extensions ) to the new php.ini file.
Please note that it will upgrade related package as well
-
Install VHCS2.2 on Debian vps
Posted on November 30th, 2008 No commentsWhile doing the debian software selection choose Standard system only and hit continue, when asked if the GRUB boot loader has to be installed, choose Yes Next we are going to prepare the system for VHCS2.2
#apt-get install ssh
Now you can log-on from your desktop machine into your fresh debian server by using Putty (and the best of all, copying and pasting parts of this manual directly into your terminal).check the network interfaces available on your system from /etc/network/interfaces
note down venet0:0 and its ipaddressThen run the following pre-defined commands. Simply copy and paste.
echo yourhostname > /etc/hostname
Reboot the system:
#shutdown -r nowThen Run:
#hostname
#hostname -fBoth should show your hostname (like host.example.com)
Edit /etc/apt/sources.list and comment out the cd-rom entry:
#nano/etc/apt/sources.list
#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib maindeb http://ftp2.de.debian.org/debian/ etch main
deb-src http://ftp2.de.debian.org/debian/ etch maindeb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contribsave the file and exit.
Then run:
#apt-get updateAnd run:
#apt-get upgradeNow, install the MySQL server (MySQL5):
#apt-get install mysql-server mysql-client libmysqlclient15-dev phpmyadminWe want MySQL to listen on all interfaces, not just localhost, so:
#nano /etc/mysql/my.cnffind the line “bind-address = 127.0.0.1″ and comment it out:
# bind-address = 127.0.0.1then, we restart MySQL:
#/etc/init.d/mysql restartnow check that networking is enabled, run:
#netstat -tapYou should see a line like this:
tcp 0 0 *:mysql *:* LISTEN 3231/mysqldRun
#mysqladmin -u root password yourpassword
#mysqladmin -h host.example.com -u root password yourpasswordyou will be asked the following question:
Continue installing libc-client without Maildir support?
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml
edit /etc/apache2/ports.conf and add Listen 443:
#nano /etc/apache2/ports.conf
Listen 80
Listen 443now we have to enable some Apache modules (SSL, rewrite, suexec, and include):
#a2enmod ssl
#a2enmod rewrite
#a2enmod suexec
#a2enmod includeand reload the apache configuration:
#/etc/init.d/apache2 force-reloadnow we’re going to prepare the system for the VHCS installation:
#apt-get install postfix postfix-tlsPlease at request fill in the hostname you’ve entered at the debian installation, e.g. host.example.com
#apt-get install proftpd proftpd-mysql
Please choose for “Stand alone” at request
#apt-get install courier-authdaemon courier-base courier-imap courier-maildrop courier-pop libberkeleydb-perl libcrypt-blowfish-perl libcrypt-cbc-perl libcrypt-passwdmd5-perl libdate-calc-perl libdate-manip-perl libdbd-mysql-perl libdbi-perl libio-stringy-perl libmail-sendmail-perl libmailtools-perl libmd5-perl libmime-base64-perl libmime-perl libnet-dns-perl libnet-netmask-perl libnet-perl libnet-smtp-server-perl libperl5.8 libsnmp-session-perl libterm-readkey-perl libtimedate-perl perl perl-base perl-modules bind9 diff gzip iptables libmcrypt4 patch procmail tar original-awk libterm-readpassword-perl libsasl2-modules libsasl2 sasl2-bin bzip2 gcc make libc6-dev
then open /etc/proftpd/proftp.conf to stop some errors from ProFTPD:
#nano /etc/proftpd/proftpd.confUseIPv6 off
Then, add some security fixes to it:
DefaultRoot ~
IdentLookups off
ServerIdent on “FTP Server Ready”Save the file and exit.
We’re going to download the stable release vhcs2.2 package, We noticed some errors with 2.-2.4.7 release
#cd /usr/src
wget http://downloads.sourceforge.net/vhcs/vhcs2.2.tar.bz2then unpack the archive:
#tar -xjf vhcs2.2.tar.bz2enter the newly created directory:
#cd vhcs2now, we’re creating the installer:
#make installThe installation and daemon files goes under the following directory: Go to
#cd /tmp/vhcs2and copy all of it’s content to the root destination:
#cp -R * /after this, go to:
#cd /var/www/vhcs2/engine/now, edit the file vhcs2_common_code.pl
#nano vhcs2_common_code.plscroll down to line 1408, look for:
‘key’=>$main::db_pass_key,next, add the following line BEFORE the above quoted line:
‘keysize’ =>32,scroll down to line 1446 where you will need to repeat the above steps
now save the file and exit.
Start-up the VHCS2 installer:
#cd /var/www/vhcs2/engine/setup
#./vhcs2-setupNow you’ve succesfully installed your debian etch machine containing VHCS2 for virtual hosting!
You should see a message Successfull install of VHCS
http://youripaddress/vhcs2/
Please contact our support department if you have any problems while installation.
-
Install FFmpeg, FFmpeg-PHP, Lame, Libogg, Libvorbis, FLVtool2, Mplayer, Mencoder, AMR on Debian
Posted on August 23rd, 2008 No commentsIntroduction
The following HOWTO will show you exactly how to install the following packages on a Debian Etch or Ubuntu 7.06 system:
* FFmpeg
* FFmpeg-PHP
* Mplayer + Mencoder
* flv2tool
* LAME MP3 Encoder
* AMR (for 3gp file conversions)
* Libogg
* Libvorbis



Recent Comments