2008年11月8日

CCNA Packet tracer

喝茶也喝咖啡: CCNA Packet tracer 4.0 使用問題
這學期CCNA2有大量的實驗要做,學校的Router時好時壞,而且要做到較複雜的網路設置跟本不可能,所以使用老師提供的Packet tracer來練習,但這套軟體我在學校使用一切正常,但在家裡就是不正常,問題是CLI介面的命令模式無法使用,無論enable多少次,Router>都不會變成Router#,有天上課時我問老師,老師也不知道這種情況。

今天忽然想起,這問題會不會是輸入法語系所造成的問題,這聯想來自於先前有處理過VNC連線無法輸入任何字元的問題,於是試著把預設輸入法從倉頡改回一般美式鍵盤,改好後開啟CLI介面測試,果然這樣就正常了。

到學期末才想到這問題點,真的有給他愚蠢。

下圖鍵入enable,LAB_C>無變化。

下圖 ,改鍵盤設定後,鍵入enable後,LAB_C>改變成LAB_C#

何處可以取得CISCO Packet Tracer呢?針對上CCNA課程的學生,Packet Tracer是免費下載的,只要登入CISCO網站,在自己的Profile首頁中的左邊,就可以看到不算小的Packet Tracer圖片下載連結,除此之外,依據授權,上CCNA課程的老師可以散佈這軟體給學生,所以上課時跟老師要軟體是合法的。

目前Packet Tracer最新版最近才剛出爐,版本4.1,功能多了不少,例如無線網路裝備。當然若不是課程的學生,則無法取得這軟體,不過,網路上還是有人會分享,這裡有人提供4.0版的。

至於要怎麼時用Packet Tracer,網路上幾乎找不到這軟體的教學,其實不用花心力去找教學,Packet Tracer軟體自身使用手冊中就有STEP by STEP的教學示範(開啟Packet Tracer後,按F11鍵),就算英文不太懂,看Flash動畫示範應該也很容易學會基本操作,在網路上有分享CISCO官方網站所提供的Packet Tracer操作展示說明,對於初次接觸的人可以看一下這操作展示。

Free Backup Apps

13 Great Free Backup Programs for Windows, Mac, and Linux - Download Squad
Integrated Burning

Comodo Backup [win]
They do make than a great firewall. Comodo Backup is an excellent free solution. It has extremely flexible scheduling and notification options, supports FTP destinations, can burn multisession DVDs, and has a synchronization mode for quick realtime backups.

DFIncBackup [win]
As is the case with most backup applications, there's a free and paid version. The free one still handles CD/DVD backups, and it also does incremental .zip jobs as well - only backing up files that have changed or weren't present in your previous job.

SE Backup [win]
Sports a very simple interface, does CD and DVD burning and compression, and is available as a portable application. Scheduling isn't built in, but it supports command line launching with parameters which works very well with Windows' own Task Scheduler.

File Copy

Abakt [win]
Though it's no longer developed, Abakt is still a great choice. It's got a great file filtering system, supports 7zip and zip compression, file splitting, password protection, and does differential and incremental backups.

Areca [win]
Free, open source, and wicked powerful. Areca is loaded with features: compression, encryption, simulation, merging, transaction commit/rollback, filtering, and more. It's command line interface provides excellent automation options and Areca also supports scripting of post-job actions.

Bonkey [win] [mac]
The "Backup Monkey." If I was giving points for best mascot, this one would be a clear winner.

Bonkey runs on both Windows and Mac, and has a lot of great features. It supports email, FTP, and Amazon S3, compression, encryption, scheduling, and synchronization. It'll even back up MS SQL server databases.



Cobian Backup [win]
Apart from being a great application, Cobian's developer has an excellent tutorial online to help you get started. Though it is no longer open source, you may still download the last version that was (v8). There's also a portable version.

One of my favorite features of Cobian is its ability to handle pre- and post- job events. I use it to issue net stop and net start commands to ensure safe backups of our horrible, horrible point-of-sale system. Cobian also has the ability to control and monitor all its instances on your network from your own workstation.

JaBack [win] [mac]
Allows backup to FTP and email (as well as any drive on your computer or network), and sports a flexible scheduler. It also has a file monitor function that will perform backup operations whenever changes are detected.

Mathusalem [mac]
Offers FTP/SFTP, Amazon S3, WebDav, and SMB support for backups on OSX. Mathusalem can compress to zip and dmg, will resume failed uploads, and supports scheduling and command line launching. It's also open source.

Server-Based

Bacula [win] [mac] [linux]
Bacula is an enterprise grade network backup solution that runs on just about every platform imagineable. It's a much more complex system than the other options I've mentioned, but is extremely powerful and well-suited to a medium or large scale network.

BackupPC [win] [linux]
A Linux-based, client-free enterprise solution for backing up Windows and Linux machines. BackupPC uses SMB, tar, and rsync to extract backup data from client computers. It 's got a powerful web-based interface for administrators and users, and will even email reminders to users that have been remiss in performing backups.

It's a very flexible solution, and is open source.

NasBackup [win] [linux]
Uses a simple Windows GUI and rsync to perform backups from client machines to a central server. It'll do incremental backups, scheduling, compression, encryption, and the server offers useful per-client controls like limiting the number of versions to store and expiration dates. It also provides daily summaries via email.



Restore [win] [mac] [linux]
The self-proclaimed "reason backup was invented." It's definitely a great product, and full of terrific features. Its web interface is very easy to understand and use - and makes it easy for the mobile admin to monitor and control Restore from anywhere.

Restore supports FTP, WebDav, SSH/SFTP, and multiple revisions. It also provides powerful admin tools, making it easy to create and control users, groups, jobs, and scheduling.

VirtualBox USB problem under Ubuntu

User_FAQ - VirtualBox
* USB on Ubuntu/Gutsy: Ubuntu removed support for /proc/bus/usb/*. We will address this issue in the future. Until this, edit the script `/etc/init.d/mountdevsubfs.sh and activate the four lines around line 40 (Magic to make /proc/bus/usb work). Then execute

/etc/init.d/mountdevsubfs.sh start

From now on, there should be a directory /proc/bus/usb/ and the device entries below should be accessible by any user.

* USB on Ubuntu/Intrepid: Finally, the Ubuntu guys completely removed these lines. So you have to manually add them again:

mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Add these lines to at the end of the start() function of /etc/init.d/mountdevsubfs.sh.
Note that the udev permissions for the USB devices are still used. For instance, to access a USB disk you have to be member of the group disk. Execute

/bin/ls -l /proc/bus/usb/*/*

and check if you have write access to all desired USB devices.
VirtualBox - Community Ubuntu Documentation
To get USB support, you need the PUEL version. Via the GUI, there is an option to enable USB.

Furthermore, your user must be able to access /proc/bus/usb/*

Since Gutsy, /proc/bus/usb is not mounted by default. You need to edit /etc/init.d/mountdevsubfs.sh and uncomment the following lines:

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

In order to give users in the vboxusers group write permissions to the devices in /proc/bus/usb, you'll need to edit some rules in /etc/udev/rules.d.

Under gutsy, edit /etc/udev/rules.d/40-permissions.rules to say the following:

# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device", MODE="0664", GROUP="vboxusers"

Under hardy, edit /etc/udev/rules.d/40-basic-permissions.rules to say the following:

# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664", GROUP="vboxusers"
SUBSYSTEM=="usb_device", MODE="0664", GROUP="vboxusers"

Then, restart the udev service:

sudo /etc/init.d/udev restart

Now, if you haven't done it already, make sure your user is part of the group vboxusers using the following command:

sudo adduser $USER vboxusers

http://www.virtualbox.org/ticket/747
Ubuntu Unleashed: Howto: Install VirtualBox in Ubuntu Hardy Heron with USB Support in 5 easy Steps!


If the above doesnt work try rebooting, if that doesnt enable usb you can try this:
Grab the vboxusers group id:
grep vbox /etc/group
vboxusers:x:124:ionstorm
Edit the fstab with the group id # in bold:
sudo gedit /etc/fstab
Append this to the fstab then save/exit:
## usbfs is the USB group in fstab file:
none /proc/bus/usb usbfs devgid=124,devmode=664 0 0
Now lets edit the mountkernfs.sh file with the gid in bold:
sudo gedit /etc/init.d/mountkernfs.sh
Paste the 2 lines below above the line: "# Mount spufs, if Cell Broadband processor is detected"
## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664

You may not need to reboot, try doing:
sudo /etc/init.d/mountkernfs.sh

2008年11月7日

rpm vs. dpkg 常用參數對照

Jamyy's Weblog: rpm vs. dpkg 常用參數對照
rpm vs. dpkg 常用參數對照

dpkg 是 Debian Linux 的套件管理程式, 對於習慣 rpm 的人來說, 一開始接觸 dpkg 時還真有點不太能適應, dpkg --help 查了又忘、忘了又查...

於是整理了一下兩種指令的對照表, 這樣就比較好上手了 :)

安裝

目的 rpm 用法 dpkg 用法
安裝指定套件 rpm -i pkgfile.rpm dpkg -i pkgfile.deb

查詢

目的 rpm 用法 dpkg 用法
顯示所有已安裝的套件名稱 rpm -qa dpkg -l (小寫 L)
顯示套件包含的所有檔案 rpm -ql pkgname (小寫 L) dpkg -L pkgname
顯示特定檔案所屬套件名稱 rpm -qf /path/to/file dpkg -S /path/to/file
查詢套件檔案資訊 rpm -qip pkgfile.rpm (顯示套件資訊)
rpm -qlp pkgfile.rpm (小寫 L, 顯示套件內所有檔案) dpkg -I pkgfile.deb (大寫 I )
dpkg -c pkgfile.deb
顯示指定套件是否安裝 rpm -q pkgname (只顯示套件名稱)
rpm -qi pkgname (顯示套件資訊) dpkg -l pkgname (小寫 L, 只列出簡潔資訊)
dpkg -s pkgname (顯示詳細資訊)
dpkg -p pkgname (顯示詳細資訊)

移除

目的 rpm 用法 dpkg 用法
移除指定套件 rpm -e pkgname dpkg -r pkgname (會留下套件設定檔)
dpkg -P pkgname (完全移除)

Adding Windows Fonts in Linux

All about Linux: Adding Windows Fonts in Linux
Method 1 :
Copy the ttf (True Type Fonts) fonts Ariel, Tahoma, Verdana, Courier New and Times New Roman from the windows partition to the fonts:// location in nautilus.

Method 2 :
Some people who are using Ubuntu have said that they can't do it as normal user. And since Ubuntu does not have a root account, they find difficulty in using su to copy eaither. Such people can do the following:
Create a '.fonts' folder in your home directory and copy the necessary fonts into it. Now you have access to the fonts on a per user basis.

Method 3:
This method can be used to install the fonts system wide if the above two methods do not give satisfactory results.
First find out in which location linux has installed the truetype fonts. It is usually at the location '/usr/share/fonts/truetype/' . But you may also do a search for the same as follows:

# find /usr -iname \*.ttf |head -n 5

Once you know the path of the fonts directory, move to this directory and create a folder there (it can be any name).

# cd /usr/share/fonts/truetype
# mkdir windowsfonts

Note: You need to be logged in as root while doing this.
Next copy all the windows ttf fonts to the windowsfonts directory that was just created.

# cp /media/hda1/windows/Fonts/*.ttf .

Now change the ownership of the fonts as well as make sure they have a right of 644 .

# chown root.root *.ttf
# chmod 644 *.ttf

Now run the command mkfontdir while in the windowsfonts directory.

# mkfontdir

This will create an index of the fonts in the directory. It will also create two files fonts.dir and fonts.cache-1 .
Now moving to the parent directory, edit the file fonts.cache-1 using your favourate editor and append the following line to it.

#File: /usr/share/fonts/truetype/fonts.cache-1
...
"windowsfonts" 0 ".dir"

Lastly run the command fc-cache.

# fc-cache

This command will scan the font directories on the system and build font information cache files for applications using fontconfig for their font handling.

That's it. Now you can have access to windows fonts in all your X applications including firefox and OpenOffice.org.