Search This Blog

Showing posts with label FreeBSD. Show all posts
Showing posts with label FreeBSD. Show all posts

Monday, January 14, 2013

FreeNAS GUI Update

FreeNAS (GUI) Web-based upgrade  from 8.3.0  Release to 8.3.1 Beta2



1. Back up the configuration “System → Settings → General → Save Config”

2. Download the *.txz file. Upload it through the GUI,  Remember to specify the checksum.

 

3. Take about 5~10 minutes flashing the USB key, the machine reboots once, and I manually reboot it again


Old services are up and running after the upgrade. (Say the old config are good)


reference
http://doc.freenas.org/index.php/Upgrading_FreeNAS%C2%AE

Monday, October 3, 2011

FreeBSD Binary Update && Security Patch

It is very easy to keep your favorite FreeBSD system up-to-date. You can secure your kernel, base system, and third-party software easily!

Secure Your FreeBSD Base System:
#freebsd-update fetch install
*you might want to rebuild all your ports after you update/upgrade your base

Secure Your FreeBSD ports:
#portaudit -Fda
#portupgrade the_package_name_you_want_to_update






Saturday, October 1, 2011

Acer Aspire Wireless Network in FreeBSD 8

FreeBSD 8 supports Brodcom wireless network card. Get it to work within 10 minutes.

1. get kernel source
2. prepare your driver
3. configure your network card

Tuesday, August 16, 2011

FreeBSD, buildword

# cd /usr/src
# svn update 
# make buildworld
# make buildkernel KERNCONF=MYKERNEL 
# make installkernel KERNCONF=MYKERNEL
# shutdown -r now


# adjkerntz -i
# mount -a -t ufs
# mergemaster -p
# cd /usr/src
# make installworld
# mergemaster
# reboot

Sunday, May 15, 2011

OpenSource: RKHUNTER

If you have a good root password, your Unix/Linux core system should be pretty secure. For additional security audit, try rkhunter which scan rootkit, hidden folders, network backdoor, and several configuration file like sshd.



rkhunter --check

Tuesday, March 29, 2011

Useful Commands, ntpdate

The time in your FreeBSD is out of sync? Or you are under Daily Saving Time that you want to adjust your clock? Just run ntpdate to update your machine clock with network time protocol.


ntpdate 0.pool.ntp.org

more ntp timer server can be found here:
http://support.ntp.org/bin/view/Servers/NTPPoolServers
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-ntp.html

Sunday, February 20, 2011

FreeBSD, my /usr has no more space to compile ports

If your /usr is too small, you cannot compile certain ports. e.g. the giant OpenOffice port.

It's easy to fix. You can add this to your /etc/make.conf

WRKDIRPREFIX=/another/place/to/compile

that means you can also mount an external hard drive for you to compile your favourite ports.

Friday, February 18, 2011

Useful Commands, Mount FreeBSD ufs in Linux

Linux supports read on FreeBSD ufs filesystem.
You can mount them with:

sudo mount -r -t ufs -o ufstype=ufs2

for example:
sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb1 /mnt

Thursday, December 30, 2010

Useful Command, vidcontrol for Console Resolution

Most of us have a decent LCD monitor and it will be nice that we can use the high resolution inside the console. Under FreeBSD, it was not possible for AMD64. From FreeBSD 8 Stable and forward, the vesa driver is supported in the kernl option! Thank you for the FreeBSD team. This is such a nice work. To enable vesa for the console, add this to your kernel config file:

options VESA
options SC_PIXEL_MODE

and install your new kernel. After that you can check with vidcontrol -i mode, you can see several high resolution available. To use a 800x600, do:

vidcontrol VESA_800x600

check the manual page for vidcontrol, you might need to load different fonts for different screen resolutions.

reference:
http://www.freebsd.org/doc/en/books/handbook/consoles.html
http://forums.freebsd.org/showthread.php?t=9449

Wednesday, December 29, 2010

OpenSource, jfbterm to Display Unicode on Console


When people are in the graphical environment (X11), such as Gnome or Kde, to display Unicode characters is not a problem. It is a different story when we are under the console. Here is a good news, a program "jfbterm" can turn your English only console to display Chinese, Japanese, or Korean! Under FreeBSD, it's in port sysutils/jfbterm.

After installing jfbterm, just type jfbterm and you are all set.

What's so good about it? You don't need to use X for your slow slow pc just to see Unicode characters.
(for emacs-w3m lover, you can browse the web to view UTF-8 characters ;D )


reference:http://opal.com/jr/freebsd/unicode/

Useful Command, kbdcontrol

Usually the keyboard repeat rate is not fast in the terminal. Under FreeBSD, you can use kbdcontrol command:

kbdcontrol -r fast

will make your key repeat rate fast.

or add
keyrate="fast"
to your /etc/rc.conf

Tuesday, December 28, 2010

OpenSource, OpenOfficeOrg


A feature rich office application. A nice note is that if you build OpenOffice yourself, it might takes several hours or a day. It is a good idea to track with the build progress. Pay attention to the configuration log early, you can locate a file unxfbsdx.pro.build.html that will display the current build progress.

Wednesday, December 22, 2010

FreeBSD, capture the terminal output

sctip(1) can capture the entire terminal output. This is very useful such as, capturing all the messages after you start your X server, or capturing the entire compiling session.

In the console, just type script /place/to/store/output/file.txt
you can continue your work on this console.
To end it, just type exit on the console.

Tuesday, December 14, 2010

FreeBSD, mount your USB drive in KDE

In 5 minutes, you can teach KDE how to mount your USB drive(s).
  1. /etc/rc.conf:
    dbus_enable="YES"
    hald_enable="YES"
  2. mount profs, in /etc/fstab:
    proc /proc profs rw 0 0
  3. /usr/local/etc/PolicyKit/PolicyKit.conf, add into the
    example in: http://www.freebsd.org/gnome/docs/halfaq.html
ref:http://www.freebsd.org/gnome/docs/halfaq.html

Saturday, December 11, 2010

FreeBSD, format and mount your USB drive

  • after insert your usb drive, check where it is by using /dmesg, i.g. /dev/da0
  • you might need to format it so FreeBSD can recognize it
  • you can use newfs or newfs_msdos to format your drive, if you want windows to recognize it too, try newfs_msdos -F32 /dev/da0. this will create a FAT32 filesystem
  • you can use fdisk to check the partition first, i.g. fdisk /dev/da0
  • after you have format your filesystem, you can mount it now. i.g. mount /dev/da0 /mnt, or mount_msdosfs /dev/da0 /mnt (/mnt is a directory you create)
Usually, simply use mount command will do the job. If not, make sure you have the right filesystem and mount the right device to the right place.

Thursday, June 3, 2010

FreeBSD Internet in VirtualBox

Set up the bridge network:
The advantage of bridge network in Virtualbox is that, Virtualbox can been seen by the outside world, not just your host. One practical example of this use is that you can set out a server using Virtualbox. With bridging your virtualbox is assigned with an IP address in your network (same network as your host).

In FreeBSD, you need drives to use bridging in VirtualBox:
kldload vboxnetflt vboxnetadp
or
vboxnet_enable="YES" in your /etc/rc.conf

and then go to your Virtualbox settings, try bridge to your host Interface(NIC)

Manually configure your virtual network:
You can easily set up FreeBSD Internet under VirtualBox. To troubleshoot, manually configure your network interface as follow:

  1. Check your DNS: 10.0.2.3 ( i.e. modify your /etc/resolv.conf)
  2. Check your IP: 10.0.2.15 ( e.g. ifconfig em0 inet 10.0.2.15)
  3. Check your default gateway: 10.0.2.2 ( i.e. route add default 10.0.2.2)

Sunday, May 16, 2010

Restore FreeBSD MBR after installing Windows XP

Windows will overwrite the existing MBR of yours, rendering your FreeBSD not bootable. Do not worry. As long as you do not erase your FreeBSD partition, all your data and programs are still there!

The easiest way to restore your FreeBSD MBR is use your FreeBSD boot/install disk. Select "standard install" and you can see your FreeBSD system is still there. Just do not "W" any change to it, but "install the FreeBSD MBR" and then exit the installer.

After reboot, you can see Windows and FreeBSD are in the boot menu again.

Next time, remember to back up your data. =D

Reference:
http://www.freebsd.org/cgi/getmsg.cgi?fetch=611111+617364+/usr/local/www/db/text/2005/freebsd-questions/20050626.freebsd-questions

Saturday, December 12, 2009

To Do List for installing any Linux

Before installing any Linux/Unix, and after installing Linux/Unix.
  • Make sure your /boot partition is big enough (be safe, make it at least 500MB) so in the future you have enough space to build and store kernels.
  • Consider making partitions for /home, /var. The root partition ("/") should be large enough. I.E. 8GB is small for a desktop install, you will almost always need more.
  • Super Grub Disk is handy for multiple system booting recovery.
  • Backup and fdisk to prepare your hard drive.

Edit:
Emacs
Tex (TeX Live, LaTex)


Terminal:
Tmux (splitting your console)

Internet:
Firefox Sync Bookmark
Extension--Download Status Bar
Extension--No-Script
Extension--Ad Block Plus
Extension--FireBug

Extension--Tor Button
Extension--Privoxy
Flashplayer
JDownloader
QBittorrent
aMule

Development:
Subversion (Sync Your Repository)
GCC
Boost
Qt-Creator
Java
Mono
MonoDevelop

Multimedia:
VLC
RealPlayer
FFmpeg
GIMP

Virtualization:
VirtualBox
QEMU

Server Related:
Apache
FireWall
PHP
Django

Office:
GnuCash Sync GnuCash Book
OpenOffice

Miscellaneous:
Sync Home Directory
DateTime Format:24 or 12
gcin,  cp noseeing to ~/.gcin, im-switch to set gcin as default
Tor
Privoxy
Unrar
Wine
rdesktop (remote control windows from linux)
Ntfs-3g (to see ntfs drive)
yum update (Fedora)
apt-get update (Ubuntu)
portsnap fetch update (FreeBSD)
enable additional repository

Friday, December 11, 2009

Host name lookup failure

ping: cannot resolve google.com: Host name lookup failure

When you put a host (a computer) behind a router, you might suddenly get a "host name lookup failure" even though your network was working a moment ago. You are pretty sure your network is up, your nameserver is working, and you can usually fix it by restarting the host.

You can fix this without restarting a host. The problem is very likely that your host does not use your new router as a default gateway. you simply need to add that as your default route using:

route add default 192.168.1.1

assuming 192.168.1.1 is the router.
you might want to flush the route using route flush

Read the interesting FreeBSD handbook here

More:
check your routing tables with
netstat -r
renew your dhcp lease with
dhclient 192.168.1.100
re-enable your (network) interface with
ifconfig interface up
ifconfig interface down
check your nameserver at
/etc/resolv.conf

Monday, November 30, 2009

FreeBSD, sockstat to check listening ports

FreeBSD can check the listening ports for you. Be sure to understand that your computer is offering services that are secure and reliable.

sockstat -l

(netstat | grep LISTEN)

To check your login log,
grep -ir ssh /var/log/*
grep -ir breakin /var/log/*
grep -ir security /var/log/*




http://www.cyberciti.biz/tips/freebsd-lists-open-internet-unix-domain-sockets.html
http://www.linuxforums.org/forum/linux-security/75742-where-sshd-logs-kept.html