Senin, 11 Agustus 2008

Instalasi FAMP

Install SSL
Require packet : openssl-0.9.7e.tar.gz
# tar -zxvf openssl-0.9.7e.tar.gz
# cd openssl-0.9.7e
# ./config –prefix=/usr/local
# make
# make install
# mkdir /home/ssl
# cd /home/ssl
# /usr/local/ssl/bin/openssl genrsa -des3 -rand some_big_file_1:some_big_file_2 -out localhost.key 1024
# /usr/local/ssl/bin/openssl rsa -in localhost.key -out localhost.key.unsecure
# /usr/local/ssl/bin/openssl req -new -key localhost.key -out localhost.key.csr
# /usr/local/ssl/bin/openssl x509 -req -days 30 -in localhost.key.csr -signkey localhost.key -out localhost.cert
# chmod 400 localhost.cert
# chmod 400 localhost.key
# chmod 400 localhost.key.unsecure

Install Apache 2!
1. First, you must download file apache, in here, use apache httpd-2.2.4.tar.gz then login to freeBSD as root
2. put your httpd-2.2.4.tar.gz to /usr/src
# cp httpd-2.2.4.tar.gz /usr/src
3. change to /usr/src
# cd /usr/src
4. Extract your httpd-2.2.4.tar.gz with this command:
# tar -zxvf httpd-2.2.4.tar.gz
5. change to /usr/src/httpd-2.2.4
# cd httpd-2.2.46 configure your instalation option
watch (-) sign
# ./configure –prefix=/usr/local/apache2 –enable-so –enable-auth-digest –enable-rewrite –enable-setenvif –enable-mime –enable-deflate –enable-ssl –with-ssl=/usr/local –enable-headers
7. Please sit down and relax and if there no error type this command line
# make
# make install
8. open your loader.conf file using favorite editor
# edit /boot/defaults/loader.conf
then find this entry:
accf_data_load=”NO” # Wait for data accept filter
accf_http_load=”NO” # Wait for full HTTP request accept filter
replace NO with YES then save and exit.
9. restart your computer
10. change directory to /usr/local/apache2/bin
# cd /usr/local/apache2/bin
11. run apache daemon using :
# ./apachectl start
12. test on workstation with call your freeBSD address or freeBSD domain name (if you have already set up your domain name)

Install MySQL 5!
# tar -zxvf /usr/src/mysql-5.0.54.tar.gz
# cd mysql-5.0.54
# ./configure –prefix=/usr/local/mysql –localstatedir=/var/mysql –without-perl –with-unix-socket-path=/var/mysql/mysql.sock
# make all && make install
# cd /usr/local/mysql/bin/
# ./mysql_install_db –user=root
# ./mysqld_safe –user=root &
# ./mysql -u root -p mysql
-> Enter password:

Install PHP 5!
require packet :
* PHP 5.0.3 itself - php-5.0.3.tar.bz2
* CURL library - curl-7.12.1.tar.gz
* libiconv library - libiconv-1.9.2.tar.gz
* JPEG library: jpegsrc.v6b.tar.gz
* PNG library: libpng-1.2.8.tar.gz
* cpdflib library: clibpdf202r1.tar.gz
* libxml2-2.6.31.tar.gz

1. Compile libiconv from source:
# cd /usr/local/src
# tar -zxvf libiconv-1.9.2.tar.gz
# cd libiconv-1.9.2
# ./configure –prefix=/usr/local
# make
# make install

2. Compile jpegsrc from source:
# cd /usr/local/src
# tar -zxvf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure –prefix=/usr/local
# make
# make install-lib

3. Compile libpng from source:
# cd /usr/local/src
# tar -zxvf libpng-1.2.8.tar.gz
# cd libpng-1.2.8
# cp scripts/makefile.linux makefile
# make
# make install

4. Compile cpdflib from source:
# cd /usr/local/src
# tar -zxvf clibpdf202r1.tar.gz
# cd ClibPDF/source
# cp Makefile.Linux makefile
# make
# make install

5. Compile curl from source:
# cd /usr/local/src
# tar -zxvf curl-7.12.1.tar.gz
# cd curl-7.12.1
# ./configure –prefix=/usr/local
# make
# make install

6. Compile libxml2-2.6.31.tar.gz from source:
# cd /usr/src
# tar -zxvf libxml2-2.6.31.tar.gz
# cd libxml2-2.6.31
# ./configure –prefix=/usr/local
# make && make install

7. Extract PHP tarbal
# tar -zxvf php-5.2.4.tar.gz
# cd php-5.2.4
# ./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config –with-mysql-sock=/tmp/mysql.sock –with-sqlite –enable-sqlite-utf8 –with-zlib –with-zlib-dir –with-bz2 –with-gd –enable-gd –enable-gd-native-ttf –with-ttf –with-iconv=/usr/local –with-curl=/usr/local –enable-track-vars –with-config-file-path=/usr/local/apache2/conf –enable-trans-id –enable-ftp –with-cpdflib=/usr/local –enable-mbstring –with-openssl=/usr/local/ssl –with-jpeg=/usr/local/ –with-jpeg-dir=shared,/usr/local –with-png-dir=shared,/usr/local
# make && make install
# cp php.ini-dist /usr/local/apache2/conf/php.ini
# edit /usr/local/apache2/conf/php.ini
mysql.default_socket = /var/mysql/mysql.sock
short_open_tag = On
register_globals = On
allow_url_fopen = On
# apachectl graceful

Install phpMyAdmin!
Require packet:
* phpMyAdmin-2.5.5.tar.gz
extract:
# tar -zxvf phpMyAdmin-2.5.5.tar.gz
# mv phpMyAdmin-2.5.5 /usr/local/apache2/htdocs/phpmyadmin (depend of your document root. Sometimes in /var/www/html etc)
# cd /usr/local/apache2/htdocs/phpmyadmin
# edit config.inc.php
$cfg[’Servers’][$i][’host’] = ’squid.stta’;
$cfg[’Servers’][$i][’port’] = ”;
$cfg[’Servers’][$i][’socket’] = ‘/var/mysql/mysql.sock’;
$cfg[’Servers’][$i][’auth_type’] = ‘http’;
$cfg[’Servers’][$i][’user’] = ‘root’;
$cfg[’Servers’][$i][’password’] = ”;
$cfg[’Servers’][$i][’only_db’] = ”;
add this line to your httpd.conf conf
AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps

Finish (from many resource)!!

Tidak ada komentar: