hit counter


Go to Next Post

Installing Apache on FreeBSD
Berikut ini adalah langkah menginstall Apache di FreeBSD
1.Download lah file tar dari distribusi Apache, disini saya mengambil file apache versi 2.2.3 yaitu httpd-2.2.3.tar.bz2 yang bisa diambil disini
3.letakkan di /usr/src
4.masuk ke direktori /usr/src
5.ekstrak dengan tar -jxvf httpd-2.2.3.tar.gz
6.setelah itu jalankan perintah configure
./configure --prefix=/usr/local/apache2/
7. lalu make
$ make
8.terakhir make install
$ make install
9.masuk ke /usr/local/apache2/bin/ jalankan
$ ./apachectl start
10.cek localhost di browser, muncul tulisan it works, maka berhasil

Installing MySQL on FreeBSD
Berikut ini adalah langkah menginstall MySQL di FreeBSD
1.Download lah file dari distribusi MySQL, disini saya mengambil file mysql-max-5.0.21-freebsd6.0-i386 yang bisa diambil di disini
3.letakkan di /usr/src
4.masuk ke direktori /usr/src
5.ekstrak dengan tar -zxvf mysql-max-5.0.21-freebsd6.0-i386.tar.gz
6.untuk mempermudah rename folder mysql-max-5.0.26-freebsd6.0-i386 menjadi mysql
7.setelah itu jalankan perintah configure
8.masuk ke direktori mysql untuk membuat user dan group mysql

[root@
Phantasma /usr/src/mysql]# adduser
Username: mysql
Full name: mysql
Uid (Leave empty for default):
Login group [mysql]: mysql
Login group is mysql. Invite mysql into other groups? []:
Login class [default]:
Shell (sh csh tcsh bash nologin) [sh]: nologin
Home directory [/home/mysql]: noexistent
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]: no
Enter password:
Enter password again:
Use an empty password? (yes/no) [no]: yes
Lock out the account after creation? [no]: no
Username : mysql
Password :
Full Name : mysql
Uid : 1002
Class :
Groups : mysql
Home : noexistent
Shell : /usr/sbin/nologin
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added (mysql) to the user database.
Add another user? (yes/no): no
Goodbye!


9.Setelah itu buat link dari path mysql ke mysql dengan cara

Phantasma# ln -s /usr/src/mysql mysql
Phantasma# cd mysql
Phantasma# scripts/mysql_install_db

10.Ubah kepemilikan dari folder folder yang ada

Phantasmay# chown -R root .
Phantasma# chown -R mysql data
Phantasma# chgrp -R mysql .

11.setelah itu jalankan perintah berikut ini

moonaray# bin/mysqld_safe --user=mysql &

12.Instalasi selesai

Installing PHP on FreeBSD
Berikut ini adalah langkah menginstall PHP di FreeBSD

saya menggunakan file php-5.2.4.tar.bz2 yang diambil dari sini
1.langkah 1-4 sama dengan langkah instalasi MYSQL
2.ekstrak dengan tar -jxvf 3.setelah itu masuk ke direktori di /usr/src/php5
5.jalankan ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql
5.jalankan make
6.lalu make install
7.setelah make install lalu kopikan php.ini.dist ke /usr/local/lib/php.ini
cp php.ini-dist /usr/local/lib/php.ini
8.tambahkan baris berikut ke httpd.conf

LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

9.setelah itu restart apache dengan mengeksekusi

apachectl stop
alachectl start

10.Untuk mengecek hasilnya, buat sebuah file misal test.php di htdocs, tulis script berikut

phpinfo();
?>

save dan lihat di http://localhost/test.php
11.jika keluar informasi tentang php, maka php sudah berhasil dijalankan
12.Sekarang cek koneksi ke mysql dengan cara sebagai berikut
13.edit file test.php tadi rubah isinya menjadi

$test=mysql_connect("localhost","mysql","");
if(!$test)
{
print "NOK, Koneksi Gagagal";
}
else
{
print "OK, Koneksi Behasil";
}
?>

14.Jalankan browser dan lihat di http://localhost/test.php
15.jika OK Koneksi Berhasil, maka koneksi berhasil

 

_FIN_

74%How Addicted to Blogging Are You?

Search

Archives:

December 2009
M T W T F S S
« Feb    
 123456
78910111213
14151617181920
21222324252627
28293031  

New Posts:

Sponsored By:

UBL BLogger