Step #1
phpMyAdmin – Download and Install
Home:
http://www.phpmyadmin.net
# Unzip and Untar
tar xvf phpMyAdmin-2.8.1.tar.gz -C /opt/apache/htdocs/
mv /opt/apache/htdocs/phpMyAdmin-2.8.1/ /opt/apache/htdocs/phpMyAdmin/
Step #2
Configure and Test phpMyAdmin
# Configure (by editing a few lines to match your setup):
cp /opt/apache/htdocs/phpMyAdmin/config.default.php
/opt/apache/htdocs/phpMyAdmin/config.inc.php
vi /opt/apache/htdocs/phpMyAdmin/config.inc.php
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'YourPassword'; // MySQL password
# Quick test in your web browser:
http://YourServerIP/phpMyAdmin/index.php
# Edit httpd.conf to allow "main.php" as a default web page for a directory listing, add main.php to the end of this line:
vi /opt/apache/conf/httpd.conf
DirectoryIndex index.html index.php
# Create an ".htaccess" file to permit only users you specify to access phpMyAdmin from the web
vi /opt/apache/htdocs/phpMyAdmin/.htaccess
AuthUserFile /etc/phpMyAdminhtpasswd.users
AuthName "phpMyAdmin Access"
AuthType Basic
require valid-user
# Add the first user to create the password file:
/opt/apache/bin/htpasswd -c /etc/phpMyAdminhtpasswd.users admin
# Add more users without creating a new file:
/opt/apache/bin/htpasswd /etc/phpMyAdminhtpasswd.users SomeUserNameHere
# Edit the Apache configuration file (Add to the very bottom of the file!)
vi /opt/apache/conf/httpd.conf
Alias /phpMyAdmin "/opt/apache/htdocs/phpMyAdmin"
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
# Update permissions
chown -R nobody:nobody /opt/apache/htdocs/
# Restart Apache
/opt/apache/bin/apachectl -k restart
# Quick test in your web browser (You should be prompted for a password:
http://YourServerIP/phpMyAdmin
PeHPMyAdhemin
| Tuesday, February 20, 2007
Pe.. HaPe tak iyeh...
php |
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/
Open eSeSeL
|
OpenSSL v0.9.8b – Secure Sockets Layer
Home:
http://www.openssl.org
# Download (Notes: Users behind a Proxy Server should read this and users without Internet but have a CDRom read this.)
fetch http://www.openssl.org/source/openssl-0.9.8b.tar.gz
# Unzip and Untar
tar xvf openssl-0.9.8b.tar.gz
# Configure
cd openssl-0.9.8b
./config
# Compile - Install
make && make install
Apa Che?
|
Apache – Web server
# Looking for the older Apache v2.0.55?
fetch http://www.ip97.com/apache.org/httpd/httpd-2.2.2.tar.gz
# Unzip and Untar
tar xvf httpd-2.2.2.tar.gz
# Configure
cd httpd-2.2.2
./configure --prefix=/opt/apache --enable-modules=all --enable-mods-shared=all --enable-http --enable-ssl --enable-cgi --enable-cgid --enable-expires
--enable-headers --enable-mime-magic --enable-imagemap --enable-cern-meta --enable-usertrack --enable-unique-id --enable-speling --enable-rewrite --enable-so
--enable-info --enable-auth-dbm --enable-authn-anon --enable-authn-dbd --enable-authn-alias --enable-authz-owner --enable-auth-digest --enable-cache
--enable-mem-cache --enable-dav --enable-dav-fs --enable-dav-lock --enable-dbd --enable-dumpio --enable-ext-filter --enable-deflate --enable-log-forensic
--enable-logio --enable-ident --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-ajp --enable-proxy-balancer --enable-vhost-alias --enable-suexec
# Compile
make && make install
Create an “rc” script to start traplogd at boot time
# Create an “rc” script to start at boot time:
vi /usr/local/etc/rc.d/apache.sh
#!/bin/sh
CHROOT=/opt/apache
PIDFILE=/logs/httpd.pid
echo -n " apache"
case "$1" in
start)
/opt/apache/bin/apachectl -k start
;;
stop)
kill `cat ${CHROOT}/${PIDFILE}`
;;
*)
echo ""
echo "Usage: `basename $0` {start|stop}" >&2
exit 64
;;
esac
exit 0
# Make the startup script executable:
chmod 755 /usr/local/etc/rc.d/apache.sh
Apache Notes for Admins
# Edit the "httpd.conf" to suit your needs, at least change the variables:
vi /opt/apache/conf/httpd.conf
User nobody
Group nobody
ServerAdmin you@example.com
# Set directory permissions:
chown -R nobody /opt/apache/htdocs/
# Commands to remember:
/opt/apache/bin/apachectl -k start
/opt/apache/bin/apachectl -k restart
/opt/apache/bin/apachectl -k stop
# The Apache configuration file:
vi /opt/apache/conf/httpd.conf
# Apache logs:
cd /opt/apache/logs
tail -f /opt/apache/logs/error_log
cat /opt/apache/logs/access_log
# See Also:
http://www.devshed.com/c/a/Apache/Building-Apache-the-Way-You-Want-It/
mod_perl
Home:
http://perl.apache.org/
# Change to the /tmp directory not your normal source dir!
cd /tmp
# Download
fetch http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
# Unzip and Untar
tar xvf mod_perl-2.0-current.tar.gz
# Configure
cd mod_perl-2.0.2
perl Makefile.PL MP_APXS=/opt/apache/bin/apxs
# Edit the "httpd.conf" and add the new perl module to load, at the very bottom of the conf file
vi /opt/apache/conf/httpd.conf
LoadModule perl_module modules/mod_perl.so
# Compile
make && make test && make install
Instalasi LibXML u/ PHP
Step #1 - XML Library
Step #2 - PERL Modules
libxml – XML Library
fetch ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.24.tar.gz
# Unzip and Untar
tar xvf libxml2-2.6.24.tar.gz
# Configure
cd libxml2-2.6.24
./configure
# Compile and install
make && make install
XML Perl Modules
fetch XML-LibXML-Common-0.13.tar.gz
# Unzip and Untar
tar xvf XML-LibXML-Common-0.13.tar.gz
# Configure
cd XML-LibXML-Common-0.13
perl Makefile.PL
# Compile
make && make install
# XML-NamespaceSupport-1.08
http://search.cpan.org/CPAN/authors/id/R/RB/RBERJON/XML-NamespaceSupport-1.09.tar.gz
# Unzip and Untar
tar xvf XML-NamespaceSupport-1.09.tar.gz
# Configure
cd XML-NamespaceSupport-1.09
perl Makefile.PL
# Compile
make && make install
# XML-SAX-0.14
fetch http://search.cpan.org/CPAN/authors/id/M/MS/MSERGEANT/XML-SAX-0.14.tar.gz
# Unzip and Untar
tar xvf XML-SAX-0.14.tar.gz
# Configure
cd XML-SAX-0.14
perl Makefile.PL
# Compile
make && make install
# XML-LibXML-1.58
fetch http://search.cpan.org/CPAN/authors/id/P/PH/PHISH/XML-LibXML-1.58.tar.gz
# Unzip and Untar
tar xvf XML-LibXML-1.58.tar.gz
# Configure
cd XML-LibXML-1.58
perl Makefile.PL
# Compile
make && make install
GD u/ PHP
Overview:
Step #1 - Download, Unzip, Untar, Configure, Compile and Install zlib
Step #2 - Download, Unzip, Untar, Configure, Compile and Install libpng
Step #3 - Using the built-in to FreeBSD "Ports" System: Download and Install libjpeg
Step #4 - Download, Unzip, Untar, Configure, Compile and Install GD
zlib – Free open source compression library
fetch http://www.zlib.net/zlib-1.2.3.tar.gz
# Unzip and Untar
tar xvf zlib-1.2.3.tar.gz
# Configure
cd zlib-1.2.3
./configure
# Compile
make
# Install
make install
libpng – PNG reference library for creating graphics / images
cd /usr/src
fetch http://easynews.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.10.tar.gz
tar xvf libpng-1.2.10.tar.gz
cd libpng-1.2.10
./configure
make
make install
libjpeg – JPG reference library for creating graphics / images
# WARNING: Could not get jpeg library to install correctly via:
# cd /usr/src
# fetch http://www.ijg.org/files/jpegsrc.v6b.tar.gz
# tar xvf jpegsrc.v6b.tar.gz
# cd jpeg-6b/
# ./configure
# make
# make install
# ** GD could not correctly locate it during compile!
# Currently must use fall back method via FreeBSD Ports:
cd /usr/ports/graphics/jpeg
make install
cd /usr/src
fetch http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
tar xvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --disable-shared
make
make install
# Note: Installing software the looks for GD may require adding configure options when you install that software:
# --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include/
Atau langsung saja install via port, hasilnya sbb :
freetype2-2.1.10_3 A free and portable TrueType font rendering engine
gd-2.0.33_4,1 A graphics library for fast creation of images
gettext-0.14.5_2 GNU gettext package
gmake-3.80_2 GNU version of 'make' utility
jpeg-6b_4 IJG's jpeg compression utilities
libiconv-1.9.2_2 A character set conversion library
libtool-1.5.22_2 Generic shared library support script
pkgconfig-0.20 A utility to retrieve information about installed libraries
png-1.2.8_3 Library for manipulating PNG images
Instalasi Mysql Server
MySQL install :
Download binary mysql-5.0.21.tar.gz
# tar xvf mysql-5.0.21.tar.gz
# cd mysql-5.0.21
# ./configure --prefix=/opt/mysql --with-mysqld-user=mysql
# make all && make install
# Install the base database
/opt/mysql/bin/mysql_install_db
# Add a “mysql” user to your system: (MySQL should not need to run as root!)
pw groupadd mysql
pw useradd mysql -g mysql
# Set permissions to correct owner
chown -R mysql:mysql /opt/mysql/
# Start the server
/opt/mysql/bin/mysqld_safe &
# Perform Basic Checks
/opt/mysql/bin/mysqladmin version
/opt/mysql/bin/mysqladmin variables
# Set a Password!
/opt/mysql/bin/mysqladmin -u root password wekQ
# Add a "database" user with password and grant that user permission to connect
/opt/mysql/bin/mysql --user=root --password mysql
wekQ
GRANT ALL PRIVILEGES ON *.* TO mysql@localhost IDENTIFIED BY 'wekQ' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO mysql@"%" IDENTIFIED BY 'wekQ' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
# Run some tests before going into production (optional)
/opt/mysql/mysql-test/mysql-test-run --force
Copy and test the "rc" boot time startup script
# Copy the "rc" startup script
cp /usr/src/mysql-5.0.21/support-files/mysql.server /usr/local/etc/rc.d/mysql.sh
chmod 755 /usr/local/etc/rc.d/mysql.sh
# Test the "rc" script
/usr/local/etc/rc.d/mysql.sh restart
/usr/local/etc/rc.d/mysql.sh stop
/usr/local/etc/rc.d/mysql.sh start
/usr/local/etc/rc.d/mysql.sh reload