<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bin-Blog &#187; server</title>
	<atom:link href="http://www.bin-co.com/blog/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Tue, 13 Oct 2009 18:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Installing lighttpd Web Server in Linux with PHP and MySQL</title>
		<link>http://www.bin-co.com/blog/2008/11/installing-lighttpd-web-server-in-linux-with-php-and-mysql/</link>
		<comments>http://www.bin-co.com/blog/2008/11/installing-lighttpd-web-server-in-linux-with-php-and-mysql/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 17:48:21 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=161</guid>
		<description><![CDATA[After <a href="http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/" title="Installing LAMP(Apache Web Server/PHP/MySQL) in Debian">two articles</a> on <a href="http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/" title="Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source">installing Apache</a>, lets take a look at <strong class="highlight">installing and configuring lighttpd web server on a linux system</strong>. <a href="http://www.lighttpd.net/">lighttpd</a> (pronounced "lighty") is a web server designed to be secure, fast, standards-compliant and flexible while having a low memory footprint.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/11/lighttpd_logo.png" alt="lighttpd Web Server" title="Lighttpd Logo" width="200" height="197" class="alignnone size-full wp-image-160 intro" align="right" /></p>
<p class="intro">After <a href="http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/" title="Installing LAMP(Apache Web Server/PHP/MySQL) in Debian">two articles</a> on <a href="http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/" title="Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source">installing Apache</a>, lets take a look at <strong class="highlight">installing and configuring lighttpd web server on a linux system</strong>. <a href="http://www.lighttpd.net/">lighttpd</a> (pronounced &#8220;lighty&#8221;) is a web server designed to be secure, fast, standards-compliant and flexible while having a low memory footprint.</p>
<p>Before installation, a few points to remember. These <strong class="highlight">instruction are not for a production environment &#8211; this is for a development environment</strong>. To install the software, <strong class="highlight">you need root access</strong>. You can get that using this command&#8230;</p>
<pre><code class="cli">su -
[Enter root password]</code></pre>
<p>or by prefixing &#8216;<code>sudo</code>&#8216; before each command.</p>
<h2>Installing the Server</h2>
<p>First install lighttpd and PHP &#8211; use your distro&#8217;s package management(yum, apt-get) system to do this.</p>
<h3>Install lighttpd</h3>
<p>You can use this command in Red Hat based systems(Fedora, Cent OS, etc.) to install lighttpd. Debian/Ubuntu systems might the same package name &#8211; could someone post the package name of lighttpd in the comments?</p>
<pre><code class="cli">yum install lighttpd lighttpd-fastcgi</code></pre>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/php-logo.png" alt="PHP Logo" title="PHP Logo" width="179" height="98" class="alignnone size-full wp-image-123" align="right" /></p>
<h3>Install PHP</h3>
<p>If you don&#8217;t have PHP, you can install it using the command&#8230;</p>
<pre><code class="cli">yum install php php-cli php-common</code></pre>
<p>In Debian/Ubuntu systems, the command is&#8230;</p>
<pre><code class="cli">apt-get install php5-cli php5-common php5-cgi</code></pre>
<p>You can make sure you have php-cgi(needed for working with lighttpd) by running this command&#8230;</p>
<pre><code class="cli">php-cgi -v</code></pre>
<h3>Installing MySQL</h3>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/mysql_logo.gif" alt="" title="MySQL Logo" width="150" height="98" class="alignnone size-full wp-image-127" align="right" /></p>
<p>If MySQL is not yet installed, use this command to install it&#8230;</p>
<pre><code class="cli">yum install mysql-server php-mysql mysql mysql-libs</code></pre>
<p>Debian/Ubuntu Command&#8230;</p>
<pre><code class="cli">apt-get install mysql-client mysql-common mysql-server php5-mysql</code></pre>
<h2>Configuring lighttpd</h2>
<p>lighttpd configuration is done by <strong class="highlight">editing the text file &#8216;/etc/lighttpd/lighttpd.conf&#8217;.</strong></p>
<p><strong class="highlight">Enable some lighttpd modules</strong> by removing the comment character(#) from the beginning of the line. I have enabled the following modules&#8230;</p>
<pre><code class="conf">server.modules              = (
                                "mod_rewrite",
                                "mod_redirect",
                                "mod_access",
                                "mod_fastcgi",
                                "mod_accesslog" )
</code></pre>
<p><strong class="highlight">Configure lighttpd&#8217;s document root</strong> &#8211; if you already have Apache, I would recommend using the same document root as Apache(applicable for development servers only). </p>
<pre><code class="conf">server.document-root        = "/var/www/"</code></pre>
<p>I find it helpful to <strong class="highlight">enable folder listing</strong> in my server.</p>
<pre><code class="conf">## virtual directory listings
dir-listing.activate       = "enable"</code></pre>
<h3>Turn On FastCGI PHP Support</h3>
<p>Now, make sure lighttpd works with PHP &#8211; first get the path of php-cgi using the command..</p>
<pre><code class="cli">$ whereis php-cgi
php-cgi: /usr/bin/php-cgi #Might be different on your system.</code></pre>
<p>Then <strong class="highlight">add the path to the configuration file</strong> of lighttpd&#8230;</p>
<pre><code class="conf">#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/tmp/php.socket",
                                   <strong class="highlight">"bin-path" => "/usr/bin/php-cgi"</strong>
                                 )
                               )
                            )</code></pre>
<p>Make sure you <strong class="highlight">uncomment the above lines</strong> by removing the &#8216;#&#8217; characters.</p>
<p>After you are done, <strong class="highlight">save the file</strong>. Time to try out the server.</p>
<h2>Starting the lighttpd Server</h2>
<p>First stop Apache if it is running&#8230;</p>
<pre><code class="cli">/etc/init.d/httpd stop</code></pre>
<p>Now start lighttpd using the command</p>
<pre><code class="cli">/etc/init.d/lighttpd start</code></pre>
<p>Go to your document root(<code>/var/www</code>) and <strong class="highlight">create a php files called &#8216;info.php&#8217; and put this code</strong> inside it&#8230;</p>
<pre><code class="php">&lt;?php
php<!-- wordpress bug workaround -->Info();</code></pre>
<p>Now fire up a browser and <strong class="highlight">go to <a href="http://localhost/" title="Might not work if the preceding instructions where not followed">localhost</a></strong> &#8211; you should see a file listing page with a ‘info.php’ in the list. Click on that link &#8211; if you see a PHP information page, your web server is setup correctly.</p>
<p>To make sure MySQL-PHP connection is working, <a href="http://www.bin-co.com/database/clients/phpmyadmin/installing_phpmyadmin.php" title="Installing phpMyAdmin 2.8">install phpMyAdmin</a> &#8211; or write a database connection script &#8211; whatever is easier for you.</p>
<h2>Related Links</h2>
<ul>
<li><a href="http://www.lighttpd.net/">lighttpd fly light</a></li>
<li><a href="http://en.wikipedia.org/wiki/Lighttpd">lighttpd &#8211; Wikipedia</a></li>
<li><a href="http://cssgallery.info/lighttpd-install-perl-mysql-support-in-chrooted-jail/">Lighttpd install perl, mysql support in chrooted jail</a></li>
<li><a href="http://www.cyberciti.biz/tips/lighttpd-php-fastcgi-configuration.html">Lighttpd PHP fastcgi configuration</a></li>
<li><a href="http://www.cyberciti.biz/tips/howto-install-lighttpd-on-freebsd.html">FreeBSD Install Lighttpd Web Server</a></li>
<li><a href="http://fandar-it.com/content/view/35/32/">Install lighttpd with php</a></li>
<li><a href="http://wiki.vpslink.com/Install_and_Configure_lighttpd">Install and Configure lighttpd</a></li>
<li><a href="http://www.howtoforge.com/lighttpd_php5_mysql_fedora7">Installing Lighttpd With PHP5 And MySQL Support On Fedora 7</a></li>
</ul>
<p><strong class="highlight">Shameless Plug</strong>: If you are a Linux user, you may want to check out my <a href="http://lindesk.com/" title="Lindesk - Linux on the Desktop">Linux Blog &#8211; LinDesk</a> &#8211; its about Linux on the Desktop &#8211; Articles, Application Reviews and Tutorials about many aspects of Linux included configuration and scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/11/installing-lighttpd-web-server-in-linux-with-php-and-mysql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Compile and Install a LAMP(Linux/Apache/MySQL/PHP) Server from Source</title>
		<link>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/</link>
		<comments>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 18:00:07 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=132</guid>
		<description><![CDATA[In the last post, I described the method to install a LAMP server using apt in debian. But in some occasions, we need the latest build of the software - then we have to install it from source.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/lava_lamp.jpg" alt="LAMP - Linux, Apache, MySQL, PHP" title="LAMP - Linux, Apache, MySQL, PHP" width="232" height="294" class="size-full wp-image-128 intro" align="right" /></p>
<p class="intro">In the last post, I described the method to <a href="http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/">install a LAMP server using apt in debian</a>. But in some occasions, we need the latest build of the software &#8211; then we have to install it from source.</p>
<p>Before installation, a few points to remember. These instruction are not for a production environment &#8211; this is for a development environment. Some of the commands(the <code>make install</code> commands) need root access. You can get that using this command <code>su -</code> and entering the root password at the prompt.</p>
<h2>Installing MySQL 5</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/mysql_logo.gif" alt="" title="MySQL Logo" width="150" height="98" class="alignnone size-full wp-image-127" align="right" /></p>
<p><strong class="highlight">Download MySQL source tarballs</strong> from <a href="http://dev.mysql.com/downloads/" class="external">MySQL.com</a>. Make sure that you have downloaded the latest releases. At the time of writing this, MySQL 5.0 was the latest. <strong class="highlight">Open a terminal</strong> and login as the root user. <strong class="highlight">Extract</strong> the source to some folder(say &#8216;/usr/src/mysql&#8217;).</p>
<pre><code class="cli"></code>$ mkdir /usr/src/mysql
$ cp mysql-VERSION.tar.gz /usr/src/mysql
$ cd /usr/src/mysql
$ gunzip &lt; mysql-VERSION.tar.gz | tar -xvf -
$ cd mysql-VERSION</code></pre>
<p>For added security we will create a <strong class="highlight">new user called &#8216;mysql&#8217;</strong> and use this user while running MySQL.</p>
<pre><code class="cli">$ groupadd mysql
$ useradd -g mysql mysql</code></pre>
<p>Now we will <strong class="highlight">compile and install MySQL</strong> &#8211; this will take some time.</p>
<pre><code class="cli">$ ./configure --prefix=/usr/local/mysql [add the necessary extra options here]
$ make
$ make install</code></pre>
<p>After installing, we have to <strong class="highlight">configure MySQL</strong>.</p>
<pre><code class="cli">$ cp support-files/my-medium.cnf /etc/my.cnf
$ cd /usr/local/mysql
$ bin/mysql_install_db --user=mysql
$ chown -R root  .
$ chown -R mysql lib
$ chgrp -R mysql .</code></pre>
<p>Start MySQL</p>
<pre><code class="cli">$ bin/mysqld_safe --user=mysql &amp;</code></pre>
<p>If all goes well, you will be able to <strong class="highlight">connect to the mysql server</strong> using some clients like <a href="http://www.phpmyadmin.net/home_page/" class="external">phpMyAdmin</a> or <a href="http://www.mysqlfront.de/" class="external">MySQL Frontend</a>. For testing we will use the command line client provided with MySQL. In terminal type&#8230;</p>
<pre><code class="cli">$ mysql</code></pre>
<p>Now you should see <strong class="highlight">mysql command shell</strong> &#8211; something like this&#8230;</p>
<pre><code class="cli">Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.21-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql&lt;</code></pre>
<p>Here you can <strong class="highlight">run SQL command</strong> and see the returned results. Try some out&#8230;</p>
<pre><code class="mysql">SHOW DATABASES;</code></pre>
<p>That&#8217;s it &#8211; we have installed MySQL. You can <strong class="highlight">start the server</strong> using the command</p>
<pre><code class="cli">cd /usr/local/mysql ; bin/mysqld_safe --user=mysql &amp;</code></pre>
<p>If <strong class="highlight">anything went wrong</strong>, cry for sometime and then <strong class="highlight">consult the documentation</strong>.</p>
<h2>Installing Apache 2</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/apache.png" alt="" title="Apache Logo" width="230" height="90" class="alignnone size-full wp-image-126" style="right" /></p>
<p>Same as in MySQL, download the source from <a href="http://httpd.apache.org/download.cgi" class="external">Apache.org</a>. Extract to /usr/src/httpd.</p>
<pre><code class="cli">$ mkdir /usr/src/httpd
$ cp httpd-VERSION.tar.gz /usr/src/httpd
$ cd /usr/src/httpd
$ gunzip &lt; httpd-VERSION.tar.gz | tar -xvf -
$ cd httpd-VERSION</code></pre>
<p>Compile and Install&#8230;</p>
<pre><code class="cli">$ ./configure --prefix=/usr/local/apache2 [add extra options here]
$ make
$ make install</code></pre>
<p>The configure command I used is given below &#8211; you can change it if you feel like it.</p>
<pre><code class="cli">./configure --prefix=/usr/local/apache2 --enable-mime-magic --enable-expires \
--enable-headers --enable-ssl --enable-http --enable-info --enable-dir \
--enable-rewrite --enable-so</code></pre>
<p>We will hold off configuration of Apache until after the PHP installation.</p>
<h2>Installing PHP 5</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/php-logo.png" alt="" title="PHP Logo Custom" width="179" height="98" class="alignnone size-full wp-image-123" align="right" /></p>
<p>You know the drill &#8211; <strong class="highlight"><a href="http://www.php.net/downloads.php">download PHP 5</a>, extract to /usr/src/php5</strong>.</p>
<pre><code class="cli">$ mkdir /usr/src/php5
$ cp php-VERSION.tar.gz /usr/src/php5
$ cd /usr/src/php5
$ gunzip &lt; php-VERSION.tar.gz | tar -xvf -
$ cd php-VERSION</code></pre>
<p>Building PHP is a little more complicated than the other two. PHP have a lot of options, and must be customized according to your needs. You can see all the available configurations by running the command <code>./configure --help</code>. If you require more information about this, take a look at <a href="http://www.php.net/manual/en/configure.php" class="external">PHP documentation on <code>configure</code></a>.</p>
<p>My requirements may not match yours &#8211; some you have to make your own decisions here. I am providing the most basic configuration for the build&#8230;</p>
<pre><code class="cli">./configure \
--prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=shared,/usr/local/mysql [add your options here]</code></pre>
<p>You can add all your configuration to this line. The &#8211;with-apxs2 lines tells the installer where to find Apache2 executables and the &#8211;with-mysql configuration is the location of the mysql libraries. These two lines are a must.</p>
<p>This is the actual command I used&#8230;</p>
<pre><code class="cli">./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=shared,/usr/local/mysql --with-zlib --with-gettext --with-gdbm --with-sqlite</code></pre>
<p>Now to install the language&#8230;</p>
<pre><code class="cli">$ ./configure \
$ --prefix=/usr/local/php5 \
$ --with-apxs2=/usr/local/apache2/bin/apxs \
$ --with-mysql=shared,/usr/local/mysql [add your options here]
$ make
$ make install</code></pre>
<p>Now copy the php.ini file to the necessary location&#8230;</p>
<pre><code class="cli">cp php.ini-dist /usr/local/php5/lib</code></pre>
<p>Wonderful! Now we have everything we need &#8211; we just have to configure it.</p>
<h2>Configuring Apache</h2>
<p>The <strong class="highlight">Apache can be configured by editing a single text file</strong>. This file is usually located in <code>Apache_folder/conf/httpd.conf</code>. In our case this will be <code>/usr/local/apache2/conf/httpd.conf</code> . Open this file in you favorite text editor and change the following lines. Please note that some lines may be different in you apache configuration file &#8211; so if you can&#8217;t find the line when you search with the full line, try to find the line using just the identifier. For example, if you can&#8217;t find the text &#8216;<code>DocumentRoot "/usr/local/apache2/htdocs"</code>&#8216; in your httpd.conf file, search for the text &#8216;<code>DocumentRoot</code>&#8216;.</p>
<h3>Configuration Options</h3>
<p>You may want to change the document root &#8211; replace the line</p>
<pre><code>DocumentRoot "/usr/local/apache2/htdocs"</code></pre>
<p>With</p>
<pre><code>DocumentRoot "/var/www/htdocs" # Or whatever folder you want to set as the document root.</code></pre>
<p>Also change the line</p>
<pre><code>&lt;Directory "/usr/local/apache2/htdocs"&gt;</code></pre>
<p>to</p>
<pre><code>&lt;Directory "/var/www/htdocs"&gt;</code></pre>
<p>I don&#8217;t have to tell you that you can use any directory you want &#8211; you don&#8217;t have to use &#8216;/var/www/htdocs&#8217; just because I use it. If you are using another directory, make sure that you change both the above given lines to that directory.</p>
<p>If you want to use .htaccess file to configure different folders, find the line</p>
<pre><code>AllowOverride None</code></pre>
<p>inside the <code>&lt;Directory "/usr/local/apache2/htdocs"&gt; ... &lt;/Directory&gt;</code> tag and change it to </p>
<pre><code>AllowOverride All</code></pre>
<p>Since we are using PHP, and want to use index.php as the default page in a directory, we have to set that configuration option. Find the line </p>
<pre><code>DirectoryIndex index.html index.html.var</code></pre>
<p>and replace it with, say,</p>
<pre><code>DirectoryIndex index.php index.html index.html.var</code></pre>
<p>This will make sure that the index.php will be called when you try to access a directory. For example, if you try to access, say, http://localhost/ you will get a file listing. But if you put a file named &#8216;index.php&#8217; in this folder, the server will open this file when someone accesses &#8216;http://localhost/&#8217;. The order of the names are important. If there is a file called &#8216;index.php&#8217; and a file called &#8216;index.html&#8217; in the same folder, the first one(in our case index.php) will be opened.</p>
<p>Now we must associate all files with the extension &#8216;php&#8217; with the PHP scripts handler. For this find the line</p>
<pre><code>AddHandler type-map var</code></pre>
<p>and add the following line below that line &#8211; like this</p>
<pre><code>AddHandler type-map var
AddHandler php5-script	php</code></pre>
<p>Below that there is a AddType section. Add the following line to this section.</p>
<pre><code>AddType application/x-httpd-php .php</code></pre>
<h2>Start the Server</h2>
<p>You can test your installation by starting your server. Open a terminal and run the following command.</p>
<pre><code class="cli">/usr/local/apache2/bin/apachectl start</code></pre>
<p>Go to your document root(<code>/var/www/htdocs</code>) and create a php file called &#8216;info.php&#8217; and put this code inside it&#8230;</p>
<pre><code class="php">&lt;?php
php<!-- wp bugfix -->info();

</code></pre>
<p>Now open a browser and try to access <a href="http://localhost/">http://localhost/</a> &#8211; you should see a file listing page with a &#8216;info.php&#8217; in the list. Click on that link &#8211; if you see a PHP information page, your web server is setup correctly.</p>
<p>To make sure MySQL-PHP connection is working, <a href="http://www.bin-co.com/database/clients/phpmyadmin/installing_phpmyadmin.php">install phpMyAdmin</a> &#8211; or write a database connection script &#8211; whatever is easier for you.</p>
<p><strong class="highlight">Shameless Plug</strong>: If you are a Linux user, you may want to check out my <a href="http://lindesk.com/">Linux Blog &#8211; LinDesk</a> &#8211; its about Linux on the Desktop &#8211; Articles, Application Reviews and Tutorials about many aspects of Linux included configuration and scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/09/compile-install-lamp-linux-apache-mysql-php-server-from-source/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Installing LAMP(Apache Web Server/PHP/MySQL) in Debian/Ubuntu</title>
		<link>http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/</link>
		<comments>http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 19:10:07 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=125</guid>
		<description><![CDATA[Installing the <abbr title="Linux Apache MySQL PHP">LAMP</abbr> environment on a Linux system is easy if you are comfortable with using the native package management software. If you on a Red Hat/Fedora/CentOS system, that will be yum - and for Debian/Ubuntu systems, that will be apt. This tutorial shows you how to install Apache 2, PHP 5 and MySQL 5 in Debian using apt.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/lava_lamp.jpg" alt="LAMP - Linux, Apache, MySQL, PHP" title="Lamp" width="232" height="294" class="size-full wp-image-128 intro" align="right" /></p>
<p class="intro">Installing the <abbr title="Linux Apache MySQL PHP">LAMP</abbr> environment on a Linux system is easy if you are comfortable with using the native package management software. If you on a Red Hat/Fedora/CentOS system, that will be yum &#8211; and for Debian/Ubuntu systems, that will be apt. This tutorial shows you how to install Apache 2, PHP 5 and MySQL 5 in Debian using apt.</p>
<p>Before installation, a few points to remember. These instruction are not for a production environment &#8211; this is for a development environment. To install the software, you need root access. You can get that using this command&#8230;</p>
<pre><code class="cli">su -
[Enter root password]</code></pre>
<h2>Installing Apache 2</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/apache.png" alt="" title="Apache Logo" width="230" height="90" class="alignnone size-full wp-image-126" align="right" /></p>
<p>Use this command to install Apache 2.</p>
<pre><code class="javascript">apt-get install apache2</code></pre>
<p>Make sure you specify &#8216;apache2&#8242; &#8211; or else, apache 1.3 will be installed.</p>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/php-logo.png" alt="PHP Logo" title="PHP Logo" width="179" height="98" class="alignnone size-full wp-image-123" align="right" /></p>
<h2>Install PHP 5</h2>
<p>Now, install the PHP 5 packages&#8230;</p>
<pre><code class="javascript">apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi</code></pre>
<p>No go to the folder <code>/etc/apache2/sites-enabled/</code> and edit the file in that directory(usually 000-default). Find the line that says<br />
<code>RedirectMatch ^/$ /apache2-default/</code><br />
and remove it.</p>
<p>Now your document root is <code>/var/www/</code> &#8211; place all your HTML documents and scripts in this folder. If you want to make some other configuration changes, edit the configuration files at <code>/etc/apache2/apache2.conf</code></p>
<p>I also had to make the following changes&#8230;</p>
<ul>
<li>Changed the owner of <code>/var/log/apache2</code> to www-data &#8211; I used the command <code>chown www-data:www-data apache2</code></li>
<li>Created an empty file at <code>/etc/apache2/httpd.conf</code></li>
</ul>
<p>This was to fix a few errors I saw on my system &#8211; you may not have to do it.</p>
<h2>Install MySQL</h2>
<p><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/09/mysql_logo.gif" alt="" title="MySQL Logo" width="150" height="98" class="alignnone size-full wp-image-127" align="right" /></p>
<p>This is the command to install MySQL server, its client and PHP&#8217;s MySQL libraries&#8230;</p>
<pre><code class="javascript">apt-get install mysql-client mysql-common mysql-server php5-mysql</code></pre>
<p>Finally, Install the other packages you need as well</p>
<pre><code class="javascript">apt-get install php5-sqlite php5-gd ...</code></pre>
<h2>Testing the System</h2>
<p>Go to your document root(<code>/var/www</code>) and create a php files called &#8216;info.php&#8217; and put this code inside that&#8230;</p>
<pre><code class="php">&lt;?php
php<!-- PHP bug -->info();

</code></pre>
<h3>Start the Servers</h3>
<p>First, turn on the MySQL database server&#8230;</p>
<pre><code class="javascript">/etc/init.d/mysql start</code></pre>
<p>Then, start the Apache Web Server&#8230;</p>
<pre><code class="javascript">/etc/init.d/apache2 start</code></pre>
<p>Now fire up a browser and go to <a href="http://localhost/">localhost</a> &#8211; you should see a file listing page with a &#8216;info.php&#8217; in the list. Click on that link &#8211; if you see a PHP information page, your web server is setup correctly.</p>
<p>To make sure MySQL-PHP connection is working, <a href="http://www.bin-co.com/database/clients/phpmyadmin/installing_phpmyadmin.php">install phpMyAdmin</a> &#8211; or write a database connection script &#8211; whatever is easier for you.</p>
<h2>Related Links</h2>
<ul>
<li><a href="http://www.thegeekstuff.com/2008/09/how-to-install-or-upgrade-lamp-apache-mysql-and-php-stack-on-linux-using-yum/">How To Install Or Upgrade LAMP: Linux, Apache, MySQL and PHP Stack Using Yum</a></li>
<li><a href="http://www.debianadmin.com/apache2-installation-and-configuration-with-php-support-in-debian-linux.html">Apache2 installation and configuration with php support</a></li>
<li><a href="http://www.debianadmin.com/install-and-configure-apache2-with-php5-and-ssl-support-in-debian-etch.html">Install and Configure Apache2 with PHP5 and SSL Support in Debian Etch</a></li>
<li><a href="http://www.adobe.com/devnet/dreamweaver/articles/lamp.html">Setting Up Your PHP Server Environment Using Linux, Apache, MySQL, and PHP</a></li>
<li><a href="http://www.mysql-apache-php.com/">Quick Linux Server w/ Apache+PHP+MySQL</a></li>
<li><a href="http://www.debianhelp.co.uk/lamp.htm">LAMP (Linux Apache Mysql PHP) Configuration and Installing in Debian</a></li>
<li><a href="http://lamphowto.com/">HOWTO: Installing MySQL and Apache with PHP support on Linux</a></li>
<li><a href="http://www.kewanshunn.com/articles/how_to_install_apache2,_php5,_mysql5_on_redhat/3.html">How to install Apache2, PHP5, MySQL5 on RedHat</a></li>
</ul>
<p><strong>Shameless Plug</strong>: If you are a Linux user, you may want to check out my <a href="http://lindesk.com/">Linux Blog &#8211; LinDesk</a> &#8211; its about Linux on the Desktop &#8211; Articles, Application Reviews and Tutorials about many aspects of Linux included configuration and scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/09/installing-lampapache-web-serverphpmysql-in-debian/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Firefox 3 &#8211; World Record and Downed Servers</title>
		<link>http://www.bin-co.com/blog/2008/06/firefox-3-world-record-and-downed-servers/</link>
		<comments>http://www.bin-co.com/blog/2008/06/firefox-3-world-record-and-downed-servers/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 17:43:10 +0000</pubDate>
		<dc:creator>Binny V A</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[site]]></category>

		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=113</guid>
		<description><![CDATA[As many others from around the web, I too am waiting for the latest iteration of the Firefox browser &#8211; Firefox 3. And again, like many others, I too am participating in the World Record attempt. Unfortunately, even though the release time is upon us, I cannot download the software &#8211; because their server is [...]]]></description>
			<content:encoded><![CDATA[<p class="intro">As <a href="http://www.cyberciti.biz/tips/firefox-3-set-to-release-on-june-17th-2008.html">many</a> <a href="http://www.openjs.com/articles/firefox/javascript_updates_firefox3.php">others</a> from around the web, I too am waiting for the latest iteration of the Firefox browser &#8211; Firefox 3. And again, <a href="http://www.techzilo.com/download-mozilla-firefox-3-final/">like</a> <a href="http://www.nirmaltv.com/2008/06/17/download-firefox-3/">many</a> <a href="http://www.labnol.org/software/download/download-firefox-3-exact-time-world-map/3595/">others</a>, I too am participating in the <a href="http://www.spreadfirefox.com/worldrecord">World Record attempt</a>. Unfortunately, even though the release time is upon us, I cannot download the software &#8211; because <strong class="highlight">their server is down</strong>!</p>
<p><a href='http://www.bin-co.com/blog/wp-content/uploads/2008/06/mozilla_firefox_outage.png'><img src="http://www.bin-co.com/blog/wp-content/uploads/2008/06/mozilla_firefox_outage.png" alt="" title="Mozilla Firefox Site Outage" width="500" height="219" class="alignnone size-full wp-image-114" /></a></p>
<p>As a linux user, I have come to expect the fact that servers will collapse when a new version of a distro is released. But those are big files that are transferred(the linux images will be anywhere between 600 MB to 4 GB). But in case of firefox, a 8 MB file managed to bring top servers to their knees. A testament to the popularity of firefox &#8211; although <strong class="highlight">I wish mozilla had more mirrors.</strong></p>
<p>If you cannot wait to get the latest version, get it from <a href="ftp://ftp.mozilla.org/pub/firefox/releases/3.0/">their FTP servers</a> &#8211; they are functioning normally. But, <strong class="highlight">those downloads will NOT BE COUNTED in the final tally for the world record</strong>.</p>
<h2>Related Links</h2>
<ul>
<li><a href="http://www.dria.org/wordpress/archives/2008/06/12/655/">Field Guide to Firefox 3</a></li>
<li><a href="http://www.labnol.org/software/download/download-firefox-3-mozilla-ftp-servers/3603/">Firefox 3 Available for Download on Mozilla FTP and Web Servers</a></li>
<li><a href="http://developer.mozilla.org/devnews/index.php/2008/06/11/coming-tuesday-june-17th-firefox-3/">Coming Tuesday, June 17th: Firefox 3</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bin-co.com/blog/2008/06/firefox-3-world-record-and-downed-servers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
