Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Ad icon
QA Engineer Intern
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Tips & Tricks
Tips & Tricks Collection of DC
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="||~DxxCxxxx~||" data-source="post: 3691642" data-attributes="member: 137393"><p><strong>Deploying LAMPS for your web development</strong></p><p></p><p><strong><img src="http://bp3.blogger.com/_jIiofsB0x98/SFAoayEWAcI/AAAAAAAAACc/07f-XcfvWmM/s400/tux.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Introduction</strong> </p><p> </p><p>This document will teach you to set up and configure a LAMP system for web development. </p><p> </p><p> </p><p><strong>Why LAMP?</strong> </p><p> </p><p><strong>LAMP</strong> [Linux, Apache, MySQL, PHP] refers to a set of software tools that allow for rapid development and deployment of sophisticated, robust web applications of all sorts. </p><p> </p><p>All components of LAMP can be downloaded and used for free. This helps a lots in cost savings, which is why so many large organizations are moving to Linux and other open source solutions for a variety of projects. </p><p> </p><p>Although LAMP components are provided with non-profit making, there’s still a surprisingly extensive support network for all LAMP components. There are literally millions of LAMP users who congregate in online communities like onlamp.com/ to help each other get the most out of LAMP. Training is available from a wide array of providers, and many consulting firms offer advanced capabilities for those businesses that require sophisticated LAMP development. </p><p> </p><p>Perhaps most importantly, LAMP works well. Its component technologies offer tremendous flexibility, rapid development, high performance, and fewer security and stability problems than many far-costlier proprietary solutions. </p><p> </p><p> </p><p><strong>The Components of LAMP</strong> </p><p> </p><p><strong>Linux</strong> </p><p>An operating system most often used to run servers, Linux is a lean performer that can run quite well even on older hardware (such as an old Pentium II). </p><p> </p><p><strong>Apache</strong> </p><p>The most widely used web server software in the world , Apache can be run on a variety of operating systems, including AIX, Digital UNIX, FreeBSD, Irix, Mac OS X, Netware, OpenBSD, Solaris, SunOS, Windows, and of course, Linux. Apache's security record is far better than that of Microsoft IIS. </p><p> </p><p><strong>MySQL</strong> </p><p>This databasee was built with the attitude that a web database should be lean and fast. It doesn't incorporate the diverse array of application server features that Oracle and Microsoft database tools do, instead focusing on core performance and leaving enhanced functions to scripting languages. MySQL runs on a variety of operating systems, including AIX, FreeBSD, Mac OS X, Solaris, Windows, and Linux. It is well known for its reliability. </p><p> </p><p><strong>PHP</strong> </p><p>Developed from the ground up as a web developer's language, PHP is easy to use and executes very quickly. Skilled developers can use PHP to build everything from online forms to complex database-driven web applications. PHP is extremely popular, runs on a variety of operating systems, and is most often used in conjunction with MySQL. </p><p> </p><p> </p><p><strong>Before Installation</strong> </p><p> </p><p>Assumed that you have the Linux installed. </p><p> </p><p>Make sure you have downloaded all the relevant software: </p><p> </p><p>(1) The latest binary version of MySQL (currently MySQL 4.1.3-beta), available from MySQL.com </p><p>(2) The latest version of PHP (currently PHP 5.0.0), from Php.net </p><p>(3) The latest version of Apache 2 (currently Apache 2.0.50), from Apache.org </p><p> </p><p>Copy all of these to your /tmp directory and decompress them as follows: </p><p> </p><p><strong>$ cd /tmp </strong></p><p><strong>$ tar -xzvf mysql-standard-4.1.3-beta-pc-linux-i686.tar.gz </strong></p><p><strong>$ tar -xzvf php-5.0.0.tar.gz </strong></p><p><strong>$ tar -xzvf httpd-2.0.50.tar.gz</strong> </p><p> </p><p><strong>MySQL server installation</strong> </p><p> </p><p>Detailed installation instructions for MySQL are provided in the download archive, but here's a fast recap: </p><p> </p><p>Move the decompressed MySQL archive to /usr/local/mysql: </p><p> </p><p><strong>$ mv /tmp/mysql-standard-4.1.3-beta-pc-linux-i686 /usr/local/mysql</strong> </p><p> </p><p>Create a user and group for MySQL: </p><p> </p><p><strong>$ groupadd mysql </strong></p><p><strong>$ useradd -g mysql mysql</strong> </p><p> </p><p>Initialize the MySQL grant tables with the provided mysql_install_db script: </p><p> </p><p><strong>$ /usr/local/mysql/scripts/mysql_install_db --user=mysql [/output]</strong> </p><p> </p><p>Give the MySQL user rights to the MySQL directory: </p><p> </p><p><strong>$ chown -R root?/usr/local/mysqll </strong></p><p><strong>$ chgrp -R mysql /usr/local/mysql </strong></p><p><strong>$ chown -R mysql /usr/local/mysql/data</strong> </p><p> </p><p>Start the MySQL server: </p><p> </p><p><strong>$ /usr/local/mysql/support-files/ mysql.server start [/output]</strong> </p><p> </p><p>At this point, also check to make sure that the MySQL server socket has been created in /tmp it usually has a name like mysql.sock. </p><p> </p><p> </p><p><strong>Administering your MySQL Database</strong> </p><p> </p><p>Once the MySQL server is installed successfully, most of the users would not like to administer their database with the command line. I definitely understand this and for those users who do not like to use command line, I suggest you to get a MySQL administration GUI, one of the available GUI in the markets with relatively lower cost is Navicat. If you would like to adopt a free tool, MySQL administrator provided by MySQL Ab is also a good alternative. I personally use Navicat for its simplicity and also for its speed. Navicat allows you to edit your data directly and one of the feature I like so much is that it allows me to test running for queries before actually putting it into the php scripts! J Navicat also has other features like backups, schedulers which is necessary for good database maintenance. Some features which I haven’t tested it out is its Reporting functions. I believe it will be useful for those need to generate reports for their data. For more information, please visit <a href="http://www.navicat.com/" target="_blank">http://www.navicat.com/</a>. </p><p> </p><p> </p><p><strong>Apache server + PHP installation</strong> </p><p> </p><p>There are two ways of using PHP with Apache: as a dynamic module that can be loaded into the Web server at run-time, or as a static module that is directly compiled into the Web server code. For this tutorial, I'm going with the first option. </p><p> </p><p>To enable dynamic loading of PHP as an Apache 2.0 module, the Apache server must be compiled with Dynamic Shared Object (DSO) support. This feature can be enabled by passing the --enable-so option to the Apache 2.0 configure script: </p><p> </p><p><strong>$ cd /tmp/httpd-2.0.50 </strong></p><p><strong>$ ./configure --prefix=/usr/local/apache2 --enable-so </strong></p><p><strong>$ make && make install</strong> </p><p> </p><p>This should configure, compile, and install the server to /usr/local/apache2. </p><p> </p><p> </p><p><strong>Installing PHP</strong> </p><p> </p><p>With both MySQL and Apache installed, the final step is to compile and install PHP. The most important step in this process involves providing the PHP configure script with a list of extensions to activate, as well as the correct file paths for the external libraries needed. </p><p> </p><p>This might look complicated, but it's really not: <ul> <li data-xf-list-type="ul">The --prefix argument sets the installation path for the PHP 5.0 binaries.</li> <li data-xf-list-type="ul">The --with-apxs2 argument tells PHP where to find Apache 2.0 and its apxs script (used to handle extensions).</li> <li data-xf-list-type="ul">The --with-libxml-dir and --with-zlib-dir arguments tell PHP where to locate the libxml2 and zlib libraries. Note that you need to use these options only if you compiled and installed the libraries yourself; if you're using your distribution's default libraries, PHP should be able to find them automatically.</li> <li data-xf-list-type="ul">The --with-mysql argument activates the regular MySQL extension. Note that in PHP 5.0, this is not active by default (as it was in PHP 4.0) and must be explicitly named in configure to be activated.</li> <li data-xf-list-type="ul">The --with-mysqli argument activates the new MySQL Improved extension (for MySQL 4.1.2+ only), and must point to the mysql_config script that comes with MySQL 4.x.</li> <li data-xf-list-type="ul">The --with-gd argument activates the GD extension for dynamic image creation.</li> <li data-xf-list-type="ul">The --with-zlib argument activates the ZLIB compression library for on-the-fly data compression.</li> <li data-xf-list-type="ul">The --enable-sockets argument activates socket communication features.</li> <li data-xf-list-type="ul">The --enable-soap argument activates support for SOAP and Web services.</li> </ul><p>A number of other options and extensions are also possible </p><p> </p><p><strong>$ ./configure –help</strong> for a complete list. </p><p> </p><p>Once the configure script finishes processing, you can compile and install PHP. </p><p> </p><p><strong>$ make </strong></p><p><strong>$ make install</strong> </p><p> </p><p>Note that the installation process is intelligent enough to place the PHP module in the correct directory for Apache 2.0 to find it. </p><p> </p><p> </p><p><strong>Configuring and testing Apache with PHP</strong> </p><p> </p><p>The final step consists of configuring Apache to recognize PHP scripts and then hand them over to the PHP interpreter for processing. To do this, edit the Apache configuration file, /usr/local/apache2/conf/httpd.conf, and add the following line to it: </p><p> </p><p><strong>AddType application/x-httpd-php .php</strong> </p><p> </p><p>Save the file and then start the server: </p><p> </p><p><strong>$ /usr/local/apache2/bin/apachectl start [/output]</strong> </p><p> </p><p>You can now test whether all is working as it should by creating a simple test script in the server's document root: /usr/local/apache2/htdocs/. </p><p> </p><p>Name the script test.php, and populate it with these lines: </p><p> </p><p><strong><?php </strong></p><p><strong>phpinfo(); </strong></p><p><strong>?></strong> </p><p> </p><p>Save the file and then point your browser to <a href="http://localhost/test.php" target="_blank">http://localhost/test.php</a>. </p><p> </p><p>You should be able to see a page with the details on your Server environments. </p><p> </p><p> </p><p><strong>Conclusion</strong> </p><p> </p><p>With LAMP properly set up, you should be able to build your web site in a stable, reliable and efficient environment. Deploying LAMP system has substantial advantages, and these will be recognized by more and more people with time.</p></blockquote><p></p>
[QUOTE="||~DxxCxxxx~||, post: 3691642, member: 137393"] [b]Deploying LAMPS for your web development[/b] [B][IMG]http://bp3.blogger.com/_jIiofsB0x98/SFAoayEWAcI/AAAAAAAAACc/07f-XcfvWmM/s400/tux.jpg[/IMG] Introduction[/B] This document will teach you to set up and configure a LAMP system for web development. [B]Why LAMP?[/B] [B]LAMP[/B] [Linux, Apache, MySQL, PHP] refers to a set of software tools that allow for rapid development and deployment of sophisticated, robust web applications of all sorts. All components of LAMP can be downloaded and used for free. This helps a lots in cost savings, which is why so many large organizations are moving to Linux and other open source solutions for a variety of projects. Although LAMP components are provided with non-profit making, there’s still a surprisingly extensive support network for all LAMP components. There are literally millions of LAMP users who congregate in online communities like onlamp.com/ to help each other get the most out of LAMP. Training is available from a wide array of providers, and many consulting firms offer advanced capabilities for those businesses that require sophisticated LAMP development. Perhaps most importantly, LAMP works well. Its component technologies offer tremendous flexibility, rapid development, high performance, and fewer security and stability problems than many far-costlier proprietary solutions. [B]The Components of LAMP[/B] [B]Linux[/B] An operating system most often used to run servers, Linux is a lean performer that can run quite well even on older hardware (such as an old Pentium II). [B]Apache[/B] The most widely used web server software in the world , Apache can be run on a variety of operating systems, including AIX, Digital UNIX, FreeBSD, Irix, Mac OS X, Netware, OpenBSD, Solaris, SunOS, Windows, and of course, Linux. Apache's security record is far better than that of Microsoft IIS. [B]MySQL[/B] This databasee was built with the attitude that a web database should be lean and fast. It doesn't incorporate the diverse array of application server features that Oracle and Microsoft database tools do, instead focusing on core performance and leaving enhanced functions to scripting languages. MySQL runs on a variety of operating systems, including AIX, FreeBSD, Mac OS X, Solaris, Windows, and Linux. It is well known for its reliability. [B]PHP[/B] Developed from the ground up as a web developer's language, PHP is easy to use and executes very quickly. Skilled developers can use PHP to build everything from online forms to complex database-driven web applications. PHP is extremely popular, runs on a variety of operating systems, and is most often used in conjunction with MySQL. [B]Before Installation[/B] Assumed that you have the Linux installed. Make sure you have downloaded all the relevant software: (1) The latest binary version of MySQL (currently MySQL 4.1.3-beta), available from MySQL.com (2) The latest version of PHP (currently PHP 5.0.0), from Php.net (3) The latest version of Apache 2 (currently Apache 2.0.50), from Apache.org Copy all of these to your /tmp directory and decompress them as follows: [B]$ cd /tmp $ tar -xzvf mysql-standard-4.1.3-beta-pc-linux-i686.tar.gz $ tar -xzvf php-5.0.0.tar.gz $ tar -xzvf httpd-2.0.50.tar.gz[/B] [B]MySQL server installation[/B] Detailed installation instructions for MySQL are provided in the download archive, but here's a fast recap: Move the decompressed MySQL archive to /usr/local/mysql: [B]$ mv /tmp/mysql-standard-4.1.3-beta-pc-linux-i686 /usr/local/mysql[/B] Create a user and group for MySQL: [B]$ groupadd mysql $ useradd -g mysql mysql[/B] Initialize the MySQL grant tables with the provided mysql_install_db script: [B]$ /usr/local/mysql/scripts/mysql_install_db --user=mysql [/output][/B] Give the MySQL user rights to the MySQL directory: [B]$ chown -R root?/usr/local/mysqll $ chgrp -R mysql /usr/local/mysql $ chown -R mysql /usr/local/mysql/data[/B] Start the MySQL server: [B]$ /usr/local/mysql/support-files/ mysql.server start [/output][/B] At this point, also check to make sure that the MySQL server socket has been created in /tmp it usually has a name like mysql.sock. [B]Administering your MySQL Database[/B] Once the MySQL server is installed successfully, most of the users would not like to administer their database with the command line. I definitely understand this and for those users who do not like to use command line, I suggest you to get a MySQL administration GUI, one of the available GUI in the markets with relatively lower cost is Navicat. If you would like to adopt a free tool, MySQL administrator provided by MySQL Ab is also a good alternative. I personally use Navicat for its simplicity and also for its speed. Navicat allows you to edit your data directly and one of the feature I like so much is that it allows me to test running for queries before actually putting it into the php scripts! J Navicat also has other features like backups, schedulers which is necessary for good database maintenance. Some features which I haven’t tested it out is its Reporting functions. I believe it will be useful for those need to generate reports for their data. For more information, please visit [URL="http://www.navicat.com/"]http://www.navicat.com/[/URL]. [B]Apache server + PHP installation[/B] There are two ways of using PHP with Apache: as a dynamic module that can be loaded into the Web server at run-time, or as a static module that is directly compiled into the Web server code. For this tutorial, I'm going with the first option. To enable dynamic loading of PHP as an Apache 2.0 module, the Apache server must be compiled with Dynamic Shared Object (DSO) support. This feature can be enabled by passing the --enable-so option to the Apache 2.0 configure script: [B]$ cd /tmp/httpd-2.0.50 $ ./configure --prefix=/usr/local/apache2 --enable-so $ make && make install[/B] This should configure, compile, and install the server to /usr/local/apache2. [B]Installing PHP[/B] With both MySQL and Apache installed, the final step is to compile and install PHP. The most important step in this process involves providing the PHP configure script with a list of extensions to activate, as well as the correct file paths for the external libraries needed. This might look complicated, but it's really not:[LIST] [*]The --prefix argument sets the installation path for the PHP 5.0 binaries. [*]The --with-apxs2 argument tells PHP where to find Apache 2.0 and its apxs script (used to handle extensions). [*]The --with-libxml-dir and --with-zlib-dir arguments tell PHP where to locate the libxml2 and zlib libraries. Note that you need to use these options only if you compiled and installed the libraries yourself; if you're using your distribution's default libraries, PHP should be able to find them automatically. [*]The --with-mysql argument activates the regular MySQL extension. Note that in PHP 5.0, this is not active by default (as it was in PHP 4.0) and must be explicitly named in configure to be activated. [*]The --with-mysqli argument activates the new MySQL Improved extension (for MySQL 4.1.2+ only), and must point to the mysql_config script that comes with MySQL 4.x. [*]The --with-gd argument activates the GD extension for dynamic image creation. [*]The --with-zlib argument activates the ZLIB compression library for on-the-fly data compression. [*]The --enable-sockets argument activates socket communication features. [*]The --enable-soap argument activates support for SOAP and Web services.[/LIST]A number of other options and extensions are also possible [B]$ ./configure –help[/B] for a complete list. Once the configure script finishes processing, you can compile and install PHP. [B]$ make $ make install[/B] Note that the installation process is intelligent enough to place the PHP module in the correct directory for Apache 2.0 to find it. [B]Configuring and testing Apache with PHP[/B] The final step consists of configuring Apache to recognize PHP scripts and then hand them over to the PHP interpreter for processing. To do this, edit the Apache configuration file, /usr/local/apache2/conf/httpd.conf, and add the following line to it: [B]AddType application/x-httpd-php .php[/B] Save the file and then start the server: [B]$ /usr/local/apache2/bin/apachectl start [/output][/B] You can now test whether all is working as it should by creating a simple test script in the server's document root: /usr/local/apache2/htdocs/. Name the script test.php, and populate it with these lines: [B]<?php phpinfo(); ?>[/B] Save the file and then point your browser to [URL="http://localhost/test.php"]http://localhost/test.php[/URL]. You should be able to see a page with the details on your Server environments. [B]Conclusion[/B] With LAMP properly set up, you should be able to build your web site in a stable, reliable and efficient environment. Deploying LAMP system has substantial advantages, and these will be recognized by more and more people with time. [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom