sudo apt-get update sudo apt-get upgrade sudo apt-get install dkms sudo apt-get install build-essential插入Guest Additions CD映像:

$ sudo apt-get install dhcp3-server設定DHCP Server的網卡介面,編輯/etc/default/dhcp3-server檔案:
$ sudo vim /etc/default/dhcp3-server INTERFACES="eth1"設定DHCP Server,編輯/etc/dhcp3/dhcpd.conf:
$ sudo vim /etc/dhcp3/dhcpd.conf default-lease-time 600; max-lease-time 7200; option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; option routers 192.168.1.1; option domain-name-servers 8.8.8.8, 168.95.1.1; option domain-name "reneeciou.example"; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.10 192.168.1.100; range 192.168.1.150 192.168.1.200; }
sudo apt-get install build-essential掛載CD Rom:
$ sudo mount /dev/cdrom /mnt在/mnt下可以看底下這些檔案:
$ ls /mnt 32Bit cert VBoxSolarisAdditions.pkg 64Bit OS2 VBoxWindowsAdditions-amd64.exe AUTORUN.INF runasroot.sh VBoxWindowsAdditions.exe autorun.sh VBoxLinuxAdditions.run VBoxWindowsAdditions-x86.exe安裝Guest Additions:
$ sudo /mnt/VBoxLinuxAdditions.run
$ openssl genrsa -des3 -out server.key 2048但為了方便起見,最好不要為key設密碼,不然你每次啟動secure services都要輸入密碼,例如你架了一個SSL連線加密保護的Web Server (HTTPS),每次你啟動它的時候都要輸入密碼,萬一你的server主機出問題自動重開機,使用者就無法連到你的Web Server,除非你為key輸入密碼。底下的指令是透上面產生的key再產生一把沒有設密碼的key,至於你要用哪一把就看你囉!如果是我,我會選擇沒設密碼的private key。
$ openssl rsa -in server.key -out server.key.insecure $ mv server.key server.key.secure $ mv server.key.insecure server.key接下來,要產生一張Certificate Signing Request (CSR),指令如下。
$ openssl req -new -key server.key -out server.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:TW State or Province Name (full name) [Some-State]:Taiwan Locality Name (eg, city) []:Kaohsiung City Organization Name (eg, company) [Internet Widgits Pty Ltd]:Renee's Blog Organizational Unit Name (eg, section) []:Owner Common Name (e.g. server FQDN or YOUR name) []:reneeciou.blogspot.tw Email Address []:reneeciou@example.com.tw Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
http://www.friendlyarm.net/dl.php?file=arm-linux-gcc-4.4.3.tgz $ sudo tar xvf ~/arm-linux-gcc-4.4.3.tgz -C /設定環境變數:
$ export PATH=/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH $ export CROSS_COMPILE=arm-none-linux-gnueabi- $ export ARCH=arm編譯BlueZ 2.25:
$ mkdir bluez-2.25 $ cd bluez-2.25 $ wget http://bluez.sf.net/download/bluez-libs-2.25.tar.gz $ tar zxvf bluez-libs-2.25.tar.gz $ cd bluez-libs-2.25 $ ./configure --host=arm-none-linux-gnueabi --prefix=/home/renee/myfs/rootfs \ --enable-shared=no --enable-static=yes $ make $ make install
$ sudo apt-get install libncurses5-dev kernel-package下載Kernel Source Code:
$ sudo apt-get install linux-source解壓縮:
$ sudo tar jxvf linux-source-2.6.32.tar.bz2複製.config檔:
$ cd linux-source-2.6.32 $ sudo cp -vi /boot/config-`uname -r` .config基於Ubuntu為Kernel配置的檔案,依需求進行修改:
$ sudo make menuconfig
depmod - generate modules.dep and map files insmod - insert a module into the Linux Kernel lsmod - show the status of modules in the Linux Kernel modinfo - show information about a Linux Kernel module modprobe - add and remove modules from the Linux Kernel rmmod - remove a module from the Linux Kernel通常Linux Kernel模組是存放在/lib/modules/$(uname -r) 目錄下,可以透下面指令查看:
$ ls /lib/modules/$(uname -r) # 注意: 此目錄下會有一個modules.dep檔案,用於記載模組相依性訊息。透下面指令列出所有裝置的驅動程式模組:
$ ls /lib/modules/$(uname -r)/kernel/drivers/
Uncompress:
$ tar xvf directory.tar
Compress:
$ tar cvf directory.tar directory
.bz2
Uncompress:
$ bzip2 -d directory.bz2
Compress: 只能壓縮指定檔案,不能壓縮目錄
$ bzip2 -zk file1 file2 file3
.tar.bz2
Uncompress:
$ tar jxvf directory.tar.bz2
Compress:
$ tar jcvf directory.tar.bz2 directory