Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday 10 February 2016

How to Install LAMP Server on CentOS/RHEL 6x

How to Install LAMP Server on CentOS/RHEL 6x

LAMP (Linux, Apache, MySQL, PHP)

LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language. (Sometimes Perl or Python is used instead of PHP.)

Step: 1. Bind the Hosts File :

# vi /etc/hosts

192.168.72.220    ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 3. Edit httpd.conf file :

# vi /etc/httpd/conf/httpd.conf

#ServerName www.example.com:80

Just Add this Line-

ServerName IP_Address_of_Server:80

-- Save & Quit (:wq)

Step: 4. Start httpd Service :

# service httpd restart
# chkconfig httpd on

Step: 5. Install MySQL Database Server :

# yum -y install mysql mysql-server mysql-devel

Step: 6. Start MySQL Service :

# service mysqld restart
# chkconfig mysqld on

Step: 7. Changing MySQL Root Password :

# mysql_secure_installation

or

# mysql

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new password') WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> exit

Step: 8. Check loggin With New Password :

# mysql -u root -p
Enter Password: <your new password>

mysql> show databases;

+--------------------+
| Database                 |
+--------------------+
| information_schema |
| mysql                      |
+--------------------+
2 rows in set (0.00 sec)

mysql> exit

Step: 9. Install PHP5 Scripting Language :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt \
  php-devel php-xml php-imap php-ldap php-mbstring php-odbc php-pear \
  php-xmlrpc php-soap php-cli php-intl mod_ssl

Step: 10. Create a file named /var/www/html/info.php :

# vi /var/www/html/info.php

<?php
  phpinfo ();
?>

-- Save & Quit (:wq)

Step: 11. Restart Apache to Load PHP :

# service httpd restart

Step: 12. Then point your browser to http://ip_add/info.php :

Ex- http://192.168.72.220/info.php

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


2 comments:

  1. In order to conduct a repair of AVG antivirus, it is advisable that the user opens windows with admin permissions also ensure that there is no other software running on the system. After that right-click windows start button after that select “apps and features” after that from the menu that appears select “AVG” from removal. If you still need more information or help then ask for it from the team of trained and certified experts.
    Avg Help UK

    ReplyDelete

Copyright © 2016 Kousik Chatterjee's Blog