在 Debian 7 上建置 Slave DNS Server

Master DNS Server – 192.168.1.3
Slave DNS Server – 192.168.1.12

Master DNS Server 的部分已設定完成,這篇文章主要針對 Slave DNS Server 來做設定
參考網頁:
Setup DNS Server On Debian 7 Wheezy | Unixmen
Mind Reference: Debian Slave DNS Server Setup
[@more@]1. 安裝 DNS Server 所須套件
# apt-get install bind9 bind9utils bind9-doc dnsutils

2.修改 Master DNS Server 上的 /etc/bind/named.conf.local 設定檔,加入紅字的部分
# vim /etc/bind/named.conf.local
zone “test.ilc.edu.tw” IN {
        type master;
        file “/etc/bind/db.test.ilc.edu.tw”;
        allow-transfer  { 192.168.1.12; };
        also-notify { 192.168.1.12; };
};

zone “1.168.192.in-addr.arpa” IN {
        type master;
        file “/etc/bind/db.1.168.192”;
        allow-transfer  { 192.168.1.12; };
        also-notify { 192.168.1.12; };
};

3. 修改 Slave DNS Server 的 /etc/bind/named.conf.local
# vim /etc/bind/named.conf.local
zone “test.ilc.edu.tw” IN {
        type slave;
        file “/etc/bind/db.test.ilc.edu.tw”;
       
masters  { 192.168.1.3; };
};

zone “1.168.192.in-addr.arpa” IN {
        type slave;
        file “/etc/bind/db.1.168.192”;
        masters  { 192.168.1.3; };
};

4. 重新啟動 Slave DNS Server
# /etc/init.d/bind9 restart

5. 會自動從 Master DNS Server 抓取設定檔
# ls -l /etc/bind/db.*
-rw-rw-r– 1 bind bind   237 Dec  9 04:21 /etc/bind/db.0
-rw-rw-r– 1 bind bind   271 Dec  9 04:21 /etc/bind/db.127
-rw-rw-r– 1 bind bind   237 Dec  9 04:21 /etc/bind/db.255
-rw-r–r– 1 bind bind 17797 Dec 25 14:16 /etc/bind/db.1.168.192
-rw-rw-r– 1 bind bind   353 Dec  9 04:21 /etc/bind/db.empty
-rw-rw-r– 1 bind bind   270 Dec  9 04:21 /etc/bind/db.local
-rw-rw-r– 1 bind bind  3048 Dec  9 04:21 /etc/bind/db.root
-rw-r–r– 1 bind bind 20142 Dec 25 14:17 /etc/bind/db.test.ilc.edu.tw

6. 進行測試
# host 192.168.1.3 192.168.1.12
Using domain server:
Name: 192.168.1.12
Address: 192.168.1.12#53
Aliases:

3.1.168.192.in-addr.arpa domain name pointer ftp.test.ilc.edu.tw.

# host ftp.test.ilc.edu.tw 192.168.1.12
Using domain server:
Name: 192.168.1.12
Address: 192.168.1.12#53
Aliases:

ftp.test.ilc.edu.tw has address 192.168.1.3

 

在 Acer Chromebox 更換桌布

預設的桌布

1. 在桌面上按滑鼠右鍵,選擇 設定桌布…
[@more@]2. 可以選擇 隨機桌布

3. 隨機更換的桌布

4. 也可以自行指定
    先選擇 自訂,再按 +

5. 選擇要設定成桌布的圖片,然後按 開啟

6. 自行指定的桌布

不過,感覺細部的設定很缺乏,沒有辦法設定多久切換一次桌布,在自行設定桌布時,也沒有辦法一次指定一整個目錄。

在 Banana Pi 測試 – 新增 SSD 資料硬碟

新增一顆 SSD 硬碟來當做網頁資料存取。
1. 連接好 SSD 硬碟

[@more@]2. 分割 SSD 硬碟
# fdisk /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x6de07098.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6de07098

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-250069679, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-250069679, default 250069679):
Using default value 250069679

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 83

Command (m for help): wq
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

3. 格式化 SSD 硬碟
# mkfs.ext4 /dev/sda1
mke2fs 1.42.5 (29-Jul-2012)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
7815168 inodes, 31258454 blocks
1562922 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
954 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

4. 查看 SSD 硬碟分割區的 UUID
# blkid
/dev/sda1: UUID=”31bcc29f-70a8-46b5-85ad-51b52a30501b” TYPE=”ext4″
/dev/mmcblk0p1: SEC_TYPE=”msdos” UUID=”4D17-5A3B” TYPE=”vfat”
/dev/mmcblk0p2: UUID=”1af97748-34b7-4a6e-a16d-29c409d9c367″ TYPE=”ext4″

5. 建立掛載的目錄
# mkdir /var/www

6. 修改 /etc/fstab
# cp /etc/fstab /etc/fstab.$(date +%F)
# vim /etc/fstab
加入下面一行
UUID=31bcc29f-70a8-46b5-85ad-51b52a30501b /var/www ext4 noatime,nodiratime,discard,defaults 0 1

7. 重新啟動電腦
# sync;sync;sync;reboot

8. 驗收成果
# df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          7.3G  947M  6.0G  14% /
/dev/root       7.3G  947M  6.0G  14% /
devtmpfs        486M     0  486M   0% /dev
tmpfs            98M  252K   97M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           195M     0  195M   0% /run/shm
/dev/sda1       118G  188M  112G   1% /var/www

Adobe Flash Player 16.0.0.257

Adobe Flash Player 16.0.0.257
檢查安裝版本:https://www.adobe.com/tw/software/flash/about/
[@more@]Windows 平台
Internet Explorer:
http://fpdownload.adobe.com/get/flashplayer/pdc/16.0.0.257/install_flash_player_ax.exe
Windows 8/8.1 版則要從 Windows Update 中更新

All Other Browsers(Firefox,Safari & Opera):
http://fpdownload.adobe.com/get/flashplayer/pdc/16.0.0.257/install_flash_player.exe

Mac
http://fpdownload.adobe.com/get/flashplayer/pdc/16.0.0.257/install_flash_player_osx.dmg

測試 Acer Chromebox

為了更進一步瞭解 Chomebook/Chromebox,所以借了一台 Acer Chomebox 來進行測試,感謝借測的單位。
Acer Chromebox 官方網站:
http://www.acer.com.tw/ac/zh/TW/content/professional-series/acer-chromebox-cxi

硬體規格
Model:Acer Chromebox CXI

OSGoogle Chrome OS
CPUIntel 2957U Processor
RAM4GB DDR3
HDD16GB Flash Disk
USB3.0*4
NetworkingIntegrated LAN 10/100/1000
WLANWireless LAN+Bluetooth

下面的圖片是用數位相機照的,所以有些模糊
1. 第一次開機進入的畫面,速度真的很快,幾乎在 10 秒內完成,請選擇 繼續
[@more@]2. 選擇 接受並繼續

3. 輸入 Google 的帳號及密碼,並按 登入

4. 選擇一個個人圖像,並按 確定

5. 已完成登入

6. 登入之後的桌面,非常簡潔

電腦關機
在 US 上按滑鼠左鍵,出現的功能表,就可以找到關機的地方了!

Ubuntu Chromium 瀏覽器 Cache 目錄設定

參考網頁:
將 Linux 的 Firefox、Chrome 暫存區設定到 RAM 裡面 – Tsung’s Blog

因為在 Ubuntu Chromium 瀏覽器中,沒有辦法像 Firefox 一樣,可以設定 Cache 暫存區的目錄,所以要改用直接修改 .desktop 的方式。
1. 備份原檔
$ cp /usr/share/applications/chromium-browser.desktop ~/chromium-browser.desktop.$(date +%F)
[@more@]2. 進行修改
$ sudo sed -i ‘s/Exec=chromium-browser/Exec=chromium-browser –disk-cache-dir=”/tmp”/’ /usr/share/applications/chromium-browser.desktop

3. 檢查設定是否有生效,前後做比較

在 Ubuntu Mac Style 12.04 中使用 SSD

參考網頁:
Solid State Drive (SSD): optimize it for Ubuntu 14.04, Linux Mint 17.1 and Debian – Easy Linux tips project
永遠的真田幸村: Linux平台使用SSD必讀 (範例為Ubuntu) – yblog.org

修改方式:
1. 備份原 /etc/fstab
$ sudo cp /etc/fstab /etc/fstab.$(date +%F)
[@more@]2. 修改 /etc/fstab
這裡 120G  SSD 的分割是
92G / 根目錄
2G swap
25G /windows 備份區
# vim /etc/fstab
加入紅字的部份
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda1 during installation
UUID=1bfa9571-c711-4d02-8a65-a61e6c2f790f /               ext4    noatime,nodiratime,discard,errors=remount-ro 0       1
# /windows was on /dev/sda2 during installation
UUID=85E0-42F0  /windows        vfat    utf8,umask=007,gid=46 0       1
# swap was on /dev/sda3 during installation
UUID=324d38ce-b71d-4872-82a3-bb262397c221 none            swap    sw              0       0
# 將 /tmp 以 tmpfs 形式掛上
tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777 0 0
tmpfs   /var/spool tmpfs   defaults,noatime,mode=1777   0  0
tmpfs   /var/tmp   tmpfs   defaults,noatime,mode=1777   0  0
tmpfs   /var/log   tmpfs   defaults,noatime,mode=0755   0  0

3. 將 Firefox 瀏覽器的暫存檔指到 /tmp
開啟 Firefox 於瀏覽網址輸入
about:config

按我發誓,我一定會小心的!

於偏好設定名稱按 右鍵->新增->字
新增 browser.cache.disk.parent_directory
數值設定 /tmp

4. 改用 I/O Scheduler 提供系統效率
$ sudo cat /sys/block/sda/queue/scheduler
在 Ubuntu 12.04 顯示的可能是:
noop deadline [cfq]
修改 /etc/default/grub 設定檔
$ sudo vim /etc/default/grub

#GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
改成
GRUB_CMDLINE_LINUX_DEFAULT=”elevator=deadline quiet splash”

5. 讓設定生效
$ sudo update-grub
Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.2.0-74-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-74-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-67-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-67-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
done

6. 重新啟動電腦
$ sudo reboot