LAMP stands for  Linux, Apache, MySQL, and PHP.Linux is an open source Operating System while Apache is a web server. MySQL/MariaDB is a relational database management system and PHP is a server-side scripting language. All these software must be installed on your Virtual Private Server (VPS) if you want to run most dynamic websites.

Steps to install LAMP stack on centos 7 VPS

  1. Login to root user or sudo user
  2. Update the system
    yum update                                                                       <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>
  3. Install Apache
    yum install httpd                                                                 <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>
  4. Next, we need to start Apache service by running the command below
    systemctl start httpd.service                                                        <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    At this point, you can enter your public IP address on a browser to confirm the installation. You should get the default Apache page as shown below:

  5. The page above indicates that Apache was installed successfully on your CentOs 7 server.

    Next, you need to activate Apache to start during system boot using the command below:

     systemctl enable httpd.service

     

  6. Install MariaDB Database.MariaDB is a forked version of MySQL.We will need MariaDB to store information for our dynamic websites. We can install MariaDB together with additional packages that we require on our CentOs server by running the commands below
    yum install mariadb-server mariadb                                                <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

     

  7. Start the service
    systemctl start mariadb                                                              <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

     

  8. Securing MariaDB
    mysql_secure_installation                                                          <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    You will be prompted to enter your MariaDB root password, just press Enter because you haven’t set any password yet. Please note that this should not be confused by the root password of your server.

    Once you have done this, you will be asked a series of questions. We have provided the answers below for simplicity:

    Set root password? [Y/n] Y
    New password: Enter your password here
    Re-enter new password: repeat your password
    Remove anonymous users? [Y/n] Y
    Disallow root login remotely? [Y/n] Y
    Remove test database and access to it? [Y/n] Y                                      
    Reload privilege tables now? [Y/n] Y                                               <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    Finally, you will get a success message as shown below:

    ... Success!
    Cleaning up...
    All done!  If you've completed all of the above steps, your MariaDB Installation should now be secure.<span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

     

  9. Your MariaDB server is now secure. Type the command below to enable it during boot:
    systemctl enable mariadb.service

     

  10. Install PHP
    yum install php php-mysql                                                         <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>
    systemctl restart httpd.service

    Test PHP

    Apache installs a default website on the directory ‘/var/www/html/’. So to test PHP on our CentOs 7 Server, we need to create a file there using a vi editor.

    vi /var/www/html/info.php

    A blank text file should be displayed, just copy paste the content below on the page:

    <?php 
    phpinfo(); 
    ?>

    You need to visit the following URL on your browser to check whether PHP is working:

    http://ip_address/info.php                                                         <span id="mce_marker" data-mce-type="bookmark" data-mce-fragment="1">​</span>

    Replace th ip_address with ip address of your system

    If the installation was completed without a problem, you should see the below page on the browser:

Was this article helpful?
YesNo

Comments

  1. kristinedms9626.hatenadiary.com

    IOTA is a crypto-wallet that you just with final management over your funds and information. Nonetheless the value has declined to speak to
    the elevated information about the person that you’re.
    Miners are dropping floor day-to-day it has become so widespread that.

    This sort of demand based mostly on the hype it’s been a wild day.

    Craig Wright claims been essentially the most profitable and
    it might course of advanced contracts and programs In addition to transactions.
    CBTC Bitcoin is getting fast and secure crypto trading course of
    for all of US. Everyone can access to by downloading a full node wallet the process within five years.
    Escrow wallet creation creation i.e zero-knowledge proof building it permits performing further protected transactions.

    With Coinbase users can perform his transactions from the tip of final 12 months.
    Imagine being informed by its very nature is a digital yuan last 12 months.

    Two-way ATM machines globally represent solely a perspective of one cryptocurrency being the.

  2. situs poker online

    I’d like to thank you for the efforts you’ve put in writing
    this website. I’m hoping to view the same high-grade blog posts from you later on as well.
    In fact, your creative writing abilities has encouraged me to get my own site now
    😉

  3. http://teologiromani.org/

    You are so interesting! I don’t suppose I have read something like that before.
    So nice to find another person with some genuine thoughts on this issue.

    Seriously.. thanks for starting this up. This website
    is one thing that is required on the internet, someone with some originality!

  4. Madalynn

    First off I want to say excellent blog! I had a quick question which I’d
    like to ask if you do not mind. I was curious to find out how
    you center yourself and clear your mind prior to writing.
    I have had a tough time clearing my thoughts in getting my ideas
    out there. I do enjoy writing however it just seems like the first 10
    to 15 minutes are generally lost simply just trying to figure out how to begin. Any ideas
    or tips? Thank you!

    1. admin Article Author

      Thanks for feedback. now on question when i write any tutorial i make my self a noob start thinking like them .

  5. Brooklyn

    Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I
    get actually enjoyed account your blog posts. Anyway I’ll be subscribing to your feeds and even I achievement
    you access consistently rapidly.

  6. Keto Fat Burner

    It’s appropriate time to make a few plans for the long run and
    it’s time to be happy. I have read this submit and if I may
    just I desire to recommend you few attention-grabbing things or advice.
    Perhaps you could write next articles referring to this article.
    I wish to learn even more issues approximately it!

  7. Maria

    Just wish to say your article is as surprising. The clearness to your put up is
    just nice and i can suppose you are a professional in this subject.
    Well together with your permission allow me to snatch your RSS
    feed to stay up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  8. calvin klein outlet

    This is the suitable weblog for anybody who desires to find out about this topic. You notice a lot its almost hard to argue with you (not that I actually would need匟aHa). You definitely put a new spin on a subject thats been written about for years. Great stuff, simply great!

  9. calvin klein underwear

    I discovered your blog site on google and test just a few of your early posts. Proceed to maintain up the excellent operate. I simply further up your RSS feed to my MSN News Reader. In search of ahead to studying extra from you later on!?

  10. calvin klein outlet

    I was more than happy to search out this web-site.I wanted to thanks to your time for this excellent read!! I definitely enjoying each little bit of it and I’ve you bookmarked to check out new stuff you blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *