Build lamp server under Ubuntu

Source: Internet
Author: User
Tags install php php and phpinfo dedicated server vps mysql database vps hosting linux

Build Your owndebian/ubuntu LAMP Server-quick & Easy Do it yourself installation

  • Apache 2-linux Web Server
  • MySQL 5-mysql Database Server
  • PHP4/5-PHP Scripting Language
  • phpmyadmin-web-based database admin software.

    Note:linux + Apache + MySQL + php/perl together commonly known as LAMP Server.

    I, let us prepare a system that has a minimum requirement of Debian/ubuntu version of Linux with atleast 256MB of RAM Available. Anything less than this minimum ram would cause lot of problems since we are running a server along especially MySQL and we Bmin requires lot of RAM to run properly. Mysql would give you nasty the error "Cannot connect to Mysql.sock" If you are dont have enough memory in your server.

    I Love Debian/ubuntu based Linux because the my enormous affinity towards this command apt-get. As a starter knowing this one command, It is very easy to install packages and your dont need to worry about package Dependen Cy and configuration. You are need to buy a dedicated server or a VPS package if you are want to setup your own server. If you are want to experiment with the server and installation it are recommended to buy a VPS package from various hosts. I prefer Vpslink because of their pricing. Believe it or not it are so easy to install and configure your server yourself Eventhough your are new are to Linux and Dedi Cated/vps Hosting.

    The download PuTTy if you are accessing your server through SSH. Just Enter the IP of your server with root login to access your host. As you probably know, Webmin are a freely available server control Panel and we'll setup this once we have completed the LAMP server and Mail server. Webmin makes more easier for the US to fine tune our Linux box.

    Before proceeding to install, update the necessary packages with Debian with this command.

    Apt-get Install update

    1. Installing Apache + PHP

    The Apache is one of the most famous Web server which runs on most Linux based. With just few commands can configure Apache to run with PHP 4 or PHP 5.

    If you are want to install PHP 4, just Apt-get

    Apt-get Install apache2 php4 LIBAPACHE2-MOD-PHP4

    To install PHP5, just run the following on Linux shell. Note this if you dont specify packages with ' 4 ', PHP5 'll be automatically installed.

    Apt-get Install apache2 php5 libapache2-mod-php5

    Apache configuration file is located at:/etc/apache2/apache2.conf and your Web folder is/var/www.

    To check whether PHP are installed and running properly, just create a test.php in Your/var/www folder with Phpinfo () func tion exactly as shown below.

    nano/var/www/test.php

    # test.php
    <?php phpinfo(); ?>

    Point your browser to http://ip.address/test.php or http://domain/test.php and this should show all your PHP configuration and default settings.

    You can edit necessary values or Setup virtual domains using Apache configuration file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.