How to install apache2, php5 and Mysql With Yum On Vps

Friday, June 26, 2009 15:36

We shall teach how to install latest version of apache, php5 and mysql databases on a centos vps with a single command. Please remember that this guide assumes you know basic linux and sehll commands, anyhow all steps are documented. We have given simple steps below to install apache, php and mysql on a vps below,

1. Our 1st steup, is quite simple. Once you have connected to your server via SSH, use the following command to install everything you need.

yum -y install httpd php mysql mysql-server php-mysql

This will take  2 – 5 minuts to download ( Total Size is 16Mb )
Once its done Yum will say “Complete!” and you will be returned to command area.
Second, you need to set a MySQL root password. Without this, your MySQL server can be attacked, and it WILL happen! Use the following command (With QUOTES) to set your root password,

mysqladmin -u root password ‘ENTER-PASSWORD-HERE’

Next, we shall do further security checks on MYSQL by removing any other users that managed to get created and removing the MYSQL test database.

mysql -u root -p
mysql> DRO P DATABASE test;
mysql> DELETE FROM mysql.user WHERE user = ”;
mysql> FLUSH PRIVILEGES;

In the last, we shall set apache and mysql to run on startup. This is useful tool if your server has a power outage or needs to be rebooted as it will automatically restart Apache & MySQL for you.

/sbin/chkconfig httpd on
/sbin/chkconfig –add mysqld
/sbin/chkconfig mysqld on
/sbin/service httpd start
/sbin/service mysqld start

To check if verything is working fine and ready to use, browse to the web server directory (on CentOS its /var/www/html) and create a new file using  text editor called phpinfo.php (enter “nano phpinfo.php” to open the text editor). Enter the following code into that file to check PHP is working

Now all things was done properly and your vps is ready to use and cleared from the security risks

Best Regards
RegencyHost, Inc Network Support Team

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • BlinkList
  • Live
  • MySpace
  • RSS
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Yigg
You can leave a response, or trackback from your own site.

84 Responses to “How to install apache2, php5 and Mysql With Yum On Vps”

  1. Ken Pedersen says:

    June 30th, 2009 at 12:32 am

    Hi, Have two damaged malware sites, was referred to you as possible resource to fix / reinstall (hosted on rackspace cloud). Do you do this kind of work?

  2. Usman says:

    June 30th, 2009 at 2:38 pm

    @Ken, sorry i cannot help you in this case. You must contact your hosting provider to solve this issue.

  3. flash says:

    July 7th, 2009 at 3:26 am

    Cool!

  4. Aneslin says:

    July 8th, 2009 at 10:33 pm

    A great tutorial bro,
    thx a lot.

    can I install postgre as like this ?
    or any special commands?

    subscribed in your blog. really useful.

  5. Wajdan says:

    July 10th, 2009 at 8:02 pm

    @Aneslin — > You can check postgre website for further information, i have no idea about it. Anyways, I’ll update you soon if i found something for you.

  6. Tyson F. Gautreaux says:

    April 7th, 2010 at 11:52 pm

    Hi there i do totally enjoy your great site, I would be happy if you would like to me blog a big review about your amazing blog on my iPod Newssite http://kh3.us would you say yes please? Yours,

  7. web page design says:

    April 8th, 2010 at 12:28 pm

    jasmine cams Intimately, the post is in reality the freshest topic on this registry related issue. I concur with your conclusions and will eagerly look forward to your forthcoming updates. Saying thanks will not just be enough, for the wonderful clarity in your writing.

  8. Elidia Fratrick says:

    April 19th, 2010 at 7:42 am

    Really Nice Blog Dude, I shall be subscribing! …Want To Get ANY Girl You Desire? Visit: http://www.howgetagirl.info

  9. sirin says:

    May 11th, 2010 at 7:02 pm

    I enjoy coming back daily to see your musings. I have your page bookmarked on my must read list!

  10. Christie Putz says:

    May 12th, 2010 at 8:05 am

    I recently started using hostgator, and found these coupons:

    HostgatorPros
    1centhosting
    G36FJ23ASF
    HG3YD3A4CZ
    HGBIGDISCOUNT

    I know the coupon ’1centhosting’ works good, but I’m sure the others do as well.

    Best wishes.

  11. keywords tool says:

    May 14th, 2010 at 7:24 am

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  12. Marcelo Robair says:

    May 15th, 2010 at 5:35 pm

    I bookmarked your post will read this latter . Regards, Mike

  13. Hector Regula says:

    May 16th, 2010 at 1:05 am

    Great post thx a lot !

  14. Emil Beeson says:

    May 16th, 2010 at 1:29 pm

    Super article! Your writing is so refreshing compared to most other bloggers. Thank you for posting when you get the chance to, I’ll be sure to keep visiting!

  15. minisite designer says:

    May 17th, 2010 at 1:48 am

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post.

  16. kopi tribulus says:

    May 18th, 2010 at 12:33 pm

    Hey, maybe this is a bit offf topic but in any case, I have been surfing about your blog and it looks really neat. impassioned about your writing. I am creating a new blog and hard-pressed to make it appear great, and supply excellent articles. I have discovered a lot on your site and I look forward to additional updates and will be back.

  17. high velocity bowling says:

    May 18th, 2010 at 9:55 pm

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It?s the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  18. anti aging clinics says:

    May 19th, 2010 at 2:22 pm

    I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

  19. hike the appalachian trail says:

    May 20th, 2010 at 1:56 pm

    I have been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.

  20. Ignacia Blas says:

    May 20th, 2010 at 11:23 pm

    wEBHOSTING with HOSTGATOR *Coupon Code: ” NewWebsite ” – 20% $$$ off — visit bit.ly/9ESukZ — HOSTGATORSAVE, DEALSAVINGS, HUGESAVINGS, SAVEHUGEMONEY, MONEYMONEY, SAVEDOLLARS, DOLLARSDOLLARS, SAVEYOURMONEY – http://www.bit.ly/9ESukZ

  21. Luigi Fulk says:

    May 22nd, 2010 at 2:59 pm

    Hi , I think this is a good blog. I found it at Yahoo , i will come back once again.

    Good webhost is the most important thing about your business success !!

    Have a Nice day !!

    http://gemoney.weebly.com/

  22. buying keyword says:

    May 22nd, 2010 at 4:33 pm

    While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

  23. article writing service says:

    May 23rd, 2010 at 11:43 pm

    Sorry for the huge review, but I’m really loving the new Zune, and hope this, as well as the excellent reviews some other people have written, will help you decide if it’s the right choice for you.

  24. Matthew Hupe says:

    May 26th, 2010 at 6:43 pm

    Thank you very much!

  25. how to windsurf says:

    May 27th, 2010 at 8:19 am

    Good day is Blogengine a free blogging software like wordpress? Also does it have lots of plugins and themes for it? I would like to start using it for my new blog if it does. Thanks…

  26. blog comment service says:

    May 27th, 2010 at 9:57 am

    The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  27. Meso Generator says:

    May 27th, 2010 at 11:58 am

    I’ve just Joined your RSS =)

  28. create forum profile says:

    May 28th, 2010 at 5:53 am

    Hi webmaster – This is by far the best looking site I’ve seen. It was completely easy to navigate and it was easy to look for the information I needed. Fantastic layout and great content! Every site should have that. Awesome job

  29. rob forex market legally says:

    May 28th, 2010 at 6:08 pm

    Aw, this was a really quality post. In theory I’d like to write like this also – taking time and real effort to make a good article… but what can I say… I procrastinate alot and never seem to get anything done… Regards…

  30. Tyson F. Gautreaux says:

    May 30th, 2010 at 10:35 am

    Nice post. Thank you for information ! Please keep posting.

  31. wow gold making guide free says:

    May 30th, 2010 at 8:04 pm

    Do you like the blog, information on more than enough.

  32. MaricelaBurns says:

    May 31st, 2010 at 5:08 am

    If you are willing to buy real estate, you will have to receive the mortgage loans. Moreover, my mother all the time uses a term loan, which supposes to be really firm.

  33. hospedagem de sites says:

    June 1st, 2010 at 6:42 am

    Impressive blogging site. Cannot wait to find out just what exactly you come up with next!

  34. Jamaal Bustad says:

    June 2nd, 2010 at 9:46 am

    hi, thank you for this astonishing information. Therefore, I would like to ask for your accept to add some of this information in my blog. Of course, I will provide a link to your , as a source of my quoted information.

  35. runescape free gold guide says:

    June 2nd, 2010 at 9:45 pm

    P thx for ur tips i’d love to follow u

  36. patent annuities says:

    June 3rd, 2010 at 7:08 pm

    I have some trouble to subscribe the rss feed, anyway I’ve bookmarked this site, is very useful and full of informations.

  37. shopping online says:

    June 6th, 2010 at 1:20 am

    thanks,buddy,i like it

  38. Free Optimizer says:

    June 7th, 2010 at 12:58 pm

    Annonymous, if you have meeting info on Democratic Town Committee by all means email me the info. Thanks

  39. art gallery says:

    June 8th, 2010 at 9:14 am

    I personally have embraced the new technologies and the CMS platforms, I think the new tools only make the web designs better. I am glad that new technologies are coming out in web design that make things easier, improved, and better looking for design.

  40. Private Server says:

    June 9th, 2010 at 12:53 pm

    most pages on this blog are usfull to me :) bookmarked it! keep it going, good job

  41. Kam Sekuterski says:

    June 12th, 2010 at 9:32 pm

    Thank you for this website, I was searching for web hosting on Yahoo and found this webpage.

  42. Winston Gemmiti says:

    June 13th, 2010 at 10:58 pm

    You wouldn¡¯t believe it but I¡¯ve wasted all day digging for some articles about this. You¡¯re a lifesaver, it was an excellent read and has helped me out to no end. Cheers,

  43. classics today furniture says:

    June 17th, 2010 at 9:39 pm

    it is very good share,thanks,and i like this blog

  44. online shopping deals usa says:

    June 17th, 2010 at 9:57 pm

    been following your blog for some days now and i should say i am starting to like your post. and now how do i subscribe to your blog?

  45. Gucci Handbags says:

    June 18th, 2010 at 8:55 pm

    You write very detailed,Pay tribute to you.Couldn’t be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing!

  46. Forex kagi bonus says:

    June 24th, 2010 at 2:27 am

    Great article thanks. Do you mind if I use some of this text on my website? I will link back.

  47. Mary Shapiro says:

    June 24th, 2010 at 8:41 am

    Looks like I’m going to need to look up a couple more things but this was a really good place to start.

  48. Domain Parking says:

    June 24th, 2010 at 12:01 pm

    Now and then I am going to stumble across a write-up like this and I will recall that there really are even now useful pages over a web. ^_^. Thanks.

  49. Chellie Pingree says:

    June 25th, 2010 at 6:52 am

    It looks like you have gathered yourself quite the respectable following now! I’m pleased.

  50. Forex kagi bonus says:

    June 25th, 2010 at 6:02 pm

    can we make blogroll

  51. Forex Kagi says:

    June 26th, 2010 at 3:46 pm

    I just cant stop reading this.??Its so cool, so full of information that I just didnt know.??Im glad to see that people are actually writing about this issue in such a smart way, showing us all different sides to it.??Youre a great blogger.??Please keep it up.??I cant wait to read whats next.

  52. Casino Yanagida Sr. says:

    June 29th, 2010 at 12:59 pm

    Amazing post. I’ve added this page to check back later.

  53. Maurice Le Slots says:

    June 30th, 2010 at 1:17 am

    A colleague recommended that I check out your site. I’m glad that I’m here.

  54. Gaston Taaffe says:

    June 30th, 2010 at 3:18 am

    This is a good post.

  55. Miesha Lindenberg says:

    June 30th, 2010 at 6:22 pm

    This is a great post.

  56. dowload music says:

    June 30th, 2010 at 7:37 pm

    Hey there! We are considering for forthcoming copy writers, would certainly you be interested? This situation probably won’t allow you splendid however there is an eye-catching payment and if you exceptionally enjoy writing then this situation opportunity is for you.

  57. Brook J. Slots DDS says:

    July 2nd, 2010 at 11:28 am

    You’ve given me an amazing idea. Thanks for sharing this info with me.

  58. Lynn Jenkins says:

    July 3rd, 2010 at 8:34 pm

    This place absolutely keeps on getting better all the time. You should seriously be pleased.

  59. Cardio Exercises says:

    July 5th, 2010 at 3:29 am

    Hi, Chris here… Just wanted to drop by and say thanks for the great info you have here. I find that cardio is a great method for losing weight, but should always be combined with a solid diet program as well. Peace – Chris

  60. Smokeless cigarettes buy says:

    July 5th, 2010 at 6:07 am

    While this topic can be quite touchy for most people, my opinion is that there has to be a middle or widespread ground that we all can find. I do appreciate that youve added relevant and intelligent commentary below though. Thank you!

  61. Madelaine Dhosane says:

    July 5th, 2010 at 12:29 pm

    I really learned a lot. I appreciate the effort put into this site and will visit here more often. Thank You!

  62. Jimmy Bonus Sr. says:

    July 5th, 2010 at 10:14 pm

    I’ve never heard of this before. I’ll make sure to find out more.

  63. Laurence Fuesting says:

    July 6th, 2010 at 9:04 am

    Thanks for creating this great informational resource.

  64. Ali says:

    July 7th, 2010 at 12:33 pm

    What hosting company are you using for your blog?

  65. Jenny Mcclune says:

    July 12th, 2010 at 4:17 pm

    Hayadministrator I enjoy with your posting . May i copy this article for my university test ? thank you adminstrator

  66. Wajdan says:

    July 12th, 2010 at 4:33 pm

    Jenny Mcclune – > Yes, you can.

  67. Mick says:

    July 13th, 2010 at 7:16 pm

    Hello. In what folder i install it? Can i make new folder and install it there?

  68. Wajdan says:

    July 13th, 2010 at 7:32 pm

    Mick – > Yum commands install in default folders in your linux box. Where you want to install them?
    you may want to use cd command and then yum.

  69. Kitchen steel undermount sinks says:

    August 2nd, 2010 at 4:39 pm

    Nice post. Thank you for information sharing with us ! Please keep posting.

  70. Kimi Frankland says:

    August 23rd, 2010 at 6:46 pm

    I cant wait for the World of Warcraft cataclysm expansion. You need to check out this site for a cool video that shows just whats comming up.

  71. social network says:

    October 11th, 2010 at 3:01 pm

    Good post cheers, You must have a Facebook group for this site?

  72. forex says:

    October 12th, 2010 at 4:26 pm

    Hi Admin & all, I am new in internet marketing. I want to achive more knowladge about internet marketing. Bytheway your blog’s information is so useful for me. IT is help for increasing my knowldge..Thanks :)

  73. Gilbert Heidt says:

    October 18th, 2010 at 9:13 am

    been reading ur blog around several days. really like what you posted. by the way i am doing a research about this area. do you know any other websites or forums that I can get more information? many thanks.

  74. 網站登錄 says:

    October 18th, 2010 at 9:33 pm

    I see the concernnowI am very n glad to hear that you got your Supra fixed. I remember reading about some of your problems5xa !.

  75. Summer Camps says:

    October 30th, 2010 at 5:42 pm

    Best you could change the blog name title How to install apache2, php5 and Mysql With Yum On Vps | RegencyHost Blog to more better for your webpage you create. I loved the blog post withal.

  76. Best Online Pet Supplies says:

    November 5th, 2010 at 7:17 pm

    Hi, can you send a sample of this post to my mail – i would appreciate it?

  77. Nancey Choudhary says:

    January 13th, 2011 at 9:49 pm

    I care natural stuff , I cerebrate this has some really excellent information thankyou .

  78. Indoor Grills says:

    January 29th, 2011 at 1:16 am

    ;,* I am really thankful to this topic because it really gives up to date information `”:

  79. Nyoman Sujendra says:

    May 25th, 2011 at 12:10 pm

    I cant change mysql administrator
    mysqladmin: connect to server at ‘localhost’ failed.. How to fix it?

  80. iPhone Cases says:

    October 25th, 2011 at 3:48 am

    I wanted to thank you a lot far more for this incredible web-site you have created here. It truly is full of useful ideas for those who are genuinely interested in this topic, specifically this extremely post. Your all actually sweet plus thoughtful of others as properly as reading your site posts can be a fantastic delight in my experience. And what a generous reward! Mary and I will certainly have fun generating use of your guidelines in what we ought to do in some weeks. Our checklist is really a mile long which indicates that your ideas may possibly be put to fantastic use.

  81. Zoila Buonamici says:

    November 6th, 2011 at 12:52 pm

    I adore your wp theme, wherever do you down load it from?

  82. prezent says:

    November 22nd, 2011 at 8:18 pm

    Thank you for each of your effort on this site. Gloria delights in getting into internet research and it’s easy to see why. Almost all know all about the compelling mode you convey helpful thoughts by means of your web site and in addition improve response from other individuals about this issue so our daughter is without question discovering so much. Enjoy the remaining portion of the new year. You are carrying out a glorious job.

  83. Susanna Bleyer says:

    January 8th, 2012 at 2:23 am

    I’d enjoy seeing an article of the top 10 VPS providers and get actual peoples thoughts on their services.

Leave a Reply