Introduction:-
LAMP stand Linux (operating system) Apache (HTTP server) MySQL (database software) and PHP ( or Perl or Python). LAMP Server is Linux web development environment. It allowes you to create web applications with Apache, PHP and MySQL database. It also come with PHPMyAdmin and SQLiteManager to easily manage your database.
Per quest on server:-
- Configure IP = 192.168.1.1
- Hostname = server.anup.co.in
1] Install Apache
2] Start apache service
3] Install MySQL Database Server
[ MySQL is a widely used open source database server on most linux server and can very well integrate tp PHP and Apache server on RHEL5 ]
4] Change MySQL root password [ By default the root password is empty for mysql database. ]
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql> FLUSH PRIVILEGES;
5] Once done check by loging in:
Enter password: <your new password>
6] Create a new mysql user
mysql> create database lamp
mysql> GRANT ALL PRIVILEGES ON lamp.* TO 'anup'@'localhost' IDENTIFIED BY 'anup' WITH GRANT OPTION;
mysql> UPDATE user SET Password=PASSWORD('anup') WHERE user='anup';
mysql> quit
7] Install PHP language
8] To load PHP restart apache
9] To test PHP working or not
// demo.php
<?php
phpinfo();
?>
:wq
10] Open the browser and type following URL
Syntax = http://<ip address>/demo.php
Example = http://192.168.1.1/demo.php
- Observe the installed configuration on server
- PHP paths
- Apache paths and loaded module
- PHP gd library
- MySQL path
[ PHPMyAdmin is web based MySQL database administration tool ]
Download Link = http://www.phpmyadmin.net/home_page/downloads.php
12] Edit phpmyadmin configuration file
<Directory "/usr/share/phpmyadmin"> Order Deny,Allow # Deny from all Allow from 127.0.0.1 </Directory> 13] Open conf.inc.php file and make following changes
$cfg[ 'blowfish_secret' ] = 'password'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
:wq
14] Restart all service once again
15] Ponit your browser to following URL:
Syntax = http://<ip address>/phpmyadmin
Example = http://192.168.1.1/phpmyadmin
[ Note = If you encounter of error to open phpmyadmin then paste extracted directory of phpmyadmin to /var/www/html/ and rename it as phpmyadmin ]