Ngoprek WebServer

Membangun Webserver tu terdiri dari Apache, MySQL, PHP

Mari kita pertama ngistall APACHE dolo…

  1. masuk ke directori APACHE22 + install

cd /usr/ports/www/apache22

make install clean

  1. edit rc.conf

vi /etc/rc.conf

tambahin :

apache22_enable=”YES”

apache22_http_accept_enable=”YES”

  1. Ngidupin Apache

/usr/local/etc/rc.d/apache22 start

trus di cek udah nyala belum

ps ax | grep http

Mari lanjut, mengistall pHp5

  1. masuk ke directori php5 + install

cd /usr/ports/lang/php5

make install clean

  1. edit httpd.conf di apache

vi /usr/local/etc/apache22/httpd.conf

tambahin baris ini dibawah sendiri:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
  1. Copy file php.ini-recomended dengan nama php.ini di directori usr/local/etc

cd /usr/local/etc

cp php.ini-recomended php.ini

  1. restart apache

 /usr/local/etc/rc.d/apache22 restart

  1. Bikin file blabla.php di document root

vi /usr/local/www/apache22/data/phpinfo.php

tuliskan:

<?php phpinfo(); ?>

  1. Ngecek udah jalan ato kaga tu lewat browser

tulis:

http://nama_host/phpinfo.php

ex—> http://167.205.3.58/phpinfo.php

lanjut, terakhir..ngistall mysql

  1. masuk directori mysql50 + install

cd  cd /usr/ports/databases/mysql50-server

make install clean

  1. edit rc.conf

vi /etc/rc.conf

tulisin: mysql_enable

  1. bikin cofigurasi mysql

saran awa si ngopy ajah bos..gw si suka configurasi yang medium

cp /usr/local/share/mysql/my-medium.cnf /var/db/mysql/my.cnf
4. Njalanin mysql

/usr/local/etc/rc.d/mysql-server restart

  1. Ngecek udah jalan ato belom

ps ax | grep mysql

SIP..lah selese juga de ngistall webserver..

oiya..penting juga ni macem library buat php5, yaitu php5-extention

cd /usr/ports/lang/php5-extention

make install clean

Ngoprek WebServer

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