Pe.. HaPe tak iyeh...

| Tuesday, February 20, 2007

PHP v5.1.4 on FreeBSD 6.1

Pemanasan :
FreeBSD (Base + Autoconf, Automake, Bash and GCC)
OpenSSL
GD
LibXML
Apache
MySQL
----------------------------------------------------------------
FreeTDS - Connect to a Microsoft SQL Server via Perl from UNIX
Prerequisites:
FreeBSD (Base + Autoconf, Automake, Bash and GCC)
Perl Modules (DBI)

Overview:
Step #1 - Download, Unzip, Untar, Configure, Compile and Install FreeTDS
Step #2 - Download, Unzip, Untar, Configure, Compile and Install DBD::Sybase
Step #3 - unixODBC (Not required for FreeTDS, but logical to install it now)
-----------------------------------------------------------------

PHP - Portable Hypertext Preprocessor

Home:
http://www.php.net

# Download (Notes: Users behind a Proxy Server should read this and users without Internet but have a CDRom read this.)
cd /usr/src
fetch http://us2.php.net/distributions/php-5.1.4.tar.gz

# Unzip and Untar
tar xvf php-5.1.4.tar.gz

# Stop Apache
/opt/apache/bin/apachectl -k stop

# Configure
cd php-5.1.4
./configure --with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql --with-openssl=/usr/local/ssl --with-mssql=/usr/local --with-zlib-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --enable-exif --with-png-dir=/usr/local/lib --enable-calendar --enable-ftp --with-libxml-dir=/usr/local/lib --with-snmp=/opt/net-snmp/ --enable-fastcgi --enable-magic-quotes --enable-mbstring --enable-sockets --with-gd --enable-gd-native-ttf --enable-soap --enable-sigchild --enable-dbase --enable-filepro --with-mssql


./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/local/lib --enable-ftp --with-libxml-dir=/usr/local --enable-fastcgi --enable-magic-quotes --enable-mbstring --enable-sockets --with-gd --enable-gd-native-ttf --enable-filepro --enable-module=so --with-freetype-dir=/usr/local/lib --with-snmp --enable-calendar --enable-exif

# make && make install


Step #2 - Configure and Test

php.ini and phpinfo.php

# Copy the "php.ini" file
cp php.ini-dist /usr/local/lib/php.ini

# Edit the Apache configuration file (Add to the very bottom of the file!)
vi /opt/apache/conf/httpd.conf
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

# Restart Apache:
/opt/apache/bin/apachectl -k restart

# Create a PHP Info file
vi /opt/apache/htdocs/phpinfo.php


# Test the phpinfo.php file with your web browser:
http://YourServerIP/phpinfo.php

# Edit the "php.ini" to suit your needs!
vi /usr/local/lib/php.ini
# You may want to add: /usr/local/lib/php to your php.ini include_path
include_path = ".:/usr/local/lib/php"

# Notes:
# PEAR system config file at: /usr/local/etc/pear.conf
# PDO headers: /usr/local/include/php/ext/pdo/


0 komentar: