Está en la página 1de 8

buku saku 3

Buku Saku FreeBSD


{ Instalasi WebServer FreeBSD 8.4 }
FAMP {FreeBSD | Apache | MariaDB | PHP}
+++++++++++++++++++
#######################
+++++++++++++++++++
./created
# AndyHidayat

www.belajarfreebsd.or.id
www.andyh.id
instalasi WebServer FreeBSD

buku saku 3

1. Persiapan Repo Offline

# Ambil repo-repo yang dibutuhkan sesuai dengan gbr


diatas : ftp://ftp.belajarfreebsd.or.id
# ftp ftp.belajarfreebsd.or.id/pub/FreeBSD/NEW
username : anonymous
passwd : asal aja atau kosongkan
# ftp > get portsnap84-09112014.zip
# ftp > get distfiles84-ldap-09112014-full.zip
# ftp > get src84-stable-09112014.zip

instalasi WebServer FreeBSD

buku saku 3

2. Repo Ekstrak

# cd /usr/home/andy
# tar -zxvf portsnap84-09112014.zip -C /var/db/
# portsnap extract
# tar -zxvf distfiles84-ldap-09112014-full.zip -C /usr/ports/
# cp /usr/share/examples/etc/make.conf /etc/
# ee /etc/make.conf
# Tambahkan baris di bawah ini :
MASTER_SITE_OVERRIDE=http://repo.belajarfreebsd.com/distfiles/${DIST_SUBDIR}/

# Save dengan menekan CTRL+c & ketik : exit

instalasi WebServer FreeBSD

buku saku 3

3. Preparing System

# ee /etc/fstab
# tambahkan baris :
proc
/proc

procfs

rw

# ctrl + c & ketik {exit}

instalasi WebServer FreeBSD

buku saku 3

4. Install Apache22

# cd /usr/ports/www/apache22 && make install clean


# echo "DEFAULT_VERSIONS+=apache=2.2" >> /etc/make.conf

# ee /etc/rc.conf
tambahkan baris :
# Apache22 Service
apache22_enable="YES"
apache22_http_accept_enable="YES"
# ee /usr/local/etc/apache22/httpd.conf
edit baris :
ServerAdmin {emailanda}
ServerName
{domainanda} | hilangkan tanda {#}
# service apache22 start
# Cek Browser dengan mengetikkan ip server
# It Works !

instalasi WebServer FreeBSD

buku saku 3

5. Install MariaDB55-Server

# cd /usr/ports/databases/mariadb55-server && make install clean


# cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf

# ee /etc/rc.conf
tambahkan baris :
# MariaDB55 Service
mysql_enable="YES"
# service mysql-server start
# mysqladmin -u root password PasswordAnda
# mysql -u root -p
mariaDB [(none)] >

instalasi WebServer FreeBSD

buku saku 3

6. Install PHP5

# cd /usr/ports/lang/php5 && make install clean


# cd /usr/local/etc/ && cp php.ini-production php.ini

# ee php.ini
edit baris :
date.timezone = Asia/Jakarta | hilangkan tanda {;}
session.save_path = "/tmp" | hilangkan tanda {;}
# ee /usr/local/etc/apache22/httpd.conf
tambahkan baris :
date.timezone = Asia/Jakarta | hilangkan tanda {;}
session.save_path = "/tmp" | hilangkan tanda {;}

instalasi WebServer FreeBSD

buku saku 3

7. Install Module PHP Apache

# cd /usr/ports/www/mod_php5 && make install clean


# cd /usr/local/www/apache22/data
# ee phpinfo.php
tambahkan baris :
<?php
phpinfo();
?>
# service apache22 restart
# cek browser & ketikkan : http://ipanda/phpinfo.php

instalasi WebServer FreeBSD

También podría gustarte