hi to all members ,
ankit u can try either of the following :
1. TRY this link :
www.lamphowto.com/
or
2. try the following steps:
1. Launch the terminal
2. Switch to super user mode. You will require the root password.
su -
3. Check if Apache HTTP Server is installed already
rpm -q httpd
If you see the package name httpd-x.x.x-x, Apache web server is already installed on your computer. If it is not you can install it using the yum command.(We'll discuss how to install it)
4. Check if PHP and MySQL are installed already
rpm -q php
If PHP is installed, you will see the package name on the screen. Otherwise the shell returns the prompt without any message. Similarly check if MySQL is installed.
rpm -q mysql
5. Installing the necessary packages using yum
yum install httpd php php-pdo php-mysql php-gd mysql mysql-server
The yum package management tool resolves dependencies and displays the packages that are available for installation with their version numbers, architectures and repository details. You can choose to say yes or no when it asks for your confirmation to proceed. If you choose yes, yum downloads the necessary packages and installs it for you. If some of the packages are already installed on your computer, yum skips them and downloads only the missing packages.
6. Starting the services: You must start the services to make use of them.
service mysqld start
service httpd start
7. You can set these services to start when your computer starts using the
chkconfig command.
chkconfig httpd on
chkconfig mysqld on
To print the list of services with the runlevel information type:
chkconfig --list
Runlevel 5 is the technical name for graphical multiuser mode and runlevel 3 for command line multi user mode on Red Hat systems. Check if mysqld and httpd are set to runlevel 3 and 5. Alternatively you can use the graphical tool ntsysv to start or stop services at system start-up.
ntsysv --level 5
ntsysv --level 3
PHP runs as an Apache HTTP server module. PHP starts when httpd starts.
8. Verifying LAMP installation: In your web browser address bar type
localhost/ and hit the return key. If you see the Fedora test page you have done everything correctly. Pat on your back.
The default DocumentRoot is /var/www/html directory. Place your HTML and PHP scripts in /var/www/html directory and view them in action at
localhost from your web browser. You can change the DocumentRoot and even run multiple websites simultaneously using name-based virtual hosts.
The phpinfo() function in the PHP scripting language is very useful and prints important information about the LAMP stack. Open a text editor and copy the below code and paste it.
<?php
phpinfo();
?>
Save the file as phpinfo.php in the /var/www/html directory. View it from the web browser by typing
localhost/phpinfo.php.
By default MySQL's root password is set to blank. Connect to the local MySQL server using the MySQL client and change it immediately.
mysql -u root -p
The screen looks something like
[root@localhost test]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 60
Server version: 5.0.45 Source distribution
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql>
In the MySQL client(where you see mysql> before the blinking cursor), use the below SQL to change the root password.
SET PASSWORD FOR 'root'@'localhost' = password('newpassword');
9. Installing optional packages: There are GUI tools available to mange MySQL server, databases, http server and many more. couple of them are :
1. phpMyAdmin to manage MySQL databases from the web browser. You can install phpMyAdmin by using yum
yum install phpmyadmin
Once you install phpMyAdmin you can access it by typing localhost/phpMyAdmin in your web browser.
2.
yum install system-config-httpd
Go ahead and build great applications on your LAMP stack.