About site: Programming/Languages/PHP/Tutorials - Installing Apache, MySQL, and PHP on Linux
Return to Computers also Computers
  About site: http://www.hostlibrary.com/installing_apache_mysql_php_on_linux

Title: Programming/Languages/PHP/Tutorials - Installing Apache, MySQL, and PHP on Linux This tutorial is designed to guide through the initial steps of setting up Apache, MySQL, and PHP on Linux.
Articulate_Solutions_Partnership AutoCAD add-on for stage design, including truss and lights placement, weight loads checking, and equipment list creation.

AWinstall Professional installation development system for creating small setups. Provides built-in support for user interaction elements: license screens, logos, required and optional setup tasks. Product spec

Ransen\'s_ObjectARX_Course A multimedia based tutorial on programming ObjectARX on CD-ROM, with three of 20 chapters downloadable as a demo.

Nexacom Offers a service for customers to send mail to recipients who don't have email or where a letter is required.

Hotlink Supplier of coin operated internet pay stations with secure software. Used in many backpackers hostels, hotels, motels troughout New Zealand.

Net_Ready__Strategies_for_Success_in_the_E-Conomy McGraw-Hill: This book by Amir Hartman and John Sifonis (of Cisco's Internet Business Solutions Group) and freelance writer John Kador describes the Cisco "E-Conomy" business model. (January, 2


  Alexa statistic for http://www.hostlibrary.com/installing_apache_mysql_php_on_linux





Get your Google PageRank






Please visit: http://www.hostlibrary.com/installing_apache_mysql_php_on_linux


  Related sites for http://www.hostlibrary.com/installing_apache_mysql_php_on_linux
    Embedded_Systems_VxWorks_VoIP Embedded systems, VxWorks, voice VoIP integrated sources.
    Physis Physis is a software platform for testing the evolvability of different assembly-like programming languages.
    BurningBulb Provides web hosting and web site design.
    ECHO_-_Embedded_Component_Historian_Object Builds high speed historians (100,000+ values per second) for archiving time series data in Windows applications. By OSIsoft. [Control, Commercial]
    Ancodia_software Developer of shareware for Macintosh and Windows, products are Iconeer, Power Contact, Account Buddy, PICStation, Cleaning Agent,and SoDA.
    Crossland,_Jonathan Author of Professional Windows DNA and VB.NET titles carries his own webpages and weblog. Architecture and Design, refactoring, Web development articles. C# open source libararies.
    Heimdal An international free implementation. Includes downloads, distribution information and mailing list contacts.
    XIA_(XPath_in_Ada) A native Ada implementation of the XPath 1.0 specification for XML DOM document querying. (Requires XMLAda from libre.adacore.com)
    Net-Tamer Shareware for DOS. Runs on XT's, 286's, 386's and Palmtops. A PPP dial-up access program which will browse the web, send and receive e-mail and Usenet messages. Can log off for off-line reading. Inclu
    Netcom_Café Offering per hour Internet services. Includes rates, location and service listing. Based in Johannesburg.
    Lynx_Viewer Delorie online viewer enables you to view your site in a text browser.
    Printer_Working_Group an unincorporated alliance among printer manufacturers, print server developers, operating system providers and print management application developers chartered to make printers and the applications
    RFC_1375 Suggestion for New Classes of IP Addresses. P. Robinson. October 1992.
    RFC0775 Directory oriented FTP commands
    XHTML_Tips A collection of help, guidance and tips to assist with web authoring.
    Weston_Multimedia,_LLC Specializes in web design, hosting, and multimedia.
    Crusaders Home of the people who created the original Eurocharts. Today they dedicate their efforts to organize the Gathering party.
    Alien_Productions_Web_Design Web development and design. Specializing in HTML, Javascript, DHTML and Flash.
    Pericom_Web_Technology Web design, hosting, e-commerce, and 3D graphics. Located in Keynes, UK.
    Netformz_Web_Design Design, Flash, database development, e-commerce, shopping carts, search engine submission, Located in Margate, Florida, United States.
This is websites2007.org cache of m/ as retrieved on 2008.08.28 websites2007.org's cache is the snapshot that we took of the page as we crawled the web. The page may have changed since that time.
Installing Apache, MySQL, and PHP on Linux | Web Hosting Dedicated Server Linux Windows Security Managed Articles Tutorials @import "/misc/drupal.css";@import "/themes/hostlibrary/modules.css";@import "/themes/hostlibrary/nav.css";@import "/themes/hostlibrary/layout.css";@import "/themes/hostlibrary/style.css";@import "/modules/codefilter/codefilter.css";@import "/modules/event/event.css";@import "/modules/taxonomy_dhtml/menuExpandable3.css"; Skip to content Web Hosting Dedicated Server Linux Windows Security Managed Articles  Tutorials Logo Advertise site map polls archives home

Navigation

contributehost interviewssearchupcoming eventscategoriesRSS feeds

Articles

Web Hosting Basics Finding a Host Domains & DNS Business Datacenter & Colocation Dedicated & VPS E-Commerce Marketing & Promotion Programming Reseller Hosting Software; Control Panels Technical & Security Web Servers & Systems Web Site Design Miscellaneous All Articles All Tutorials

Just added

Taking control of system logs -- How to install Logger 25 weeks 4 days agoBooting Linux in Less Than 40 Seconds 29 weeks 2 days agoResellersPanel Goes Dedicated and Expands Its Presence in Europe 30 weeks 6 days agoConfiguring a DNS Server 32 weeks 4 days agoNew Use for Old Hardware: Network RAID Backup 32 weeks 4 days agoDemoWolf releases new cPanel X3 tutorials 1 year 14 weeks agoTroubleshooting Apache using strace 1 year 19 weeks ago

Poll

How important is your web site to your business?: Very Important Important Neutral Not Very Important Not Important at All

User login

Username: * Password: * Create new accountRequest new password

Partners

Higher Education JobsMichigan Web Hosting Open Source ApplicationsWeb Dev ArticlesWeb hosting reviews Outsourced Hosting supportVentrilo ServersCounter-Strike Source ServersCheap Web HostingMore

Advertisement

Find Web Hosts

Latest News

ResellersPanel Goes Dedicated and Expands Its Presence in EuropeDemoWolf releases new cPanel X3 tutorialsComodo's Positive Software Division releases NOC Monkey 2.0 beta 2Drupal Community: Fantastico De Luxe is "an insecure recipe for disaster"Next generation of H-Sphere provides wider integration with Microsoft Hosted Platform, adds to portability and simplifies resellElectronic Signatures Company, ARX, Signs Agreement to Provide & Resell Comodo Web Trusted CertificatesMicrosoft fined $357 million US Windows Is Still More Reliable Than Linux On The ServerIBM To Release Linux Notes Sooner Than PromisedModernGigabyte Launches ModernBill Version 5.0more

Similar entries

Introduction to MySQLInstalling mod_bandwidth For the Ultimate in Apache Utilization ControlHost Interview - HostvoiceHost Interview - Adion SolutionsContact Us

Upcoming events

no upcoming events availablemore

Interviews

Web Host Manager Administration Guide- Author InterviewHost Interview - midPhaseHost Interview - LunarpagesHost Interview - LFC HostingHost Interview - Host4FutureHost Interview - Hostvoicemore

Tags

- Apache (16)- ASP & ASP.NET (2)- Backup (4)- cPanel (8)- DirectAdmin (1)- Ensim (1)- Fedora (5)- FreeBSD (6)- FTP (1)- H-Sphere (1)- Helm (1)- Kernel (4)- LAMP (3)- Linux (24)- Macintosh (1)- MySQL (14)- PHP (12)- Plesk (2)- Security (13)- Server Load (3)- SQL (2)- WHM (WebHost Manager) (3)- Windows (14)

Who's online

There are currently 0 users and 19 guests online.

Syndicate

Syndicate content Home » Installing Apache, MySQL, And PHP On Linux

Installing Apache, MySQL, and PHP on Linux

Apache | Linux | MySQL | PHP | Programming This tutorial is designed to guide you through the initial steps of setting up Apache,MySQL, and PHP on Linux. The Linux distribution being utilized for this tutorial isFedora Core 1, however the steps should be very similar across most distributions. This tutorial makes the assumption that you have the requireddevelopment tools loaded for compiling programs from source, these tools are beyond the scope of this document and will not be covered here. Also, it assumes you can use the vi text editor for basic editing tasks.Apache, MySQL, and PHP have become one of the most utilized combinations for developing content driven websites. They are robust, flexible, provide a decent level of security, and they are available for many different platforms. That being said, lets get to building a web server.Get the sourceballs -The first thing you need to do is obtain the sourceballs for each package, we will be compiling each package from scratch here, and, while there are also binary packages available for some distributions, I find your end results are usually better when building each package for your machine. Make sure you get the source files.Here are the links and the package versions available at the time this tutorial was writtenApache URL : http://httpd.apache.org/download.cgi Current Version - 2.0.48MySQL URL : http://www.mysql.com/downloads/mysql-4.0.htmlCurrent Version - 4.0.16PHP URL : http://www.php.net/downloads.php Current Version - 4.3.4Ok, so you've got the files now what ?, well now the fun begins..Installation - The first thing we need to do is extract the sourceballs so we can work with the files included in them. Beginning now we will be working as root, so open a terminal window, change to the directory in which you saved your downloaded files and become root by issuing the su command, enter the root password and you should be good to go.To extract the sourceballs type the following commands;#tar -zxf httpd-2.0.48.tar.gz (enter)#tar -zxf mysql-4.0.16.tar.gz (enter)#tar -zxf php-4.3.4.tar.gz (enter)The commands above will extract the sourceballs into their own separate directories. Now lets move on to compiling the source into usable programs. We'll start with Apache.Compiling Apache - Change into the directory created when you untarred the sourceball as follows;#cd httpd-2.0.48 (enter)Follow this command by typing;#./configure --prefix=/usr/local/apache2 --enable-mods-shared=most (enter)This tells Apache to install in the /usr/local/apache2 directory, and to build most of the available loadable modules. There are a ton of options with Apache, but these should work for the most part. Once the configure is done and the system returns the prompt to you, issue the following command;#makeThis will take a few minutes, once the prompt comes back again issue the following command;#make installWait for a few minutes and viola !, Apache is installed with the exception of a few minor changes we still need to make. They are as follows..Issue the following command;#vi /usr/local/apache2/conf/httpd.confCheck to make sure the following line is present in the file at the bottom of the LoadModule list, if it is not there add it;LoadModule php4_module modules/libphp4.soFind the DirectoryIndex line and edit it so it looks like the following;DirectoryIndex index.html index.html.var index.phpFind the AddType application section and add the following line;AddType application/x-httpd-php .phpThats it, save the file and we are done with Apache. Now, on to MySQL !Compiling MySQL -Change into the MySQL source directory as follows;#cd mysql-4.0.16 (enter)Follow this command by typing;#./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --disable-maintainer-mode --with-mysqld-user=mysql --enable-large-files-without-debug (enter)Sit back and wait for a while while configure does its thing, once the system returns the prompt to you issue the following command;#make (enter)Unless you have a very fast machine this will take some time, so spend time with your family, grab a beer, go for a walk, or whatever you're into. When you get back, assuming the system has returned the prompt to you issue the following command;#make install (enter)Cool !, MySQL is installed, there are only a couple things left to do to get it working, first we need to create a group for MySQL as follows;#/usr/sbin/groupadd mysql (enter)Then we create a user called mysql which belongs to the mysql group;#/usr/sbin/useradd -g mysql mysql (enter)Now we install the database files as follows;#./scripts/mysql_install_db (enter)Then we make a couple minor ownership changes;# chown -R root:mysql /usr/local/mysql (enter)# chown -R mysql:mysql /usr/local/mysql/data (enter)Last but not least, we use vi to add a line the ld.so.conf file as follows;#vi /etc/ld.so.confAnd we add the following line;/usr/local/mysql/lib/mysqlThats it, MySQL is installed, you can run it by issuing the following command;#/usr/local/mysql/bin/mysqld_safe --user=mysql &And as long as we're here we might as well set a root password for MySQL as follows;#/usr/local/mysql/bin/mysqladmin -u root password new_passwordWhere new_password is the password you want to use.Ok, so far so good, on to PHP !Compiling PHP -Change into the PHP source directory as follows;#cd php-4.3.4 (enter)Follow this command by typing;#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql (enter)Once the prompt comes back to you issue the following command;#make (enter)Hang out for awhile, and then yep, you guessed it, once you have the prompt back;#make install (enter)Once the install finishes and you have the prompt back issue the following command;#cp php.ini-recommended /usr/local/php/lib/php.ini (enter)Then edit that file;#vi /usr/local/php/lib/php.ini (enter)And change the following;Find the doc_root section and enter the correct path for the directory which serves your web content, such as;doc_root= "/usr/local/apache2/htdocs/"(this is default for apache2)Then find the file_uploads section and change it to reflect the following;file_uploads=Off(for security reasons)Thats if for PHP, now lets see if it all works..Testing - Assuming your MySQL process is still running from earlier, lets start Apache by issuing the following command;#/usr/local/apache2/bin/apachectl start (enter)This starts the Apache web server, now change into the following directory;#cd /usr/local/apache2/htdocs (enter)And using vi create a file called test.php;#vi test.phpAdd the following line to the file;<?php phpinfo(); ?>Save the file, then fire up your browser and point it to localhost/test.php. You should see a listing of all kinds of cool info about Apache, PHP, etc. If you do then your set !, if you don't, then take a look at your logs for Apache and MySql, and rememberGoogle is your friend. But hopefully you do, and now you have a fully functioning setup. Ok, one last step and we'll be done, you have everything running now, but you had to start Apache and MySql manually, that's something you don't want to have to remember to do everytime you reboot your machine, so lets fix it.Starting Apache and MySQL Automatically - Lets start with MySQL, as root make your working directory that of the MySQL source directory you worked with earlier, something similar to;#cd /home/xxxx/mysql-4.0.16 <enter>Then, copy the file mysql.server to your /etc/init.d directory as follows;#cp support-files/mysql.server /etc/init.d/mysqlOk, lets create some links in the startup folders for run levels 3 and 5.#cd /etc/rc3.d <enter>#ln -s ../init.d/mysql S85mysql <enter>#ln -s ../init.d/mysql K85mysql <enter>#cd /etc/rc5.d <enter>#ln -s ../init.d/mysql S85mysql <enter>#ln -s ../init.d/mysql K85mysql <enter>#cd ../init.d <enter>#chmod 755 mysql <enter>Thats it for MySQL, it should start automatically now when you reboot your machine. Now lets do the same for Apache, still as root make your working directory that of the Apache binaries as follows;#cd /usr/local/apache2/bin<enter>Then, copy the file calledapachectl as follows;#cp apachectl /etc/init.d/httpd <enter>Now, for some more links;#cd /etc/rc3.d <enter>#ln -s ../init.d/httpd S85httpd <enter>#ln -s ../init.d/httpd K85httpd <enter>#cd /etc/rc5.d <enter>#ln -s ../init.d/httpd S85httpd <enter>#ln -s ../init.d/httpd K85httpd <enter>And thats it for Apache !, it should start automatically along with MySQL the next time you boot your machine.That brings us to the end of this tutorial, hopefully you found it helpful, and Good Luck !Written By Rick NicholasBookmark/Search this post with: delicious | digg | vigillar | reddit | magnoliacom | newsvine | furl | google | yahoo | technorati | icerocket | pubsub login or register to post comments | printer friendly version

Comment viewing options

Flat list - collapsedFlat list - expandedThreaded list - collapsedThreaded list - expanded Date - newest firstDate - oldest first 10 comments per page30 comments per page50 comments per page70 comments per page90 comments per page150 comments per page200 comments per page250 comments per page300 comments per pageSelect your preferred way to display the comments and click "Save settings" to activate your changes. Sunny Problems starting apache Submitted by Sunny on Sat, 09/09/2006 - 19:11. Hi,I installed the following versions on RHEL,version 4:*************************************************Apache :[root@cslms2 bin]# ./httpd -VServer version: Apache/2.2.3Server built: Sep 2 2006 10:17:53Server's Module Magic Number: 20051115:3Server loaded: APR 1.2.7, APR-Util 1.2.7Compiled using: APR 1.2.7, APR-Util 1.2.7Architecture: 32-bit[root@cslms2 bin]# ./php -vPHP 4.4.4 (cli) (built: Sep 2 2006 11:15:29)Copyright (c) 1997-2006 The PHP GroupZend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies[root@cslms2 bin]# ./mysqladmin --version./mysqladmin Ver 8.41 Distrib 5.0.24, for pc-linux-gnu on i686******************************************************I followed the instructions in this nice guide and compiled apache,php and mysql.But when I start apache, I get the following error:[root@cslms2 bin]# ./apachectl -k startSyntax error on line 114 of /usr/local/apache2/conf/httpd.conf:Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configurationHere's the line 114 in httpd.conf file:*************************************** Options FollowSymLinks AllowOverride None Order deny,allow Deny from all*****************************************I have tried googling away for resolution to this but to no avail.I just am not able to figure out what's causing this error.Appreciate your help and thanks in advance.Thanks,Sunny. login or register to post comments errors in configuration Submitted by Guest on Tue, 01/09/2007 - 09:54. Options FollowSymLinks IndexesAllowOverride NoneOrder deny,allowDeny from all login or register to post comments Apache problem Submitted by Guest on Fri, 08/25/2006 - 12:38. when i type ./configure --prefix=/usr/local/apache2 --enable-mods-shared=mostit saidconfiure: error: no accetable C complier found in SPAHsee 'config.log' for more detailscofigure failed dor srclib/aprwhere is the problem ? login or register to post comments Apache Problem Submitted by Guest on Thu, 01/25/2007 - 16:00. you must download gcc and gcc-c+ this will take car of your compiler erroryum install gcc gcc-c+ login or register to post comments gopkris2000 Same problem Submitted by gopkris2000 on Fri, 10/06/2006 - 13:42. when i get same problemAny one to help us.Thanks for all. login or register to post comments confiure: error: no accetable C complier Submitted by Guest on Mon, 09/11/2006 - 09:38. first of all install gcc compiler which is a rpm package and can be installed from add/remove programmgood lucksunrana login or register to post comments Now sql adds the line in Submitted by Guest on Tue, 08/01/2006 - 05:29. Now sql adds the line in httpd.conf, so you dont need to add "LoadModule php4_module modules/libphp4.so" anymore. (now its LoadModule php5_module modules/libphp5.so, btw) login or register to post comments Problems - can someone please help? Submitted by Guest on Tue, 07/25/2006 - 21:36. First off I must thank you for these wonderful write up! The apache2* installation went smooth. I downloaded MySQL version 5.0.22. When I was installing MySQL the command "#./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --disable-maintainer-mode --with-mysqld-user=mysql --enable-large-files-without-debug (enter)" produced nothing. It said "You do not need to configure anything...." etc. So, I downloaded the earlier version (4.0.27). That also gave the same error. The next command "Make" did not produce anything. So I am stuck.BTW, I am running Linux RedHat8 on a intel 700Mhz processor. Also I am novice. My intention is to setup a server at home.Thanks for all the help!Regards,Gopal login or register to post comments You need the source, not the Submitted by Guest on Tue, 08/01/2006 - 00:18. You need the source, not the compiled binary. Look for it at the end of the download page.If you're using Red Hat try installing from rpm. It is MUCH easier (and faster for a 700Mhz processor :D)! login or register to post comments Tommahawl Wild Submitted by Tommahawl on Tue, 02/15/2005 - 14:56. That's a pretty wild guide. I did run into a few issues but got to the end and it worked. Hooray.a) if php complains: error: xml2-config not found. Please check your libxml2 installation. Solved by installing libxml2-dev & libxml2-utilsb) mysql complains that gcc doesn't exist. Solved by installing gcc apparently gcc is not g++ so make sure. You may need to update both.Thanks great article.... login or register to post comments Netpimper Mysql - Php - Apache Submitted by Netpimper on Tue, 10/26/2004 - 15:38. Hi, tnx for your great help file for noobs like me,But I got a small problem, your source codes are not up-to-date anymore. I did everything in ur file but I get a error saying my libphp4.so is missing, I got libraries installed, I updated my db and located *php*.so but it isn't on my pc, seems this is a problem many ppl have, but I can't find a solution, could u update this install file?GreetzIce login or register to post comments © Copyright 2003-2006 HostLibrary.com. All rights reserved. E-mail: info@hostlibrary.com All trademarks and copyrights are the property of their respective owners.
 

This

tutorial

is

designed

to

guide

through

the

initial

steps

of

setting

up

Apache,

MySQL,

and

PHP

on

Linux.

http://www.hostlibrary.com/installing_apache_mysql_php_on_linux

Installing Apache, MySQL, and PHP on Linux 2008 August

dvd rental

dvd


This tutorial is designed to guide through the initial steps of setting up Apache, MySQL, and PHP on Linux.

Rules




© 2008 Internet Explorer 5+ or Netscape 6+

Recommended Sites: 1. Arts - Business - Computers - Games - Health - Home - Kids and Teens - News - Recreation - Reference - Regional - Science - Shopping - Society - Sports - World Miss Gallery - Top Anime Hentai - DVD rental by mail - Switch Energy Supplier - Personal Loans - Ringtones - Casino Evening - Loans
2008-08-28 15:06:40

Copyright 2005, 2006 by Webmaster
Websites is cool :) 228Implanty - P³yty G³ówne - Bingo - Www.aktualnosci24.pl - Kasy Fiskalne