web analytics
Evan && Or && Id

Install PHP di FreeBSD

by on Dec.04, 2010, under Belajar IT, Ngoprek

Langsung lagi…. buat menuhin catetan ye….

push#cd /usr/ports/lang/php52
push# make config
pilih option :
[X] CLI Build CLI version
[X] CGI Build CGI version
[X] APACHE Build Apache module
[X] SUHOSIN Enable Suhosin protection system (not for jails)
[X] MAILHEAD Enable mail header patch
[X] FASTCGI Enable fastcgi support (CGI only)
[X] PATHINFO Enable path-info-check support (CGI only)

setelah itu langsung lakukan perintah ini :
push# make all install clean
Setelah kelar edit file httpd.conf dan masukkan 2 baris di bawah :
push# vi /usr/local/etc/apache22/httpd.conf
#### TAMBAHAN UNTUK PHP ####
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#### END ####
dan tambahkan pula index.php pada httpd.conf

DirectoryIndex index.html index.php

lalu save, kelar dah untuk masalah di apache-nya, sekarang lanjut lagi…
Sekarang edit file php.ini di sini kita bisa mengatur setingan php-nya nah by default lakukan dengan cara ganti nama file-nya aja dan ini udah ada dari file bawaan pas instalasinya :

push# mv php.ini-dist php.ini
setelah itu kita restart apache-nya :
push# /usr/local/sbin/apachectl restart

Setelah itu semua sekarang kita coba test php-nya dengan cara :
push# echo ‘<?php phpinfo();?>’ >> /usr/local/www/apache22/data/test.php

setelah itu coba kita test langusng lewat browser :

http://ip-server-nya/test.php

kalo berhasil akan tampil seperti ini :
System FreeBSD push.idconnect.co.id 7.3-RELEASE-p4 FreeBSD 7.3-RELEASE-p4 #0: Thu Dec 2 00:47:25 UTC 2010 root@push.idconnect.co.id:/usr/obj/usr/src/sys/BhoMerT i386
Build Date Dec 4 2010 03:52:00
Configure Command ‘./configure’ ‘–with-layout=GNU’ ‘–with-config-file-scan-dir=/usr/local/etc/php’ ‘–disable-all’ ‘–enable-libxml’ ‘–with-libxml-dir=/usr/local’ ‘–enable-reflection’ ‘–program-prefix=’ ‘–enable-fastcgi’ ‘–with-apxs2=/usr/local/sbin/apxs’ ‘–with-regex=php’ ‘–with-zend-vm=CALL’ ‘–disable-ipv6′ ‘–prefix=/usr/local’ ‘–mandir=/usr/local/man’ ‘–infodir=/usr/local/info/’ ‘–build=i386-portbld-freebsd7.3′

Done…!!! kelar masalah apache, php dan mysql…

Share on Facebook

Komentar

komentar


Leave a Reply


Fatal error: Call to undefined function akismet_counter() in /home/k2165489/public_html/wp-content/themes/pixel/single.php on line 58