• Breaking News

    How To Setup As Well As Configure Light On Ubuntu Server?

    LAMP stands for Linux Apache Mysql too PHP stack which is the base of operations to run spider web server too websites based on PHP. I am going to explicate how y'all tin forcefulness out laid upwards LAMP on whatever ubuntu server or ubuntu car measuring yesteryear step. Like too Share to spread this to people who needs it.
    LAMP stands for Linux Apache Mysql too PHP stack which is the base of operations to run spider web server too w How to setup too configure LAMP on ubuntu server?

    Hello Intelligent people out there, greet from Dheeraj.
    If y'all are a Web developer, or organization administrator, y'all must travel having persuasion what LAMP is, too precisely similar LAMP in that place are WAMP stands for Windows Apache Mysql too PHP too XAMPP where X stands for Cross platform.
    If y'all are on linux car too working alongside ascendency lines only, let's larn to know how y'all tin forcefulness out setup LAMP inside 10 infinitesimal at max, depending on your cyberspace speed for sure.


    First affair first

    Make certain all your packages are updated on server.
    To brand certain this, execute this command



     sudo apt-get update 


    This should install updates if available for your system. Once done, let’s larn started.


    1. Install LAMP Packages

    First of all let’s execute ascendency to install all of the required constituent to install PHP stack along alongside Apache too mysql
    Execute next ascendency into the putty or your final window.



      sudo apt-get install php apache2 libapache2-mod-php mysql-server php-mysql  


    This volition enquire for about difficult crusade infinite to travel used too installation should begin.


    During installation of mysql inwards between, y'all volition travel asked to render default mysql username too password for your server.
    Provide those details, this volition travel used to login to phpmyadmin too connecting database equally well.


    Once installation is finished, restart apache2 to salve too update the settings. For the same reason, execute next command.



     sudo service apache2 restart  


    Update: If your MySQL installation didn't enquire for the password at the fourth dimension of installation, delight larn through next additional steps to laid a password


    sudo mysqld_safe --skip-grant-tables& sudo mysql --user=root mysql mysql> update user laid authentication_string=PASSWORD('new-password') where user='root'; even privileges; quit sudo service mysql restart sudo mysql -u root -p travel out 


    Followed yesteryear next ascendency too pedagogy for the same.

    sudo mysql_secure_installation 

    2. Check too verify mysql installation

    This is simple, y'all tin forcefulness out cheque mysql installation yesteryear next command



     mysql -u root -p 


    LAMP stands for Linux Apache Mysql too PHP stack which is the base of operations to run spider web server too w How to setup too configure LAMP on ubuntu server?

    Followed yesteryear password, if y'all are able to login, type exit command to travel out too this makes certain your mysql is been installed equally well.


    3. Installing phpMyAdmin

    Now we’ll install phpmyadmin, to brand certain y'all knows this, your Apache default directory is
    /var/www/html
    You tin forcefulness out cheque apache installation yesteryear visiting IP of your server or whatever DNS that is associated alongside it. This volition exhibit apache default page located at /var/www/html/


    Now to install phpmyadmin, execute next command.



      sudo apt-get install phpmyadmin  


    This volition install phpmyadmin too 1 time done, y'all bring to brand curt link or say shortcut of this to your root directory/phpmyadmin folder thence that y'all tin forcefulness out access via web/http


    To practise so, execute next command.



      sudo ln -s /usr/share/phpmyadmin/ /var/www/html/  


    This volition create a shortcut too y'all tin forcefulness out access your phpmyadmin using /phpmyadmin.
    You tin forcefulness out also rename phpmyadmin folder to anything y'all want.


    To cheque this, opened upwards your root directory/phpmyadmin or folder cite y'all bring specified, this volition opened upwards phpmyadmin too y'all tin forcefulness out login yesteryear entering username too password of mysql equally stated earlier.


    4. Finalizing setup too enabling htaccess

    You may travel asked to install mbstring or missing mbstring when running phpmyadmin, to fix that thing, but execute next ascendency to install it.



     sudo apt-get install phpmyadmin php-mbstring php-gettext 


    This volition enable mbstring, too to brand this setting effective, restart apache services equally nosotros bring done before yesteryear executing command



     sudo service apache2 restart 


    Now we’ll enable htaccess yesteryear changing configuration setting of apache.
    First execute next ascendency to enable rewrite



     sudo a2enmod rewrite 


    Now edit file using your favorite editor. For my illustration i’ll purpose vim to edit configuration file yesteryear passing next command.



     sudo vi /etc/apache2/apache2.conf 


    LAMP stands for Linux Apache Mysql too PHP stack which is the base of operations to run spider web server too w How to setup too configure LAMP on ubuntu server?


    Now await for department where you’ll find
    <Directory /var/www/>
           Options Indexes FollowSymLinks
           AllowOverride None
           Require all granted
    </Directory>


    Edit this department too change AllowOverride None to AllowOverride all
    Save too quit editor.


    Now over again restart apache2.


    One to a greater extent than thing, inwards illustration y'all are on AWS too installing LAMP on AWS later creating your ain vpc, your default user volition travel ubuntu too possessor of /var/www/html is root too y'all mightiness non bring write permission on this directory.
    In that case, y'all tin forcefulness out execute next ascendency to alter the possessor of html folder to electrical current user i.e. ubuntu.
    By executing next command.



     sudo chown ubuntu /var/www/html 


    5. Setting upwards filezilla connexion to your ubuntu server using keyfile.

    This is tardily too.
    1. Open filezilla
    2. Navigate to File > Sitemanager
    3. Click on New site button.
    4. Provide details equally follows:
    LAMP stands for Linux Apache Mysql too PHP stack which is the base of operations to run spider web server too w How to setup too configure LAMP on ubuntu server?

      1. Hostname : your server’s IP address
      2. Port (leave blank)
      3. Connection type : sftp
      4. Username : ubuntu
      5. Keyfile : browse too choose .pem file for AWS ec2 server which y'all bring created during server launch.
      6. Click on connect.
    Upon connection, y'all volition travel able to connect to your server anytime. Navigate to /var/www/html to upload your php projection too directory construction volition travel started root from this directory only.


    Hope these points helped y'all to setting upwards server too connecting your server especially on AWS.
    If y'all bring whatever doubt, whatever bug, or question, delight leave of absence comment below.
    Share alongside your friends, grouping too on social media for sure.
    Have keen time.