Menu Utama

Login

Nama Samaran:

Kata Laluan:

Lupa Kata Laluan?
Daftar Sekarang!

Carian

Tutorial Terkini

Download Terkini

Random News

Info Linux

Distro Terkini
Package terkini
Berita terkini
LXer
OSDir

Recent Replied Topics

Forum Topic Replies Views Last Post
Sistem Operasi VMware images 2 10 1/5 22:48
badrbaharuddin
Sistem Operasi Initramfs 5 29 12/26 18:09
blank
Sistem Operasi Radius and Chilli 187 928 12/26 10:32
orex
Sistem Operasi mail for root 16 64 12/23 11:03
jenal
Sistem Operasi Atheros wifi dalam Hardy 2 11 12/22 11:56
jenal

(1) 2 3 4 ... 47 »
Mambang News : thttpd - webserver simple bersaiz kecil
Dihantar oleh oshiri on 2009/1/5 9:52:26 (2 bacaan)

Thttpd kerap kali dilupakan oleh kebanyakan pengguna memandangkan apache/apache2 lebih mendominasi aplikasi webserver.
Walaupun kadang-kala kita hanya ingin "serve" static webpage.

Bagi aku, thttpd mempunyai kelebihan sendiri berbanding aplikasi webserver "bloated" lain. Terutama sekali pada keupayaan "builtin"nya untuk "throttle" bandwidth.
Tentu sekali apache/apache2 juga mempunyai keupayaan untuk "throttle" bandwidth dengan bantuan module seperti mod_throttle dan bw_mod. Tapi konfigurasinya agak sukar untuk pengguna yang baru.

Kelebihan ini menjadikan thttpd sesuai dijadikan "public file server" seperti kpf pada kde.

Untuk system Debian dan Debian based, anda boleh install thttpd menggunakan arahan:

apt-get install thttpd


2 file konfigurasi penting untuk thttpd:
1. /etc/thttpd/thttpd.conf - konfigurasi global
Default adalah seperti berikut:

#------------------------------------------------------------------------------#
#                           thttpd version 2.23beta1                           #
#                           Main configuration file                            #
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
# Port: portnum
# Sets the port number which will be listened by thttpd.
# Default: 80
#
port=80

# chroot/nochroot
# Sets whether thttpd will chroot after starting.
# Default: nochroot
chroot

# user: userid
# Specified which user to switch after intialiazation when started as root.
# Default: www-data
user=www-data

# host: hostname
# Specifies a hostname to bind to.
# Default: Bind to all supported hostnames on the local machine.
# host=grugler

# Logfile: logfile path
# Specifies a file for logging.
# Default: Log via syslog()
logfile=/var/log/thttpd.log

# throttles: file
# Specifies a file of throttle settings.
# Default: /etc/thttpd/throttle.conf
throttles=/etc/thttpd/throttle.conf

# urlpat: pattern
# Specifies which URL can only be only be accessed from the local server.
# Default: None
# urlpat=*.mpeg|*.mp3|*.wav|*.gz|*.jpg|*.gif

# dir: directory
# Specifies a directory to chdir() to after thttpd starts.
# This directory will most likely be the directory you will be serving your
# clients from.
# Default: `cwd`
dir=/var/www

# cgipat: pattern
# Specifies which URL may contain executable CGI files.
# Default: None
cgipat=/cgi-bin/*


Di sini anda boleh mengubah port yang akan digunakan, direktori dimana webpage anda berada dan sebagainya.

2. /etc/thttpd/throttle.conf - konfigurasi untuk limit bandwidth
Contoh:
# thttpd 2.23beta1
# Main throttle configuration file
# This is a sample configuration file for thttpd's URL throttling feature
# This configuration is intended for a 56KB dialup connection.
# It is assumed that our dialup can reach throughput of about 3500 bytes per
# second.
#------------------------------------------------------------------------------#
#
# Format:
# <pattern>     <number>
#

#*              3000    # Only devote 3000 bytes per second to our dialup

**.gz           1000


Contoh di atas (**.gz 1000), adalah untuk throttle file dengan extension .gz kepada 1000 B/s.

Untuk memulakan service thttpd:
/etc/init.d/thttpd start


Screenshot download file dengan extension .gz di throttle kepada 1000B/s :



Comments?
Mambang News : Selamat Hari Natal
Dihantar oleh blank on 2008/12/25 7:00:00 (9 bacaan)


Selamat Menyambut Hari Natal
Kepada
Semua penganut Agama Kristian

Comments?
Mambang News : My version of setting up fusesmb
Dihantar oleh oshiri on 2008/12/10 9:59:53 (29 bacaan)

Fusesmb adalah userspace tools untuk memudahkan kita mount samba shares. Pelbagai tutorial telah aku ikuti berkaitan fusesmb, tetapi tidak berjaya. Mount point folder sentiasa kosong!
So disini aku akan kongsikan versi tutorial fusesmb aku sendiri yang telah pun berjaya diuji.

Apa yang diperlukan ialah: samba, fusesmb, fuse-utils, smbclient dan winbind(bagi pengguna router; sila rujuk: http://mambang.org.my/modules/news/article.php?storyid=224&keywords=winbind).

apt-get install samba smbclient winbind fusesmb fuse-utils


1. Edit /etc/samba/smb.conf pada bahagian global :
[global]
name resolve order = wins hosts lmhosts bcast
workgroup = MSHOME
server string = Oshirix Samba Server
map to guest = Bad User
restrict anonymous = no
guest ok = yes
domain master = no
preferred master = no
max protocol = NT
acl compatibility = winnt
ldap ssl = No
server signing = Auto
security = user
socket options = TCP_NODELAY


Bahagian terpenting adalah nama workgroup dan security.
Tetapkan security kepada user dan ubah nama workgroup kepada workgroup network anda.

2. Sebagai user, bina direktori .smb pada HOME anda:
mkdir ~/.smb


3. Bina file fusesmb.conf :
nano ~/.smb/fusesmb.conf


Masukkan baris berikut:
[global]
; Default username and password
username=xxxx
password=yyyy

; List hidden shares
showhiddenshares=true

; Connection timeout in seconds
timeout = 10

;Interval for updating new shares in minutes
interval = 10

; Don't list these servers and/or workgroups separated by commas
;[ignore]
;servers=SERVER,SERVER2,SERVER3
;workgroups=WORKGROUP,WG2


; Share specific settings (server name should start with a slash (/)
; [/SERVER/SHARE]
; username=xxxx
; password=yyyyy

; Server specific settings (server name should start with a slash (/)
;[/SERVER]
; username=xxxx
; password=yyyyy
; showhiddenshares=true
; ignore=true


Sila ubah username dan password.

4. Salin smb.conf ke folder .smb ;
cp /etc/samba/smb.conf ~/.smb/smb.conf.append


5. Edit file /etc/nsswitch.conf (untuk pengguna router sahaja) :
Ubah bahagian hosts:
hosts:          files wins dns


6. Bina folder mount point anda pada home:
mkdir ~/SHARES


7. Edit file /etc/fuse.conf
Uncomment user_allow_other
# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
user_allow_other


8. Fix permission file /etc/fuse.conf (default: 640). Ini akan menghalang user biasa membacanya dan fusesmb tidak dapat membaca sebagai user biasa. Ubah kepada 644.
chmod 644 /etc/fuse.conf



Mulakan semua service dengan module fuse di dahulukan:

1. Load modules fuse. Ada 2 cara untuk load module fuse:
a) modprobe fuse
atau
b) /etc/init.d/fuse start

Untuk automatik load sewaktu boot, anda boleh lakukan arahan berikut:
a) echo "fuse" >> /etc/modules
atau
b) update-rc.d -f fuse defaults

2. Mulakan service winbind (untuk pengguna router)
/etc/init.d/winbind start


3. Mulakan service samba
/etc/init.d/samba start


4. Mulakan smbfuse sebagai user biasa
smbfuse SHARES -o allow_other


* SHARES adalah nama folder mount point yang anda bina tadi

Fusesmb akan mengambil sedikit masa untuk update fusesmb.cache. Jadi silalah bersabar.
Jika anda tidak dapat menahan sabar, anda boleh force fusesmb.cache untuk update dengan arahan:
fusesmb.cache --

Contoh:
$ fusesmb.cache --
added interface ip=192.168.1.2 bcast=192.168.1.255 nmask=255.255.255.0
Using netbios name OSHIRIX.
Using workgroup MSHOME.
Got a positive name query response from 192.168.1.2 ( 192.168.1.2 )
Got a positive name query response from 192.168.1.2 ( 192.168.1.2 )
Server: 192.168.1.2 : Share: IPC$ : Workgroup: MSHOME
Server connect ok: //192.168.1.2/IPC$: 0x8a90a38
Using netbios name OSHIRIX.
Using workgroup MSHOME.
Server: MSHOME : Share: IPC$ : Workgroup: MSHOME
Got a positive name query response from 192.168.1.2 ( 192.168.1.2 )
Server connect ok: //OSHIRIX/IPC$: 0x8ad2db8
Server: NIZAMMOBILE : Share: IPC$ : Workgroup: MSHOME
Server connect ok: //NIZAMMOBILE/IPC$: 0x8b56938
Server: 192.168.1.2 : Share: IPC$ : Workgroup: MSHOME
Server connect ok: //192.168.1.2/IPC$: 0x8b77fd0
Performing aggressive shutdown.
Performing aggressive shutdown.


Sekarang anda bolehlah browse mount point anda:
$ ls -la SHARES/MSHOME
total 0
drwxr-xr-x 3 oshiri oshiri 4096 2008-12-10 08:46 .
drwxr-xr-x 3 oshiri oshiri 4096 2008-12-10 08:46 ..
drwxr-xr-x 3 oshiri oshiri 4096 2008-12-10 08:46 NIZAMMOBILE



Comments?
Mambang News : SELAMAT HARI RAYA AIDILADHA
Dihantar oleh oshiri on 2008/12/7 23:02:42 (19 bacaan)

SELAMAT HARI RAYA AIDILADHA DIUCAPKAN KEPADA SEMUA UMAT ISLAM

Comments?
Mambang News : Bagaimana install OSHIRIX2009 - Part 2
Dihantar oleh oshiri on 2008/12/4 21:09:05 (44 bacaan)

Asasnya kita perlukan sekurang-kurangnya 2 partition.
1 untuk system dan 1 lagi untuk swap. Swap partition sebesar 250mb sudah memadai terutama sekali jika anda gunakan untuk tujuan desktop, kerana linux biasanya menggunakan ram secara effisien. Cache akan disimpan pada ram terlebih dahulu sehingga hampir habis baru di simpan ke partition swap. Terpulang kepada anda untuk mempunyai sebesar mana swap partition.

Jika anda mempunyai ram yang besar, anda tidak perlukan swap partiton memandangkan oshirix2009 menggunakan compcache. Ia akan reserve 25% dari jumlah ram anda untuk tujuan cache. Tapi digalakkan anda untuk mempunyai swap partition.

Berikut adalah cara untuk install OSHIRIX2009 ke hd:

1. Klik menu kde--->oshirix---->Oshirix Installer



2. Tick Install OSHIRIX to HD dan klik Next



3. Pilih root partition dimana anda ingin install oshirix (sila berhati-hati). Tick format with dan pilih jenis format jika anda ingin guna format lain. Root partition ini di cam oleh installer jika partition untuk linux telah dibuat terlebih dahulu.
Jika belum ada partition, sila tutup installer dan bina partition menggunakan gparted, kemudian mulakan semula installer.
Anda juga boleh memilih mount point berasingan jika anda mempunyai lebih dari 1 partition untuk system. Misalnya home anda berada pada partition lain.



4. Pilih GRUB dan MBR



5. Masukkan maklumat akaun root dan user anda



6. Berikan nama untuk system anda (hostname)



7. Tick Save configuration dan klik Begin installation



8. Klik yes



9. Konfigurasi anda dipaparkan. Ini adalah peluang terakhir anda untuk batalkan instalasi. Klik yes.



10. Tunggu hingga selesai







Reboot.
Anda akan dipaparkan dengan grub untuk memilih OS untuk boot.
Grub akan mempunyai pilihan untuk boot kernel oshirix dan windows (jika ada).
Untuk Linux lain, anda perlu edit menu.lst secara manual atau merge menu.lst semua linux lain.

Read More... | 5 comments
(1) 2 3 4 ... 47 »

Shoutbox

Ahli Baru

bulyamin 2008/12/30
cekguz 2008/12/30
prof_azrul 2008/12/30
breilender 2008/12/27
neoryzer 2008/12/26
jtk_im 2008/12/26
apiz 2008/12/24
jingger 2008/12/22
xbangold 2008/12/22
aliff 2008/12/18

User Online

3 pengguna sedang online (3 pengguna sedang melayari News)

Ahli: 0
Pelawat: 3

lagi...

Site Hits

Total Hits