Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home Linux Install LAMP (Apache, MySQL and PHP in Linux) on CentOS

Install LAMP (Apache, MySQL and PHP in Linux) on CentOS

After install your Operating System (could be CentOS), the first thing you may think about install Apache, PHP and MySQL on the server.

This tutorial will let you know how to Install LAMP (Apache, MySQL and PHP in Linux) on CentOS. We will use YUM program to install LAMP in CentOS.

Below are the steps:

1. Open a terminal and type following command and follow on screen instructions to install Apache web server.

[text] yum install httpd
[/text]

2. Once Apache has been installed, continue to install PHP, type:

[text] yum install php
[/text]

3. After PHP installed, continue to install MySQL database server:

[text] yum install mysql-server mysql
[/text]

That’s all, once everything finished, type following command to start Apache web server:

[text] service httpd start
[/text]

And type below command to start MySQL database server

[text] service mysqld start
[/text]

Once apache & mysql services are started successfully, it’s time to check if both of them are running.

1. Apache/PHP

To test if php is running, go to /var/www/html and create an index.php with the content below:

[php] <?php
phpinfo();
?>
[/php]

Then open a web browser and go to http://localhost and you should see a purple PHP information page showing all the php configuration variables, it means PHP is running. Awesome!

2. MySQL

Open the terminal again and type:

[text] mysql -u root -p
[/text]

It will ask the password, leave it blank by pressing enter and you should see something like this:

[text] mysql>
[/text]

It means MySQL database server is running on your server. That’s perfect!

Congratulation, you just successfully installed LAMP in your CentOS server.

This tutorial may apply for others Linux system, I think.

Feb 28, 2011Hoan Huynh
Install CentOS in VirtualBoxPHP open source google analytics competitor
You Might Also Like:
  • CentOS install PHP Json Extension by using PECL
  • Install CentOS in VirtualBox
  • centos -bash pecl command not found
  • Install Apache On Ubuntu
  • CentOS -bash: wget: command not found
  • Linux Find Out PHP/ MySQL/ MySQLD/ HTTPD … Command File Location
  • Virtualmin Install PHP Mcrypt Extension
  • Shell script backup all Mysql Databases in Linux
  • Tips For Tuning And Optimizing Mysql On Low Memory Dedicated Server Or VPS
  • How to install PHP extension without re-compiling PHP
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

10 years ago Linuxapache, CentOS, LAMP, Operating System, web server, YUM102
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
21,956 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
19,804 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
15,629 views
JQuery Allow only numeric characters or only alphabet characters in textbox
13,136 views
C# Read Json From URL And Parse/Deserialize Json
9,594 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • Essay Writers
  • College Essay Writers – The Way to Earn Your Essay in Demand
  • Buy Research Papers – How to See Them at a Bargain Price
  • How to Write a Research Paper For Sale
  • Essay Writing – Some Useful Suggestions for Writing Urgent Essays
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (28)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (69)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development