解決 Arch Linux 更新時出現的錯誤訊息

在 Arch Linux 更新套件時出現下面的錯誤訊息
# pacman -Syu
:: Synchronizing package databases…
 core is up to date
 extra is up to date
 community is up to date
 alarm is up to date
 aur is up to date
:: Starting full system upgrade…
error: duplicated database entry ‘pacman-mirrorlist’[@more@]解決方式:
1. 檢查 /var/lib/pacman/local 目錄下是否有重複
# ls /var/lib/pacman/local | grep pacman-mirrorlist
pacman-mirrorlist-20151217-1
pacman-mirrorlist-20151228-1

2. 移除掉舊的重複
# rm -rf  /var/lib/pacman/local/pacman-mirrorlist-20151217-1

解決 Raspberry Pi Raspbian Jessie Lite 多一個 IP 的問題

使用 Raspberry Pi Raspbian Jessie Lite 架設一個網路監控系統,但很奇怪的是設定好固定 IP 後,系統好像會自動出多一個 IP。
使用 ip 指令可以查詢到 2 個 IP
# ip addr show eth0 | grep ‘inet’ | grep -v ‘inet6’ | awk ‘{print $2}’
192.168.1.74/24
192.168.1.82/24

使用 ifconfig 指令只能查詢一個 IP
# ifconfig eth0 | grep ‘inet addr’ | awk ‘{print $2}’ | awk -F’:’ ‘{print $2}’
192.168.1.74[@more@]可是在 /etc/network/interfaces 只設定了一個 IP
# cat /etc/network/interfaces
iface eth0 inet static
        address 192.168.1.74
        netmask 255.255.255.0
        gateway 192.168.1.254
        dns-nameservers 168.95.1.1

解決方式:
1. 關閉 dhcpcd 服務
# systemctl stop dhcpcd.service

2. 取消開機時啟動 dhcpcd 服務
# systemctl disable dhcpcd.service
Synchronizing state for dhcpcd.service with sysvinit using update-rc.d…
Executing /usr/sbin/update-rc.d dhcpcd defaults
insserv: warning: current start runlevel(s) (empty) of script `dhcpcd’ overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd’ overrides LSB defaults (0 1 6).

Executing /usr/sbin/update-rc.d dhcpcd disable
insserv: warning: current start runlevel(s) (empty) of script `dhcpcd’ overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd’ overrides LSB defaults (0 1 6).

3. 重新啟啟動電腦
# sysnc;sync;reboot

解決在 Debian 使用 dpkg 指令出現的錯誤

在 Debian 使用 dpkg 指令查詢時出現了錯誤訊息
# dpkg -l
dpkg-query: error: parsing file ‘/var/lib/dpkg/status’ near line 452 package ‘libdns100’:
 field name `Version? must be followed by colon

解決方式:[@more@]參考網頁:dpkg exit with error parsing file `/var/lib/dpkg/status`, what to do? – Ask Ubuntu

1. 刪除損壞的檔案
# rm -rf  /var/lib/dpkg/status

2. 複製備份的檔案
# cp /var/backups/dpkg.status.0 /var/lib/dpkg/status

3. 進行套件庫更新
# apt-get update

如果還是有問題,採用下面的方式
# gunzip -c /var/backups/dpkg.status.6.gz > /var/lib/dpkg/status

忘了 CentOS 7 root 密碼

1. 在 grub 功能表上按 e 鍵,進行修改
[@more@]2. 找到 linux16 那一行,在最後面加上 rd.break,並按 Ctrl+x

3. 掛載目錄 /sysroot
    # mount -o remount,rw /sysroot

4. chroot 到 /sysroot 目錄。
    # chroot /sysroot

5. 輸入 passwd 修改密碼

6. 解決可能因為 SELinux Context 權限的問題
    # touch /.autorelabel

7. 輸入 exit 退出

8. 輸入 reboot 重新開機

客製化 CentOS 7.2-1511 x86_64 Server 安裝光碟

本來一直很抗拒升級或是安裝 CentOS 7.x,因為覺得 CentOS 7.x 和之前的 CentOS 6.x 相差很多,在 CentOS 6.x 支援期還很久的情況下,實在沒有什麼動力去仔細研究 CentOS 7.x,不過最近因為一直在使用 Arch Linux 和 Debian 8,所以慢慢習慣了 CentOS 7.x  中的  systemctl 指令,唯一感覺還不太習慣的是 FirewallD 設定防火牆的部分。

光碟開機畫面,預設取消倒數
[@more@]安裝畫面

分割硬碟

設定網路

開始安裝

設定 root 密碼

完成安裝

預設只要三個步驟:分割硬碟、設定網路、設定 root 密碼。
客製化內容:
1. 預設安裝 Apache Web Server / PHP / MariaDB SQL Server,並啟動 Apache Web Server 及 MariaDB SQL Server
2. 新增一些 Apache Web Server 的安全性設定
3. MariaDB MySQL Server 修改成 UTF-8 的使用環境
4. 修改 php 設定,包含:上傳的檔案大小到 200M,時區改成 Asis/Taipei……等等。
5. 套件更新到 2015_12_29
6. 套件更新伺服器改成臺灣
7. 每天早上 6 點對時

Adobe Flash Player 20.0.0.267


檢查安裝版本:https://www.adobe.com/tw/software/flash/about/
                             https://get.adobe.com/tw/flashplayer/[@more@]Windows 7 平台
Internet Explorer:  Adobe Flash Player 20.0.0.267
http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_20_active_x.exe
Windows 8 / 8.1 / 10 / Server 2012 / Server 2012 R2 要從 Windows Update 更新

All Other Browsers(Firefox,Safari & Opera): Adobe Flash Player 20.0.0.267
http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_20_plugin.exe

Chrome:Adobe Flash Player 20.0.0.267
http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ppapi.exe

Mac 平台:
http://fpdownload.adobe.com/get/flashplayer/pdc/20.0.0.267/install_flash_player_osx.dmg

CentOS Linux 7.2.1511 release

CentOS 7.x 版使用者可以直接使用 yum update 來更新到最新版本。
# yum update

更新後版本代號
# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

CentOS 7.2.1511 ISO 檔下載:
樹德科技大學
元智大學
交通大學資訊工程學系
南臺科技大學(目前無法連線)
中山大學
國家高速網路與計算中心
崑山科技大學
義守大學
中華電信
臺中市教育網路中心
頭城國小