Apache


Install Apache, MySQL dan PHP pada Ubuntu 16.04

  1. Update package manager.
    sudo apt-get update
  2. Install dan jalankan apache.
    sudo apt-get install apache2
    sudo systemctl start apache2.service
  3. Install MySQL.
    sudo apt-get install mysql-server
    sudo /usr/bin/mysql_secure_installation
  4. Install php.
    sudo apt-get install php

    Install PHP extensions GD, MySQL.

    sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} && sudo apt-get install libapache2-mod-php -y
  5. Setting auto start untuk Apache dan MySQL.
    sudo systemctl enable apache2.service
    sudo systemctl enable mysql.service

    Restart Apache untuk menjalankan PHP.

    systemctl restart apache2.service