Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Lamp (Linux Apache Mysql Php) Web Server, On RHEL Clones (Like WBEL / CentOS)
hughesjr
post May 22 2004, 02:26 PM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



This is going to be a LAMP (Linux Apache MySQL PHP) Web server install on WhiteBox Enterprise Linux. The first step is going to be to do a minimal install of WhiteBoxEL. This is accomplishished by selecting a custom install and unchecking everything. This will give you an install with about 540mb of packages. It is the minumum recommended install by RedHat of their Enterprise product.

This install is as lean as possible, and does not contain a GUI. You will need to know how to use an editor in console mode. There are several, I use vi ... nano is also in this install. Either can be used ... please become familiar with a console editor before attempting this install. You will see steps that say edit file /xxx/xxxx ... you should use your perferred editor to do these steps.

All commands are done at the command prompt as root.

Here is the procedure.

1. Install a minimum WBEL (or CentOS, or RHEL) install. Since this is going to be a server, you want to manually assign an ipaddress on your network, and manually assign a domain name. In my test domain, I assigned the address 192.168.0.30 and a name of lamp.home.local. (I use the 192.168.0.x network inside my firewall, and I have a DNS server setup to put names in for the home.local domain, which I use internally for testing).

After the first boot, edit the file /etc/sysconfig/network to verify the domain name is setup... mine says this:
CODE
NETWORKING=yes
HOSTNAME=lamp.home.local

Also look in /etc/hosts and make sure the name is setup ... mine looks like this:
CODE
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.0.30 lamp.home.local


2. For WBEL and CentOS install yum ... this will require the packages libxml2-python and libxml2. How I did this install for WBEL is as follows (all steps below will be on WhiteBoxEL ... CentOS steps would be similar, but the filenames might be slightly different ... as would be the yum repository locations):
CODE
wget http://www.geekstyle.net/white_box/3.0/en/os/i386/RedHat/RPMS/yum-2.0.4-2.WB1.noarch.rpm
wget http://www.geekstyle.net/white_box/3.0/en/os/i386/RedHat/RPMS/libxml2-python-2.5.10-5.i386.rpm
wget http://www.geekstyle.net/white_box/3.0/en/os/i386/RedHat/RPMS/libxml2-2.5.10-5.i386.rpm


After the files were downloaded, I installed them with the command:

rpm -Uvh libxml2-python-2.5.10-5.i386.rpm libxml2-2.5.10-5.i386.rpm yum-2.0.4-2.WB1.noarch.rpm

3. Now, edit the file /etc/yum.conf to add the proper repositories ... my /etc/yum.conf file is here:

http://www.hughesjr.com/wbel/yum.conf.txt

4. Update all the packages on the system to the lastest updates with this command:

yum upgrade

5. Reboot the machine on the new kernel...

6. Now we are ready to install all the packages required to have a LAMP server.

yum install perl-DBD-MySQL mysql-server mysql php-mysql mod_auth_mysql openssl-devel openssl mod_ssl php-devel php httpd rpm-build rpm-devel gcc perl-CPAN autoconf automake

7. After the install, we will want to make the all the programs start for future reboots and start them right now ... to do that, use the following commands:

chkconfig httpd on
chkconfig mysqld on


Here is how to start them now ....

/etc/init.d/mysqld start
/etc/init.d/httpd start


8. Now I like to add a page called info.php to the root directory of my site to make sure everything is working. Edit a file named /var/www/html/info.php and paste the following into it and then save it:
CODE
<HTML>
<HEAD>
 <TITLE>PHP via Enterprise Linux</TITLE>
</HEAD>
<BODY>
 <?php phpinfo(); ?>
</BODY>
</HTML>


Now open a webbrowser and go to your website via either it's name or ip address, so in my case it is this:

http://lamp.home.local/info.php

or

http://192.168.0.30/info.php

9. The configuration files are:

For apache - /etc/httpd/conf/httpd.conf (and all items in the directory /etc/httpd/conf.d). (How to configure apache).

For PHP - /etc/php.ini (how to configure php).

For MySQL - How to Configure


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 14th December 2017 - 04:01 PM