installing apache, mysql, php on ubuntu 14.04

apache
– sudo apt-get update && sudo apt-get install apache2

mysql
– sudo apt-get install mysql-server php5-mysql
– sudo mysql_install_db
– sudo mysql_secure_installation

php
– sudo apt-get install php5 libapache2-mod-php5 php5-common php5-mcrypt php5-gd
untuk melihat lalu meng-install tambahan modul php5 (jika diperlukan)
– apt-cache search php5-
– sudo apt-get install <php module>

ubah direktori DocumentRoot
– sudo gedit /etc/apache2/sites-enabled/000-default.conf
– ubah “/var/www” ke (misal) “/home/<myhome>/www”
– sudo gedit /etc/apache2/apache2.conf
– ubah (atau tambah) “<Directory /var/www/>” mjd “<Directory /home/<myhome>/www/>”
– restart apache : sudo /etc/init.d/apache2 restart
kalo pengen prefered dan agak rumit : http://askubuntu.com/questions/413887/403-forbidden-after-changing-documentroot-directory-apache-2-4-6

untuk error (jika ingin memperbaiki, jika tidak, ga masalah) :
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1
solusi 1 :
– sudo gedit /etc/apache2/apache2.conf
– tambah “ServerName localhost”
solusi yg dianjurkan :
– echo “ServerName localhost” | sudo tee /etc/apache2/conf-available/fqdn.conf
– sudo a2enconf fqdn
– restart apache : sudo service apache2 restart

Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s