Tampilkan posting dengan label freebsd. Tampilkan semua posting
Tampilkan posting dengan label freebsd. Tampilkan semua posting

The 10 Commandments for New Linux Users  


  1. Thou shalt not log in as root.
    Use "sudo" or "su -" for administrative tasks.
  2. Thou shalt use the package manager when possible.
    Sometimes installing from source code can't be avoided, but when you use your distro's package manager to install software, you can also use it to update and remove it. This is one of the main strengths of Linux.
  3. Thou shalt be a part of the community.
    Freely give what you have received for free. Offer help and advice whenever you can.
  4. Thou shalt read documentation and man pages.
    Always read the documentation. The people who wrote the software tried to anticipate your questions, and provided answers before you asked.
  5. Thou shalt use the available support system.
    Switching to Linux can be tough. It can be frustrating, but there are a lot of people out there who want to help you. Let them.
  6. Thou shalt search.
    In most cases, your question or problem has already been addressed. Try to find the answers that are already out there before asking someone to provide a new one.
  7. Thou shalt explore.
    Linux opens a whole new world of options and possibilities. Try everything you can.
  8. Thou shalt use the command line.
    Especially when it comes to configuration, use the GUI tools to get your system working, but get to know the command line versions as well. In many cases, the command line is the only way to use some of the more advanced features.
  9. Thou shalt not try to recreate Windows.
    Linux is not meant to be a clone of Windows. It's different. Embrace and appreciate the differences.
  10. Thou shalt not give up.
    I tried several distributions before I found one I liked. I still try other distros from time to time. I also tried several different programs to serve one purpose before settling on what I use now (amarok, xmms, beep, exaile for music - azureus, ktorrent, deluge for bittorrents). If you don't like the defaults, remember that you can change almost everything to suit you.

Can you think of any rules to live by to pass on to the new Linux users reading this? Put them in the comments!


Read More...... Read More...
AddThis Social Bookmark Button

Turn FreeBSD into a Multimedia Workstation  

I recently purchased a shiny new PC and decided to turn it into a multimedia desktop. I spend far too much time in research and networking; I figured it was time to delve deeper into the world of Flash, DVD, and mp3s.

FreeBSD still seems to get a bad rap as a desktop. The impression is still out there that sure, it's a rock-solid server, but you need a master's degree in rocket science in order to get a sound card or Java to work. Hogwash. Granted, you still have to take the time to build and configure the components you desire, but that is the beauty of FreeBSD. No company is deciding for you what you want in your desktop, and you have the satisfaction of knowing you built your system your way. Not to mention the literally hundreds of multimedia applications to choose from, some which put their commercial counterparts to shame.

In today's article, I'll concentrate on a fresh install that is totally up-to-date, then move on to integrating Java, Flash, and streaming multimedia into a browser. I'll be taking the slow, systematic route, so follow along and pick out the bits that are interesting to you.

Being the paranoid person that I am, I like to install from CD, reboot into a firewalled system, than CVSup to the latest sources. Before starting any install, I always copy the following onto a floppy:

I then start the install from CD and choose to install everything, including the ports collection. Once bin has been installed, I press Alt-F4, which now has a prompt. I then mount the floppy and copy over the first three files:

mkdir /floppy
mount -t msdos /dev/fd0 /floppy
cd
cp /floppy/.cshrc .
source .cshrc (I now have my favorite prompt)

cp /floppy/.cshrc /usr/share/skel/dot.cshrc (now the users I create will
also get my favorite prompt)

cp /floppy/ipfw.rules /etc/
cp /floppy/rc.conf /etc/
umount /floppy

Usually, by the time I've unmounted the floppy, the install is also finished and prompting me for post-install configuration. I then reboot and watch the messages to ensure that my firewall rules successfully load.

Now that I'm protected by a firewall, I'll go out on the Internet and download the latest sources and today's port collection. First, I'll install the cvsup-without-gui utility:

 su
Password:
cd /usr/ports/net/cvsup-without-gui
make install clean
and answering the questions as they appear. (Pressing enter for the

Once the build is finished, I'll remount that floppy and copy over the
remaining files:







mount -t msdos /dev/fd0 /floppy
cp /floppy/cvs-supfile ~
cp /floppy/make.conf /etc/
cd /usr/local/etc
mkdir cvsup
cd cvsup
mkdir sup
cd sup
cp /floppy/refuse .
umount /floppy


If you've never done a CVSup before, you'll want to read the CVSup section
of the handbook
first.



I was both intimidated and intrigued when I was first introduced to the
whole CVSup concept. Now, I couldn't live without it, and the knowledge
that my operating system is completely up-to-date in security and
functionality and that all of my installed applications are the latest and
greatest. The handbook will show you how to customize the files needed to
use CVSup; mine look like this:



more /root/cvs-supfile
*default host=cvsup.ca.freebsd.org
*default base=/usr/local/etc/cvsup
*default prefix=/usr
*default tag=RELENG_4_6_2_RELEASE
*default release=cvs delete use-rel-suffix compress
src-all
ports-all tag=.
doc-all tag=.

more /usr/local/etc/cvsup/sup/refuse
doc/es*
doc/fr*
doc/ja*
doc/ru*
doc/zh*
ports/biology
ports/chinese
ports/french
ports/german
ports/hebrew
ports/japanese
ports/korean
ports/russian
ports/ukranian
ports/vietnamese

more /etc/make.conf
# $FreeBSD: src/etc/defaults/make.conf,v 1.97.2.67
# 2002/06/02 16:07:01 matusita Exp $
#
CFLAGS= -O -pipe
#
# To avoid building various parts of the base system:
NO_BIND= true # do not build BIND
NO_FORTRAN= true # do not build g77 and related libraries
NO_I4B= true # do not build isdn4bsd package
NO_LPR= true # do not build lpr and related programs
NOPROFILE= true # Avoid compiling profiled libraries
NOUUCP= true # do not build uucp related programs
DOC_LANG= en_US.ISO8859-1


Once you have created your own customized files, invoke CVSup like so:



cvsup -g -L 2 ~/cvs-supfile


The CVSup utility will do its thing, and the results will be displayed to
your screen. The first time you run this program, you will download a lot
of changes to src; this means you'll also be rebuilding your world. (What
did you do on Saturday? Oh, nothing much, just rebuilt the world ... ) You
don't have to rebuild the world everytime you CVSup, just when there are
changes to src. Once your system is up-to-date, src rarely changes;
usually this only occurs when there is a security-related patch. The handbook
gives instructions on how to cron your CVSup ; I prefer to do mine by hand, so I
can watch the output to see if src has changed.



The CVSup utility will also download all of the new ports changes. Ports change
on a daily basis, so I like to CVSup every day or so to keep my ports collection
up-to-date. I then use the portupgrade utility found in the sysutils section
of the ports collection to keep my already installed ports up-to-date.
Michael Lucas wrote an excellent article on the portupgrade utility,

which should get you started.


Since I'm on a new system, I'll rebuild the world once CVSup is finished.
Again, if you've never built a world , a careful read of that section of the handbook is in order.



Since this a fresh install, I don't have any data to back up. If I ever
need to rebuild the world on a working system, I'll definitely take a few
minutes and back up /etc and my home directory:



cd /etc
tar czvf /dev/fd0 .
tar czvf etc.tar .


I take extra care with /etc and back it up to both a floppy and a file. I
then email myself that file, just in case things go terribly wrong. I tend
to be less diligent with my home directory, as I usually don't have any data
that I would shed tears over if it was lost. Except for my bookmarks; I
always email myself a copy of my bookmarks. If you're attached to your
data, back up your home directory.



The first time you build world, follow the handbook's instructions
carefully and be prepared for it to take a while. Also, use the generic
kernel; wait until you have a new world before you customize your kernel.

On a fresh install, I go straight into single user mode, which means I
can't do anything else on that computer for a few hours. On a working
system, I tend to cheat a little and not go into single user mode until it's
time to actually install the world.



shutdown now
cd /usr/src (enters single user mode)
make -j4 buildworld (this is the step that takes the longest;
it took about 2 hours on a freshly installed
P3 with 320 MB of RAM)
make buildkernel
make installkernel
make installworld
shutdown -r now


Once my system reboots, I have a totally up-to-date operating system,
which means I can start installing my favorite applications. I'll start
with the latest release of XFree86, as many of the multimedia
applications use it. I've found the easiest way to install is to
download the sources directly and use the built-in install script. Since I
haven't installed any applications yet, I'll download these files the
old-fashioned way. But first, I'll create a directory to hold the files
and cd into that directory before starting the ftp:



mkdir /usr/XFree86-4
cd /usr/XFree86-4

ftp ftp.xfree86.org
Connected to ftp.xfree86.org.
220 ftp.xfree86.org FTP server (Version wu-2.6.1(1) Wed Dec 5 13:09:53 EST
2001) ready.
Name (ftp.xfree86.org:genisis): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password: dlavigne6@cogeco.ca
ftp> cd pub
ftp> cd XFree86
ftp> cd 4.3.0
ftp> cd binaries
ftp> cd FreeBSD-4.x
ftp> get Xinstall.sh
ftp> get extract
ftp> get Xbin.tgz
ftp> get Xlib.tgz
ftp> get Xman.tgz
ftp> get Xdoc.tgz
ftp> get Xfnts.tgz
ftp> get Xfenc.tgz
ftp> get Xetc.tgz
ftp> get Xvar.tgz
ftp> get Xxserv.tgz
ftp> get Xmod.tgz
ftp> bye


Now, it's a simple matter of invoking the script:



sh Xinstall.sh 


default answer works, if you're unsure of the correct answer.)



Dru Lavigne is a networkand systems administrator, IT instructor, author and internationalspeaker.

She has over a decade of experience administering and teachingNetware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSDsystems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics .

Once that is finished, I start building my favorite windows manager.
Currently, this is KDE, which is a very, very long build; the kind of build
you start before going to bed in the hopes that it will be finished by the
time you wake up in the morning. So, I'll start its build in one terminal:











cd /usr/ports/x11/kde3
make install clean


I'll then go to a second terminal and install the XFree86-4 libraries
before I forget; most of the applications I'll be building require these:



cd /usr/ports/x11/XFree86-4-libraries
make install clean


And on a third terminal, I'll configure the XFree86 Server. This is the
first time I had configured a system with an USB mouse; during the install, I
answered yes when it asked if I had a USB mouse. I'll now double-check
that I have the following lines in /etc/rc.conf:



usbd_enable="YES"
moused_flags="/dev/ums0"
usbd_flags="-vv"


Before configuring your own XFree86 Server, make sure you have the
following information:







  • The make and model of your video card.
  • The amount of memory in your video card.
  • The type of mouse and what com port it is on, if it is a serial mouse.


Then:



/stand/sysinstall
Configure
XFree86
XF86Setup (if you have an unsupported video card and get an error
message, choose xf86config instead)


If you're prompted to configure your mouse, do so, and test it 'til it
works. You will then be able to use it to select your video card and desired
settings. Hopefully, all will go well for you fairly quickly.



Once I had a running XFree86 Server, I left the superuser account and
created a .xinitrc file in my home directory that contained the following
line:



exec startkde


Once KDE finally finishes building, I'll be able to type startx to
receive my KDE desktop.



Next comes the browser. I've been pretty satisfied with Mozilla; it has
its flaky moments, but for the most part it is speedy, configurable, and supports plugins and skins.



cd /usr/ports/www/mozilla
make install clean


Next, I'll create a custom kernel that supports Java and sound:



cd /usr/src/sys/i386/conf
cp GENERIC MULTIMEDIA


I'll then add the following lines to MULTIMEDIA:



options		USER_LDT		#used by java
options CPU_ENABLE_SSE #used by DVD
device pcm #builds PCI soundblaster support


I've always had good luck with the SoundBlaster PCI 128; it's a
reasonably-priced soundcard that only requires one line in the kernel
configuration file in order to work.



Once I've saved my changes to MULTIMEDIA:



cd /usr/src
make buildkernel KERNCONF=MULTIMEDIA
make installkernel KERNCONF=MULTIMEDIA


Once the kernel is installed, I'll ensure that I've saved all of the work on my
other terminals, then:



reboot


Now, I'll use Mozilla to download the files I need for Java support:



http://java.sun.com/j2se/1.3/download.html


  • Click on "Linux GNUZIP Tar shell script."
  • Accept license agreement.
  • Save to /usr/ports/distfiles/j2sdk-1_3_1_04-linux-i586.bin.


http://wwws.sun.com/software/java2/download.html


  • Click to download JavaTM 2 SDK 1.3.1 (requires free registration).
  • Save to /usr/ports/distfiles/j2sdk-1_3_1-src.tar.gz.


http://www.eyesbeyond.com/freebsddom/java/jdk13.html


  • Click on "Download the latest BSD JDK 1.3.1 patchset."
  • Agree to download Patchset7.
  • Save to /usr/ports/distfiles/bsd-jdk131-patches-7.tar.gz.


cd /usr/ports/java/linux-sun-jdk13
make install clean

cd /usr/ports/java/jdk13
make install clean


To see if it worked, restart Mozilla and go to Help -> About Plug-ins. You
should get about a page's worth of Java plugins. A short trip to
javaboutique.internet.com should convince you that Java is indeed
functional.



Next comes streaming multimedia:



cd /usr/ports/www/plugger
make install clean


This port installs mpeg, avi, quicktime, midi, and pdf support; you'll see the full list once you re-check your Help -> About Plug-ins. Then, head over to the plugger testing grounds.



Finally, the Flash plugin:



 cd /usr/ports/www/flashplugin-mozilla
make install clean


Before installing this plugin, be advised that Flash is a registered
trademark and it was "designed solely for the Windows PC and Macintosh
desktop operating systems." There are also redistribution issues, which
means that the GPL version does NOT support full Flash functionality.
This means that some Flash sites will work, some will hang, some will
crash your browser.










For example, if you install the Flash plugin, don't bother heading over to
www.shockwave.com unless you
want to watch your browser crash. And I've found that it depends upon
the phase of the moon and a certain combination of mojo whether or not
the Flash ecards at Hallmark will show me anything other than a grey
screen. However, my browser seems to have no problems displaying those
annoying Flash introductions that are becoming increasingly popular on
Web sites. Go figure.



Now that Mozilla supports plugins, I'll move on to installing some skins.
Go to the Edit menu -> Preferences. Click on Appearance -> Themes, then
click on the hyperlink for Get New Themes.



I liked the themes at mozdev.org. SkyPilot looked interesting, so I
clicked on its link, then on SkyPilot again in the Install row of the chart.
I then checked "Use this theme" in the Confirm box and pressed OK. Once the
install did its thing, I went back to Preferences, highlighted SkyPilot and
pressed OK. Mozilla informed me the changes would take effect the next time I
started Mozilla.



Now that my browser looks pretty awesome, I'll head over to my favorite wallpaper site:



To change the wallpaper in KDE, right click the desktop and choose
Configure Desktop. Click on the Background icon, the Wallpaper tab, and
browse for your favorite wallpaper.



In next week's article, we'll move on to the wonderful world of sound and
some utilities that will impress even your Windows buddies.



Editor's note: a previous version of this article mistakenly used
make installworld instead of make installkernel. As well, the link to the plugger testing grounds has been fixed. We
apologize for the inconvenience.


Dru Lavigne
is a network and systems administrator, IT instructor, author and
international speaker. She has over a decade of experience
administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO,
Solaris, Linux, and BSD systems. A prolific author, she pens the
popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.

Read More...... Read More...
AddThis Social Bookmark Button

Perbandingan Linux vs FreeBSD vs OpenBSD  


linux (most of linux distribution):



Proteksi stack pake virtual address, randomize stack



handling overflow pakek SIGSEGV, stack bisa dioverwrite



mudah sekali bypass va







freebsd 6.1:



handling overflow pakek SIGSEGV, stack bisa di overwrite



bypass stack shield masih gagal coz i'm not freebsd user





openbsd 3.9:



handling overflow pakek SIGABRT, overflow di kill pakek sys_kill()



sulit sekali overwrite stack, proteksi non executable stack



it seems imposible to exploits stack overflow in openbsd





returning libc??sama kena SIGABRT







PoC :



linux http://student.te.ugm.ac.id/~phoenix03/compare.txt



freebsd ??



openbsd ??







Ada yang mau kasih tambahan referense bypass proteksi stack



di mesin bsd. thx jika ada referensi




Kecoak Elektronik Indonesia :: Lihat topik - stack overflow exploitation (Linux vs FreeBSD vs OpenBSD)




powered by performancing firefox

Read More...... Read More...
AddThis Social Bookmark Button

Setting Soundcard di FreeBSD 6.2  

Setting Soundcard :



Secara default FreeBSD tidak berusaha memprobing jenis soundcard terpasang, tetapi telah mensupportnya dengan baik. Sehingga tetap diperlukan campur tangan user agar sistem dapat memainkannya dengan meload driver yang diperlukan.



Pada sistem FreeBSD module/driver diletakkan di di /boot/kernel. Untuk driver soundcard biasanya dikenali dengan prefix snd_*,



Misalnya kita menggunakan soundcard (onboard) VIA 8235 tetapi driver yang pas tidak ditemukan, yang ada adalah snd_via8233.ko. Untuk me-loadnya secara manual dengan cara command (masuk ke terminal/konsole dari mesin freebsd kita:



# kldload snd_via8233



Tetapi tentunya cukup merepotkan setiap kali selesai booting selalu mengetikkan command dia atas.

Di FreeBSD terdapat file untuk me-load driver secara otomatis seperti hanya modprobe.conf / rc.modules.conf di linux, yaitu file /boot/loader.conf yang mem-bypass fungsi /boot/defaults/loader.conf, dengan melakukan :



# vi /boot/loader.conf (pencet a untuk masuk mode edit ketik baris di bawah ini )



snd_via8233_load="YES"



Setelah itu saving exit (tekan Esc :wq atau :x)





dengan perfomance sound FreeBSD ? Kita bisa ambil *.wav-nya Ubuntu terus letakkan di /usr/X11R6/share/gnome/sounds/,



terus setting sound di klik Desktop Preferences Sound Pilih event *.wav-nya.



Selamat mencoba

(Diinspirasi oleh Dru Lavigne di situs yang sama).





powered by performancing firefox

Read More...... Read More...
AddThis Social Bookmark Button

setting x-window di freebsd 6.2  

X-Windows :



Pertama sekali kita harus melakukan setting (kalibrasi) /etc/X11/xorg.conf dengan command xorgconfig. Penting untuk mengetahui spesifikasi monitor, keyboard, mouse dan video card yang terpasang di komputer kitasebelum melakukan konfigurasi .



Kebanyakan keyboard di Indonesia ini memakai layout US model, bisa 101/104 keys. Kemudian untuk mouse ada yang serial ada juga yang PS/2, namun untuk serial memang sudah jarang ditemui lagi. Sedangkan untuk type PS/2 di FreeBSD (tidak bekerja, sesuai pengalaman penulis) akan tetapi menggunakan System Mouse (pilihan #2) dengan menggunakan



# /dev/sysmouse.



Untuk fungsi roller, sedikit mengejutkan xorg secara default telah menyertakan opsi ZAxisMapping, sehingga tidak perlu edit manual lagi. Sedangkan pilihan Horizontal Synch, penulis menggunakan 31.5 - 48.5 Hz (pilihan #6) dan Vertical Refresh sebesar 50-70 hz (sesuai dengan spesifikasi monitor penulis). Sedangkan video card yang dipakai adalah NVidia GeForce (opsi #349) dengan memori sebesar 32 Mb.

Setelah setting X server selesai, untuk bisa menggunakan desktop manajer kesayangan (dalam hal ini penulis telah menginstall Gnome), maka cukup :



$ echo "exec gnome-session" ~/.xinitrc

agar bisa dijalankan oleh user.

Sedangkan untuk KDE, lakukan dengan :

$ echo "exec startkde" ~/.xinitrc



Untuk mempercantik tampilan kita bisa ambil theme untuk Gnome di www.gnome-look.org, misalnya MacOS-X. Ini dimungkinkan karena Gtk (Gim Tool Kit) yang dipakai freeBSD adalah 2.*, caranya cukup mudah (mungkin ini sedikit liar karena paket ini tidak akan terdaftar di /var/db/pkg) :



# tar xzvf 1354-MacOS-X-theme.tar.gz -C /usr/X11R6/share/themes

# tar xzvf Gnome-MacOS-icon-theme.tar.gz -C /usr/X11R6/share/icons

# tar xzvf MacOS-X-wallpaper.tar.gz -C /home/free/wallpaper



Untuk settingnya klik Desktop Preferences Theme Pilih MacOS-X

Untuk setting iconnya klik lagi Theme Details Icons Bar Pilih MacOS-X



begitu tutorial sederhana untuk menginstall x-window di freebsd anda , meskipun sangat sederhana tetapi bagi orang yang ingin migrasi dari mikocok maka linux/bsd adalah pilihan alternatif yang bisa dicoba...:)





powered by performancing firefox

Read More...... Read More...
AddThis Social Bookmark Button