Secara default, jika kita install mysql server via port maka data-data dari database yang ada dalam mysql server akan tersimpan pada dir /var/db/mysql
Akan merepotkan kalau ternyata partisi /var kita terlalu kecil, sehingga data nambah sedikit aja partisi /var udah penuh.
Ada 2 cara untuk mensiasati hal tsb,
pertama ada merubah letak data directory pada file konfigurasi mysql kita my.cnf.
Hal ini memerlukan perubahan pada file konfigurasi my.cnf
# ee /var/db/mysql/my.cnf
[mysqld]
datadir=/data/mysqlbaru
Create directory tempat data baru disimpan
# mkdir /data/mysqlbaru
merubah owner directory tsb menjadi milik mysql
#chown -R mysql:mysql /data/mysqlbaru
kemudian start mysql
# /usr/local/etc/rc.d/mysql-server start
Cara kedua adalah dengan memindah dan melakukan linking directory mysql.
Detailnya sbb :
matikan server :
# /usr/local/etc/rc.d/mysql-server stop
# cd /var/db
pindahkan directory data mysql ke directory baru yang kapasitasnya lebih lega :
# mv mysql /data
lakukan linking directory
# ln -s /data/mysql /var/db/mysql
start server :
# /usr/local/etc/rc.d/mysql-server start
Merubah data directory pada mysql server FreeBSD Server
Block http brute force dengan PF
Lumayan ada ilmu baru hasil diskusi dengan admin sebelah dan baca manual PF.
Rulenya sbb :
out_if = bce0
table
pass quick from 10.10.3.0/29
block quick from
pass in on $int_if proto { tcp } from any to 10.10.7.4 port 80 flags S/SA keep state \
(max-src-conn 2, max-src-conn-rate 5/5, overload
Penjelasan sbb :
max-src-conn number
Limit the maximum number of simultaneous TCP connections which have completed the 3-way handshake that a single host can make.
max-src-conn-rate number / interval
Limit the rate of new connections to a certain amount per time interval.
Bagi saya yg awam sulit sekali memahami maksudnya, Hiks..
So dicoba aja testing dengan rule diatas saya coba sebagai berikut :
Saya membuka http://10.10.7.4 di 5 tab firefox dan saya reload dalam waktu bersamaan.Dan halaman masih bisa dibuka.
Akan tetapi jika saya buka 6 halaman http://10.10.7.4 dengan browser berbeda maupun browser yg sama maka saya cek :
# pfctl -t bruteforces -Tshow
10.10.7.1
IP saya terjaring dalam rule tsb.
Kemudian rule coba saya ubah
pass in on $int_if proto { tcp } from any to 10.10.7.4 port 80 flags S/SA keep state \
(max-src-conn 1, max-src-conn-rate 5/5, overload
max-src-conn nya saya set 1 saja.
Saya coba buka http://10.10.7.4 pada 1 tab saja di firefox dan coba buka halaman tsb di chrome.
Alhasil :
# pfctl -t bruteforces -Tshow
10.10.7.1
Saya coba juga buka dengan IP berbeda, ternyata ip ke 2 langsung kena jaring
# pfctl -t bruteforces -Tshow
10.10.7.10
Saya menyimpulkan sbb :
max-src-conn : berapa banyak browser yg akan di launch untuk mengakses web kita ternyata.
Tidak membedakan IP. oh ternyata sekali buka browser dan akses itu dihitung 1 TCP connection hehe..
max-src-conn-rate a/b : dalam b detik berapa a tab yg akan dibuka/direfresh.
ada juga max-src-node : asumsi saya ini melimit berapa banyak ip yg boleh mengakses, tidak disarankan kalau web kita untuk umum.
Tproxy
Back to proxy, especially squid. Eh ada lagi yang namanya cacheboy.
Cacheboy adalah optimasi dari squid stable 2. Menurut pemahaman saya sih cacheboy itu versi moddingnya squid 2 begitulah gampangnya. Nah waktu mencoba instalasi via port ada banyak option yang bisa di enable/disable. Nah berhubung sudah lama gak ngutik squid jadi perlu cari2 lagi fungsi2 option tsb. Antara lain :
1. Delay pool : Fitur ini digunakan untuk limitasi bandwidth
2. AUFS dan COSS : Ini adalah tipe file penyimpanan cache dari squid
3. PF dan IPF transparent : Ini untuk mengaktifkan support PF firewall atau IPF firewall untuk transparent proxy
4. Enable Tproxy : untuk mengaktifkan Tproxy.
Penjelasan Tproxy dari internet sbb :
Transparent Proxy (TProxy)
Tproxy is truly transparent proxy. A transparent proxy or more precisely an interception proxy is the one that becomes transparent to the clients by transparently intercepting the http requests and serving the response, which means the client need not be explicitly configured to use the proxy but they are transparently sent to the proxy without the client's knowledge. Since the interception proxy forwards the request on behalf of the client, the web server see's the source of the request come from the proxy and hence it is not transparent to the web server.
The tproxy feature comes into solving this issue and makes itself transparent to both for the client and the web server. However, the interception and/or tproxy feature requires kernel support and packet redirection feature of the operating system.
Note: To make still more truly transparent, the proxy should be configured not to add any extra headers while forwarding the request and serving the response.
Nha kira2 terjemahannya spt ini.
Tproxy adalah transparent proxy yg sebenar2nya. Transparent proxy atau proxy penangkap adalah proxy yang bekerja dengan menangkap paket http/browsing dari client secara transparan. Dengan kata lain, di sisi client tidak memerlukan adanya konfigurasi pengaktifkan proxy karena secara otomatis dan mau tidak mau akan lewat proxy.
Karena proxy tsb menangkap paket dan melakukan koneksi ke webserver tujuan maka yg dikenali oleh webserver tujuan adalah IP dari proxy bukan dari client.
Fitur dari Tproxy inilah kuncinya, sehingga webserver tujuan mengenali langsung ip client (tentu saja ip public). Fitur ini memerlukan pengaktifan pada kernel dari OS yang dipakai.
Install NTP Server di FreeBSD
Caranya mudah. Install saja ntp via port
Kemudian
# ee /etc/ntp.conf
server 3.id.pool.ntp.org
server 0.asia.pool.ntp.org
server 2.asia.pool.ntp.or
driftfile /var/db/ntp.drift
Save file /etc/ntp.conf dengan konfigurasi di atas.
Kemudian start service dengan perintah
/etc/rc.d/ntpd start
Kemudian jalankan perintah
ntpdate -d localhost
Jika ada pesan no server bla2. Maka coba tunggu kisaran 10 s/d 15 menit. Dan coba ulangi lagi sampai terjadi sinkronisasi sbb
1 Mar 14:01:36 ntpdate[19223]: step time server localhost offset -225.715219 sec
Jangan lupa untuk membuka port 123 udp.
install eaccelerator di freebsd
cd /usr/ports/www/eaccelerator
You have installed the eaccelerator package.
Edit /usr/local/etc/php.ini and add:
zend_extension="/usr/local/lib/php/20060613/eaccelerator.so"
Then create the cache directory:
mkdir /tmp/eaccelerator
chown www /tmp/eaccelerator
chmod 0700 /tmp/eaccelerator
u can try to config :
zend_extension="/usr/local/lib/php/20060613/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.shm_size
This setting will allow you to control the amount of shared memory eAccelerator should allocate to cache PHP scripts. The number sets the amount of memory in megabytes. Setting this value to 0 will use the default size.
eaccelerator.shm_size
This setting will allow you to control the amount of shared memory eAccelerator should allocate to cache PHP scripts. The number sets the amount of memory in megabytes. Setting this value to 0 will use the default size.
eaccelerator.shm_size = "0"
On Linux the maximum amount of memory a process can allocate is limited by the number set in /proc/sys/kernel/shmmax. Allocating more than this value will result in eAccelerator failing to initialise. The size in this file is given in bytes. You can raise this amount with:
echo value > /proc/sys/kernel/shmmax
Where value is the size in bytes you want to use. This value is reset to the default value evertime you reboot, but you can raise it permanently by adding the amount you need in /etc/sysctl.conf. This is done by adding:
kernel.shmmax = value
eaccelerator.cache_dir
This directory is used for the disk cache. eAccelerator stores precompiled code, session data, content and user entries here. The same data can be stored in shared memory (for quicker access). The default value is “/tmp/eaccelerator”.
eaccelerator.cache_dir = "/tmp/eaccelerator"
This is easy because that directory is easily writable to everyone, and mounted with noexec. However, it isn’t the best because on a lot of systems this directory is cleared on reboot. A better place is /var/cache/eaccelerator. Create the directory and make sure it’s writable to the process eAccelerator runs under.
A safe bet is making it world writeable, a safer and cleaner way is making the user php runs under (most of the time the same user as apache or lighttpd) the owner and set 0644 permissions.
The lazy way:
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
eaccelerator.enable
With this setting you can enable or disable eAccelerator. This may seem like a pretty stupid setting, but it can be very useful. For example this setting can also be used in the vhost section of the Apache configuration. It allows you to disable eAccelerator for a certian vhost by placing php_admin_value eaccelerator.enable 0 in the vhost section.
Setting this value to “1″ enables eAccelerator, which is also the default value. Setting it to “0″ will disable eAccelerator.
eaccelerator.enable = "1"
eaccelerator.optimizer
Enables or disables the optimizer which may speed up code execution. Setting it “1″ will enable eAccelerator, “0″ disables it. By default the optimizer is enabled. The optimizer will only run when the script is compiled before it’s cached.
eaccelerator.optimizer = "1"
eaccelerator.debug
Enables or disables debug logging. Setting this to 1 will print information to the log file about the cache hits of a file. This is only useful when debugging eAccelerator for bug reports.
eaccelerator.debug = 0
eaccelerator.log_file
Set the log file for eaccelerator. When this option isn’t set then the data will be logged to stderr, when using PHP with Apache these lines will be added to the Apache error log.
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
eaccelerator.name_space
When using the user cache api for storing data in shared memory, all keys are prepended by the hostname used for the current request. This hostname equals the ServerName? set in the vhost section of apache. This is done to avoid duplicate keys between vhosts. Sometimes this behaviour is desired to share data between vhosts. When setting this option this namespace is used to prepend to each key. By default this is set to “” which instructs eAccelerator to use the hostname as namespace.
When setting this in the main PHP configuration file this namespace will be used by all vhosts. This value can also be set in the vhost section or even in a .htaccess file to allow sharing of data between only two vhosts.
eaccelerator.name_space = ""
eaccelerator.check_mtime
On every hit eAccelerator will check the modification time of a script to see if it changed and needs to be recompiled. Although this is a lot faster then opening the file and compiling it, this still adds some overhead because a stat call needs to be done every time. This setting allows you to disable this check. The downside of disabling this check is that you need to manually clean the eAccelerator cache when you update a file.
By default this check is enabled.
eaccelerator.check_mtime = "1"
eaccelerator.filter
Determine which PHP files can be cached. You can specify the pattern (for example “*.php *.phtml”) the PHP script filename needs to match. If a pattern starts with “!”, the files that match that pattern are excluded from the cache. Default value is “” which will cache all scripts PHP compiles.
Please note that eaccelerator.filter doesn’t work on a URL basis but rather on the absolute filesystem path, so a filter of !/home* would exclude all scripts in /home from being cached.
Multiple patterns need to be seperated by spaces or tabs, but not commas.
eaccelerator.filter = ""
eaccelerator.shm_max
By default there is no limit on the maximum size a user can put in shared memory with functions like eaccelerator_put, the maximum size is controlled by this setting. This value is the maximum size that can be put in the cache, the size is given in bytes (10240, 10K, 1M). The default value is “0″ which disables the limit.
This setting doesn’t affect the maximum size for a script”’
eaccelerator.shm_max = "0"
eaccelerator.shm_ttl
When eAccelerator doesn’t have enough free shared memory to cache a new script it will remove all scripts from shared memory cache that haven’t been accessed in at least shm_ttl seconds. By default this value is set to “0″ which means that eAccelerator won’t try to remove any old scripts from shared memory.
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period
When eAccelerator doesn’t have enough free shared memory to cache a script it tries to remove old scripts if the previous try was made more then “shm_prune_period” seconds ago. Default value is “0″ which means that eAccelerator won’t try to remove any old script from shared memory.
eaccelerator.shm_prune_period = "0"
eaccelerator.shm_only
Enable or disable caching of compiled scripts on disk. This has no effect on session data and content caching. Default value is “0″ which allows eAccelerator to use disk and shared memory cacche for scripts.
eaccelerator.shm_only = "0"
eaccelerator.compress
When using the eaccelerator_content_* api eAccelerator can compress the content before saving it to memory. By default this is set to “1″, to disable compression set it to “0″.
eaccelerator.compress = "1"
eaccelerator.compress_level
Compression level used for content caching. Default value is “9″ which is the maximum compression level.
eaccelerator.compress_level = "9"
eaccelerator.keys | session | content
These settings control the places eAccelerator may cache user content. Possible values are:
- shm_and_disk cache data in shared memory and on disk (default value)
- shm cache data in shared memory or on disk if shared memory is full or data size greater then “eaccelerator.shm_max”
- shm_only cache data in shared memory
- disk_only cache data on disk
- none don’t cache data
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"
The webinterface
eAccelerator can be managed through a webinterface. From version 0.9.5 this webinterface has been fully implemented in php so the settings have been changed.
taken from : http://techgurulive.com/2009/02/02/how-to-install-and-configure-the-eaccelerator-php-cache-on-apache/
Belum sempat nerjemahin.. ntar aja soale lagi seru coba2
libperl.so not found.
Snmp tiba2 ngga jalan. errornya gini :
/libexec/ld-elf.so.1: Shared object "libperl.so" not found, required by "libnetsnmphelpers.so.20"
Hmm file library ga nemu pathnya.. kalo ga abis upgrade2 paling yo kedelete..
Solusinya coba cari sbb :
server2# ldd /usr/local/sbin/snmpd
/usr/local/sbin/snmpd:
libnetsnmpagent.so.20 => /usr/local/lib/libnetsnmpagent.so.20 (0x2807e000)
libnetsnmphelpers.so.20 => /usr/local/lib/libnetsnmphelpers.so.20 (0x280b5000)
libnetsnmpmibs.so.20 => /usr/local/lib/libnetsnmpmibs.so.20 (0x280d3000)
libperl.so => /usr/local/lib/libperl.so (0x281b3000)
libm.so.4 => /lib/libm.so.4 (0x282b4000)
libcrypt.so.3 => /lib/libcrypt.so.3 (0x282ca000)
libutil.so.5 => /lib/libutil.so.5 (0x282e2000)
libnetsnmp.so.20 => /usr/local/lib/libnetsnmp.so.20 (0x282ee000)
libkvm.so.3 => /lib/libkvm.so.3 (0x2838d000)
libcrypto.so.4 => /lib/libcrypto.so.4 (0x28394000)
libc.so.6 => /lib/libc.so.6 (0x28487000)
libcrypto.so.7
server2#cp /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so /usr/local/lib
server2# snmpd
server2# ps ax | grep snmpd
8945 ?? S 0:00.11 snmpd
Alhamdulillah oke..
bunuh semua!!
Cara membunuh/kill semua proses pada suatu daemon adl sbb :
ps -ax | grep "/usr/local/sbin/httpd" | awk '{print $1}' | xargs kill
atau kalau mau lihat process owner idnya
ps -aux | grep "/usr/local/sbin/httpd" | awk '{print $2}' | xargs kill
nb : bedanya cuman di awk row nya aja..
bigmem Vs PAE
Memory anda lebih dari 4GB? tapi tidak terdeteksi semua?
Apa pasal?
Hal ini dikarenakan OS yg terinstall 32bit dan kernel bigmem (di linux) atau PAE (di FreeBSD) belum diaktifkan.
Untuk FreeBSD ada 2 cara :
1. tambahkan baris berikut di file kernel anda dan compile ulang
options PAE
menambahkan baris tersebut akan menyebabkan beberapa driver tidak disupport, jadi perlu dipertimbangkan apakah driver dipakai atau tidak.
2. Cara kedua adalah dengan cara install ulang dgn ISO AMD64.
Untuk Debian coba langkah berikut.
- Install lshw untuk cek memori real anda
# apt-get install lshw
# lshw -C memory
# dpkg --get-selections | grep bigmem
# apt-get install linux-image-2.6.26.2-686-bigmem
Cek hasil instalasi kernel dgn perintah berikut :
# dpkg --get-selections | grep bigmem
linux-image-2.6.26.2-686-bigmem install
Untuk menu booting lihat dulu
# grep "Debian GNU" /boot/grub/menu.lst | nl -v0
Sesuaikan menu kernel dgn nomer default boot.
mounting...
kalo tiba2 fbsd ngadat n masuk mountroot, gimana donk ?
1. perhatikan kabel HD yg terpasang apakah sudah di set primary?
2. perhatikan jumper HD, sbg master atau slave wkt instalasi.
Kalau sistem msk single mode dan hanya read only mode. Sedangkan kita butuh ngedit /etc/fstab buat ngedit mount pointnya, caranya sbb :
mount -t ufs rw /dev/ad0s1a / (mounting root, nm partisi sesuiakan)
sunlink
Sunlink bukan merk sabun cuci maupun shampo..
Sunlink di freebsd digunakan untuk memblok delete permission dgn kata lain smua user tidak bisa menghapus file yg telah di sunlink.
Perintahnya :
# chflags sunlink ojodidel.txt
Untuk menonaktifkan sunlink sbb :
# chflags nosunlink ojodidel.txt
Mengenal dot-file di *NIX system
freebsd, linux, pengenalan | Thursday, February 19, 2009
Pasti pernah tau kan dot-file. Ya, yang biasanya ada di home directory (/home/namauser).File tersebut adalah file konfigurasi untuk mengatur setting dari program Unix/Linux seperti shell (bash/ksh/sh), vi (file editor) dan aplikasi lainnya.
File konfigurasi untuk sistem *NIX biasanya disimpan di /etc atau di /usr/local/etc. Tiap aplikasi mempunyai format yang unik, user bisa saja meletakkan file konfigurasi tidak sesuai dengan defaultnya tapi ke directory lain. Untuk menyembunyikan file konfigurasi dari listing normal (ls), maka file/directory bisa diprefik (awalan) dot (titik).
Untuk melihat dot-file bisa digunakan perintah ls -a atau kalau di FreeBSD cukup memakai ll atau kalau mau lebih singkat bisa dengan perintah ls -ld .*
diterjemahkan scr bebas dari : www.cyberciti.biz
Instalasi MRTG menggunakan RRDTool di FreeBSD
MRTG (Multi Router Traffic Grapher) adalah tool yang digunakan untuk menampilkan secara grafis data (traffik) yang telah diambil dari snmp sebuah host. Ehm, gampangnya gini suatu tool agar kita bisa melihat traffik baik itu traffik penggunakan bandwith, penggunaan memory suatu host maupun kinerja processor. Nah si MRTG server ini mengambil datanya lewat SNMP yang sudah terinstall di host yang akan kita capture.
Cara instalasinya mudah saja, jika via port ketik
# cd /usr/ports/net-mgmt/mrtg
# make install clean
Jika via package, ketik saja
# pkg_add -rv mrtg
Setelah instalasi akan muncul /usr/local/etc/mrtg/mrtg.cfg.default, rename saja file tsb menjadi /usr/local/etc/mrtg/mrtg.cfg
WorkDir: /usr/local/www/mrtg/
Options[_]: growright, bits
RunAsDaemon: yes
Target[coba]: 2:public@192.168.2.2:
#perintah di atas adalah mengambil data di interface ke-2 pada host 192.168.2.2
MaxBytes[coba]: 125000
#Batas maksimum yg akan ditampilkan adalah 125000Bytes, alias hampir 1Mbit.
Title[coba]: Traffic Analysis for ADSL
PageTop[coba]: Traffic Analysis for ADSL
Ket :
Saat mrtg dijalankan maka data berupa coba.html (beserta file gambar traffiknya) akan di generate di directory /usr/local/www/mrtg/, jadi di server mrtg juga harus ada webserver untuk menampilkannya. Nah, secara default MRTG akan menggunakan log untuk menyimpan data2 yang diperoleh.
Agar mrtg disimpan dalam database dan interval pengambilan data kurang dari 5 menit (defaultnya kalau pakai default minimal 5 menit), maka saya menggunakan RRDTool.
Caranya :
# /usr/ports/databases/rrdtool
# make install clean
Sedangkan file konfigurasi /usr/local/etc/mrtg/mrtg.cfg, menjadi :
WorkDir: /usr/local/www/mrtg
Options[_]: growright, bits
RunAsDaemon: yes
LogFormat: rrdtool
PathAdd: /usr/local/bin
Refresh: 500
Interval: 2
LogFormat: rrdtool
Target[coba]: 2:public@192.168.2.2:
MaxBytes[coba]: 125000
Title[coba]: Traffic Analysis for ADSL
PageTop[coba]: Traffic Analysis for ADSL
Mudah kan?.. lebih mudah lagi kalau untuk tampilannya anda menggunakan mrtg-rrd.cgi
silahkan disearch ada di google untuk filenya. Dengan file cgi tsb anda ngga usah repot2 ngedit file html anda untuk menampilkan semua grafik mrtg anda..
Selamat mencoba.
Instalasi FreeBSD
Setelah berkenalan dengan FreeBSD, maka tiba saatnya untuk memikirkan hubungan yang lebih serius, yaitu dengan cara install donkk FreeBSDnya. Jangan cuman baca! tapi coba!
Postingan ini akan membahas minimal instalation untuk server/router dan sebangsanya, bukan untuk desktop. Karena itu GUI tidak saya sertakan.
Persiapan :
1. Seperangkat PC (CPU, keyboard dan monitor).
2. CD ISO FreeBSD (terserah versi berapa, karena instalasi hampir sama tiap versi).
Tahap instalasi :
1. Pasang HD dengan mode Primary master dan Boot dari CD.
2. Lakukan booting dan tunggu sampai keluar menu instalasi FreeBSD
3. Tekan enter atau tunggu 10 detik untuk Boot dengan FreeBSD.
4. Muncul menu select country, pilih US dengan menekan space/enter
5. Muncul mode instalasi, pilih custom dan akan muncul banyak menu
6. Pilih "Allocate disk" untuk melakukan partisi HD.
Pada sesi ini kita bisa membagi ruang HD kita sesuai keinginan. Apakah semua akan dipartisi ke freebsd (ufs) ataukah mau dibagi2, misalnya mau install Windows juga dalam satu HD tersebut. Dlm case ini penulis memilih menggunakan seleuruh HD dengan menghapus semua pastisi yg ada (tekan d) kemudian pilih "a" untuk mematisi seluruh HD ke ufs. Jika selesai tekan q untuk keluar dari FDISK partition editor.
7. Setelah itu pilih Standart, karena saya tidak menggunakan boot manager (hanya ada satu OS saja).
8. Setelah itu akan kembali ke menu custom installation (no. 5)
9. Pilih "Label"
Pada sesi ini, kita akan melakukan labelling pada partisi kita yang secara utuh disebut /dev/ad0. Yang harus kita lakukan adalah membagi partisi freebsd yang ada ke dalam beberapa slice yaitu :
a. / (besarnya dikasih 512MB saja cukup)
b. swap (2 kali memori, kali memorinya 64MB kasih 128MB)
c. /var (kasih 512MB atau 1GB cukup)
d. /usr (sisa HD, minimal 2GB)
cara untuk create a s/d d dengan cara tekan "c", masukkan besar sizenya misal : 128MB, pilih FS. Untuk swap (point b) pilih menu swap. Setelah selesai tekan "q".
Sebenarnya ada cara mudahnya, yaitu dengan cara menekan "a", maka partisi akan dibagi secara otomatis oleh sistem, dan tinggal tekan "q" untuk menyimpan setting.
10. Setelah selesai akan kembali ke menu custom install (no. 5)
11. Pilih "Distribution"
Selanjutnya akan muncul banyak pilihan, pilih "minimal" dengan menekan space. Kemudian lanjutkan dengan memilih "Custom"
- pilih "ports" (digunakan untuk memudahkan instalasi software lain.
- pilih "src" -> pilih "sys" (dengan menekan space). kembali ke menu paling atas tekan "exit", lakukan exit lagi sampai anda kembali ke menu custom installation (nomer 5).
12. Pilih media, pilih dari cd
13. Pilih commit dan biarkan proses instalasi sampai selesai.
Setelah selesai instalasi, anda akan ditanya apakah akan kembali ke menu utama, pilih saja tidak dan keluarkan cd dari cdrom dan bootinglah dari HD.
Jika kesulitan dengan langkah instalasi ini, maka anda bisa memilih standar pada langkah 4. Disitu menu akan muncul berurutan tanpa select2 menu.
Kesimpulan :
Untuk instalasi sebenarnya ada 5 tahap utama :
1. Boot dari CD
2. Partisi hardisk
3. Partisi slice (membuat / (baca : root), swap, /usr dan /var)
4. Memilih apa saja yang akan di install
5. Proses Instalasi
Mudah kan? kan?... jangan keder dulu.. dicoba dulu deh. pasti mudah!
Bagi yang udah praktek dari postingan ini kasih komen ya? berhasil apa ngga..
Kali aja bisa sharing2.. ^_*
Pakai FreeBSD, merdeka jinjit wess!!...
Pengenalan FreeBSD
freebsd |
FreeBSD merupakan sistem operasi bertipe Unix yang diturunkan dari UNIX AT&T lewat cabang Berkeley Software Distribution (BSD) yaitu sistem operasi 386BSD dan 4.4BSD.
Selain FreeBSD, OS lain yang berbasis BSD adalah NetBSD dan OpenBSD. Perbedaan dari ketiga OS tersebut simplenya seperti ini. Dilihat dari kelebihannya.
1. FreeBSD : mendukung byk 3rd party software dng semboyan "ready to serve".
2. OpenBSD : menitikberatkan pd security, dgn slogan canggihnya "secure by default".
3. NetBSD : Mendukung banyak hardware dan berbagai arsitektur.
Untuk sejarah lengkapnya bisa dibaca disini
Karena berbasis UNIX maka perintah-perintah dasarnya juga tidak jauh berbeda dengan Linux ataupun OS berbasis UNIX lainnya. Bagi yang telah menguasai Linux akan lebih mudah menguasai Freebsd, tapi buat yang belum bisa sama sekali jangan kecil hati. FreeBSD mudah koq..
FreeBSD lebih cocok dijadikan server daripada desktop. Untuk tampilan grafisnya ada X-Windows, support juga KDE dan GNOME.
Bagi yang ingin menginstall untuk desktop ada PCBSD, DragonFLY dan untuk versi livecd nya ada Freesbie.
Keuntungan memakai freebsd sebagai server ada buwanyakk sekali, diantaranya mudah, gratis(bisa di download langsung dr www.freebsd.org), secure, powerfull, mendukung patch dan update, disertai port dan package u/ memudahkan install software lain, disertai firewall, dan ada team yang akan selalu develop OS FreeBSD. Selain itu masih banyak kelebihan lainnya, tinggal di google aja! Banyak koq situs besar yang menggunakan FreeBSD, al : yahoo, sony japan, apache dll.
Selain itu freebsd juga digunakan sebagai OS di berbagai perangkat seperti Cisco, juniper, Apple dan NetApp.
round robin vs loadbalance part 1
Hari ini hari yang melelahkan, setelah seharian muter2 dan merubah router u/ memanage beberapa link yang sebelumnya memakai metode loadbalace memakai OS mikrotik terpaksa harus migrasi ke metode round robin dengan OS Freebsd.
Masih bingung apa itu load balance, round robin, robin hood.. dll :P. Berikut sedikit kutipan yg saya ambil dari blognya Pak Jay
Dua koneksi
Permasalahan umumnya muncul di sini, saat sebuah router mempunyai dua koneksi ke internet (sama atau berbeda ISP-nya). Default gateway di router tetap hanya bisa satu, ditambah pun yang bekerja tetap hanya satu. Jadi misal router NAT anda terhubung ke ISP A melalui interface A dan gateway A dan ke ISP B melalui interface B dan gateway B, dan default gateway ke ISP A, maka trafik downlink hanya akan datang dari ISP A saja. Begitu juga sebaliknya jika dipasang default gateway ke ISP B.Bagaimana menyelesaikan permasalahan tersebut?
Konsep utamanya adalah source-address routing. Source-address routing ibaratnya anda dicegat di persimpangan oleh polisi dan polisi menanyakan “anda dari mana?” dan anda akan ditunjukkan ke jalur yang tepat.Pada router NAT (atau router pada umumnya), source-address secara default tidak dibaca, tidak dipertimbangkan. Jadi pada kasus di atas karena default gateway ke ISP A maka NAT akan meneruskan paket sebagai paket yang pergi dari IP address interface A (yang otomatis akan mendapat downlink dari ISP A ke interface A dan diteruskan ke jaringan dalam).
Dalam jaringan yang lebih besar (bukan NAT), source-address yang melewati network lain disebut sebagai transit (di-handle dengan protokol BGP oleh ISP). Contoh praktis misalnya anda membeli bandwidth yang turun dari satelit melalui DVB, namun koneksi uplink menggunakan jalur terestrial (dial-up, leased-line atau fixed-wireless). Dalam kasus ini paket inisiasi koneksi harus menjadi source-address network downlink DVB, agar bandwidth downlink dari internet mengarah DVB receiver, bukan ke jalur terestrial.
Di lingkungan Linux, pengaturan source-address bisa dilakukan oleh iproute2. Iproute2 akan bekerja sebelum diteruskan ke table routing. Misal kita mengatur dua segmen LAN internal agar satu segmen menjadi source-address A dan satu segmen lainnya menjadi source-address B, agar kedua koneksi ke ISP terutilisasi bersamaan.
Penerapan utilisasi dua koneksi tersebut bisa mengambil tiga konsep, yaitu round-robin, loadbalance atau failover.
1. Round-robin
Misalkan anda mempunyai tiga koneksi internet di satu router NAT, koneksi pertama di sebut Batman, koneksi kedua disebut Baskin dan koneksi ketiga disebut Williams, maka konsep round-robin adalah sang Robin akan selalu berpindah-pindah secara berurutan mengambil source-address (bukan random). Misal ada satu TCP session dari komputer di jaringan internal, maka koneksi TCP tersebut tetap di source-address pertama hingga sesi TCP selesai (menjadi Batman & Robin). Saat TCP session Batman & Robin tersebut belum selesai, ada ada request koneksi baru dari jaringan, maka sang Robin akan mengambil source-address koneksi berikutnya, menjadi Baskin & Robin. Dan seterusnya sang Robin akan me-round-round setiap koneksi tanpa memperhatikan penuh atau tidaknya salah satu koneksi.Pasti anda sedang pusing membaca kalimat di atas, atau sedang tertawa terbahak-bahak.
2. Loadbalance
Konsep loadbalance mirip dengan konsep round-robin di atas, hanya saja sang Robin dipaksa melihat utilisasi ketiga koneksi tersebut di atas. Misalkan koneksi Batman & Robin serta Baskin & Robin sudah penuh, maka koneksi yang dipilih yang lebih kosong, dan koneksi yang diambil menjadi Robin Williams. Request koneksi berikutnya kembali sang Robin harus melihat dulu utilisasi koneksi yang ada, apakah ia harus menjadi Batman & Robin, Baskin & Robin atau Robin Williams, agar semua utilisasi koneksi seimbang, balance.3. Failover
Konsep fail-over bisa disebut sebagai backup otomatis. Misalkan kapasitas link terbesar adalah link Batman, dan link Baskin lebih kecil. Kedua koneksi tersebut terpasang online, namun koneksi tetap di satu link Batman & Robin, sehingga pada saat link Batman jatuh koneksi akan berpindah otomatis ke link Baskin, menjadi Baskin & Robin hingga link Batman up kembali.
Nah setelah saya implementasikan, ternyata gampangnya gini. Anggap saja kita punya 2 jalur ke internet, jika menggunakan metode :
1. round robin : maka koneksi ke internet akan memakai kedua jalur tersebut secara bergantian, jadi kedua link akan terpakai hampir sama besar.
2. loadbalance : maka koneksi ke internet akan memakai jalur 1, baru setelah jalur satu penuh maka jalur ke 2 bisa digunakan.
Nah,.. dengan kebutuhan yang ada saat ini ternyata lebih cocok menggunakan metode round robin, koneksi jadi lebih wuzz wuzz..
Setting Router
Install minimal FreeBSD (penulis menggunakan FreeBSD 6.3) dgn memilih sys pada option src dan tambahkan port untuk memudahkan instalasi 3rd party software.
Aktifkan PF, IPFW, dan IPFILTER (sebenarnya PF cukup, tapi tidak ada salahnya install fitur2 tsb u/ kebutuhan2 ttt), sshd, enable_gateway.
Install mtr, ifstat, net-snmpd & mrtg, tcptrack, trafshow, lynx, apache, kesemuanya adalah tool u/ monitoring.. sangat2 berguna.
Sementara itu dulu, detailnya instalasi step by step nya akan saya bahas next aja.. skr meski baru jam 8 lebih dah capek beratttt...cawwww!...
Port di FReeBSD
cd /usr/ports/ports-mgmt/portupgrade
make install clean
It's now possible to update all the software on the system by running the command:
portupgrade -ai
portaudit
which shows the published vulnerabilities affecting the packages installed on your system
As the superuser root, run:
cd /usr/ports/ports-mgmt/portaudit
and then
make install clean
It's now possible to update the vulnerabilities database and audit the installed packages by running the command:
portaudit -Fa
Those are some tricks you may find useful:
to show the differences between the version of the installed packages and the ones of the ports collection currently present on the system, run:
pkg_version -v
to print some informations of a port, like it's dependencies, for example of asterisk, run, in the /usr/ports folder, the command:
make search name=asterisk
to print the dependencies of an installed package, for example of gmake, run:
pkg_info -xr gmake
to print the dependencies of a package, even not installed, for example of proftpd, run, in the folder of it's port, the command:
make pretty-print-build-depends-list
but first you have to run, in the /usr/ports folder, the command:
make index
which, after a while, will build an index with the informations of the packages
And if, for example, the package portupgrade is installed, it's manual can be viewed by running:
man portupgrade