Install Apache2, PHP5, MySQL, phpMyAdmin di Ubuntu

Posted on by 0 comment

Untuk Instalasi kita menggnakan command line lewat terminal

  1. Instalasi MySQL
    sudo apt-get install mysql-client mysql-server
    setelah proses instalasi selesai, edit file /etc/mysql/my.cnf
    comment line
    bind-address = 127.0.0.1
    sehingga menjadi
    # bind-address = 127.0.0.1
    setelah edit, silahkan restart mysql
    sudo service mysql restart
  2. Instalasi Apache2, PHP5, phpMyAdmin
    sudo apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libruby libapache2-mod-python php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl memcached snmp
    Lalu aktifkan PHP5 mcrypt module
    php5enmod mcrypt
    Aktifkan Apache modules suexec, rewrite, ssl, actions, dan include (plus dav, dav_fs, dan auth_digest jika kamu ingin menggunakan WebDAV)
    a2enmod suexec rewrite ssl actions include cgi
    a2enmod dav_fs dav auth_digest
    Lalu edit file /etc/apache2/mods-available/suphp.conf menjadi seperti berikut:

    <IfModule mod_suphp.c>
    #<FilesMatch "\.ph(p3?|tml)$">
    #    SetHandler application/x-httpd-suphp
    #</FilesMatch>
    suPHP_AddHandler application/x-httpd-suphp
    AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml    <Directory />
    suPHP_Engine on
    </Directory># By default, disable suPHP for debian packaged web applications as files
    # are owned by root and cannot be executed by suPHP because of min_uid.
    <Directory /usr/share>
    suPHP_Engine off
    </Directory># # Use a specific php config file (a dir which contains a php.ini file)
    #       suPHP_ConfigPath /etc/php5/cgi/suphp/
    # # Tells mod_suphp NOT to handle requests with the type <mime-type>.
    #       suPHP_RemoveHandler <mime-type>
    </IfModule>
    
Category: Linux, Pemrograman, PHP, Ubuntu

Leave a Reply

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