客製化 CentOS 7.4-1708 x86_64 Server 安裝光碟

為了測試系統比較方便,所以花了將近一個小時製作了這一片光碟。
安裝時只要三個步驟:分割硬碟、設定網路、設定 root  管理者密碼

1. 光碟開機畫面,取消倒數計時,預設 Install CentOS 7

[@more@]安裝畫面

分割硬碟

設定網路

開始安裝

設定 root 密碼

完成安裝

這個版本的特點:
1. 最小化安裝,再補上所需套件,x86-64 光碟容量 795M
2. 套件更新到 2017-08-19
3. 套件更新伺服器改成 頭城國小
4. 加入第三方套件庫 EPEL(Extra Packages for Enterprise Linux)
5. 預設安裝 Apache Web Server / PHP / MariaDB SQL Server,並啟動 Apache Web Server 及 MariaDB SQL Server
6. 新增一些 Apache Web Server 的安全性設定
7. MariaDB MySQL Server 修改成 UTF-8 的使用環境
8. 修改 php 設定,包含:上傳的檔案大小到 200M,時區改成 Asis/Taipei……等等。
9. 每天早上 6 點向 time.stdtime.gov.tw 對時
10. 個人使用環境的設定…..等等

安裝完後,要設定 MariaDB SQL Server 管理者密碼。
# /usr/bin/mysql_secure_installation

客製化 Ubuntu Server 16.04.2 安裝光碟

本來一直以為 Debian/Ubuntu 只能透過 LiveCD 來進行客製化,偶然在以下的網站發現 Debian/Ubuntu 也能像 RedHat/CentOS 的 kickstart 一樣,透然編輯文字檔的方式來達成自動安裝的工作。
參考網站:
ubuntu-autoinstaller/txt.cfg at master · express42/ubuntu-autoinstaller · GitHub
InstallCDCustomization – Community Help Wiki
Ubuntu 16.04 / Debian 8: Run PXE boot server for automated install – Narrow Escape
B.4. Contents of the preconfiguration file (for xenial)
https://help.ubuntu.com/16.04/installation-guide/example-preseed.txt
system installation – How do I create a completely unattended install of Ubuntu? – Ask Ubuntu

1. 下載 Ubuntu Server 16.04.2 ISO
# wget http://debian.linux.org.tw/ubuntu-releases/16.04.2/ubuntu-16.04.2-server-amd64.iso

2. 掛載光碟
# mount -o loop ubuntu-16.04.2-server-amd64.iso /mnt

3. 複製檔案
# mkdir ~/Ubuntu16042
# cp -a /mnt/* ~/Ubuntu16042
# cp -r /mnt/.disk ~/Ubuntu16042[@more@]
4. 修改 ~/Ubuntu16042/isolinux/txt.cfg
# vim ~/Ubuntu16042/isolinux/txt.cfg
default ainstall
label ainstall
  menu label ^Auto Install Ubuntu Server
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/aubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet debian-installer/language=en debian-installer/country=TW console-setup/ask_detect=false keyboard-configuration/layoutcode=us debian-installer/locale=en_US —
label install
  menu label ^Install Ubuntu Server
  kernel /install/vmlinuz
  append  file=/cdrom/preseed/ubuntu-server.seed vga=788 initrd=/install/initrd.gz quiet —

5. 建立 ~/Ubuntu16042/preseed/aubuntu-server.seed
    預設安裝 LAMP / OpenSSH Server
# vim ~/Ubuntu16042/preseed/aubuntu-server.seed
d-i debian-installer/locale string en_US.UTF-8
#d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i console-setup/layout string USA
d-i debian-installer/language string en
d-i debian-installer/country string TW
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us
# Default user, change
d-i passwd/root-login boolean true
d-i passwd/make-user boolean false
d-i user-setup/encrypt-home boolean false
d-i user-setup/allow-password-weak boolean true
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i mirror/country string manual
#d-i mirror/http/hostname string http://tw.archive.ubuntu.com
d-i mirror/http/hostname string http://free.nchc.org.tw
d-i mirror/http/directory string /ubuntu
d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string free.nchc.org.tw
d-i apt-setup/security_path string /ubuntu
d-i mirror/http/proxy string
d-i clock-setup/utc boolean false
d-i clock-setup/ntp boolean true
d-i time/zone string Asia/Taipei
#d-i partman/confirm boolean true
#d-i partman/choose_partition select finish
#d-i partman/confirm_nooverwrite boolean true
#d-i partman-auto/disk string /dev/[sv]da
#d-i partman-auto/method string lvm
#d-i partman-auto/choose_recipe select atomic
#d-i partman-lvm/device_remove_lvm boolean true
#d-i partman-lvm/confirm boolean true
#d-i partman-lvm/confirm_nooverwrite boolean true
#d-i partman-auto-lvm/guided_size string max
#d-i partman-partitioning/confirm_write_new_label boolean true
#d-i grub-installer/grub2_instead_of_grub_legacy boolean true
#d-i grub-installer/only_debian boolean true
#d-i grub-installer/bootdev string /dev/[sv]da
d-i pkgsel/update-policy select none
#d-i pkgsel/include string unity ubuntu-desktop openssh-server
tasksel tasksel/first multiselect lamp-server, openssh-server
#d-i pkgsel/include string openssh-server ntp build-essential rsync less vim ethtool curl lsscsi dstat htop strace
d-i finish-install/reboot_in_progress note

6. 製作成 ISO 光碟
# cd ~/Ubuntu16042
# mkisofs -r -V “Ubuntu-Server 16.04.2” -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul -boot-load-size 4 -boot-info-table -o ~/ubuntu-16.04.2-server-amd6_0501.iso .

7. 進行安裝測試
選擇安裝語言


選擇 Auto Install Ubuntu Server

不知道為什麼,要重新再選擇一次 locales

設定 root 密碼

分割硬碟

設定 MySQL Server 管理者密碼

安裝完成,重新啟動

客製化 CentOS 6.9 x86_64 LAMP 安裝光碟

為了方便測試系統而製作
光碟開機畫面

硬碟資料清除確認

[@more@]設定 root 密碼

硬碟分割

GRUB 開機管理程式安裝

開始安裝

安裝完成

主要特點:
1. 簡化安裝步驟
2. 採用最小化安裝,再補上一些缺少的套件 vim/nano/zip/unzip…….
3. 安裝 Apache + MariaDB(10.1) + PHP,並做系統調整
4. 安裝 Fail2ban,啟動 SSH Server 防護
5. 系統更新改至頭城國小 140.111.74.109

預設啟動 fail2ban 及 ssh 防護
[root@localhost ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
f2b-SSH    tcp  —  0.0.0.0/0            0.0.0.0/0           tcp dpt:22

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain f2b-SSH (1 references)
target     prot opt source               destination
RETURN     all  —  0.0.0.0/0            0.0.0.0/0

開啟服務
[root@localhost ~]# netstat -antulp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1447/sshd
tcp        0      0 :::80                       :::*                        LISTEN      1788/httpd
tcp        0      0 :::22                       :::*                        LISTEN      1447/sshd
tcp        0      0 ::1:22                      ::1:54878                   ESTABLISHED 1706/sshd
tcp        0      0 ::1:54878                   ::1:22                      ESTABLISHED 1705/ssh
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               1201/dhclient

加入對時工作排程
[root@localhost ~]# crontab -l
# 格式
# 分 時 日 月 星期幾 執行命令
# 對時
0 6 * * * /usr/sbin/ntpdate -s time.stdtime.gov.tw > /dev/null 2>&1;/sbin/hwclock -w > /dev/null 2>&1

安裝完成的後續設定

MariaDB SQL Server 後續設定
# /usr/bin/mysql_secure_installation

開啟防火牆上 HTTPD Web Server
# iptables -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
# iptables-save > /etc/sysconfig/iptables

客製化 ezgo 13 LXDE

稍微修改了一下,以符合自己的需要。
已先預載套件

[@more@]辦公文書功能表

美工設計功能表

影音媒體功能表

網際網路功能表

益智遊戲功能表

教育學習功能表

程式開發功能表

自由教材功能表

附屬應用程式功能表

ezgo 工具箱功能表

系統功能表

設定功能表

主要修改的地方:移除 LibreOffice,改安裝 OxOffice 6

Firefox 新增附加元件:Adblock Plus / AdBlocker for Youtube / ColorfulTabs

Google Chrome:預設首頁改成「如何開始體驗ezgo」,新增擴充功能:Adblock Plus / AdBlocker for Youtube

Chromium:預設首頁改成「如何開始體驗ezgo」,新增擴充功能:Adblock Plus / AdBlocker for Youtube

輸入法部分,移除 fcitx,改安裝 gcin,預設輸入法改成行列輸入法

客製化 CentOS-7-x86_64-1511 安裝光碟

為了測試 NAS 比較方便,所以特別製作了這一片光碟。
安裝時只要三個步驟:分割硬碟、設定網路、設定 root  管理者密碼
1. 光碟開機畫面,取消倒數計時,預設 Install CentOS 7

[@more@]2. 分割硬碟

3.設定網路

4. 進行安裝

5. 設定 root 管理者密碼

6. 一共安裝 408 個套件

這個版本的特點:
1. 最小化安裝,再補上所需套件,x86-64 光碟容量 724M
2. 套件更新到 2016-06-30
3. 套件更新伺服器改成頭城國小
4. 預設啟動 Samba + vsftpd FTP Server
5. 預先修改 Samba 及 vsftpd FTP Server 基本設定,及 SELinux 相關設定
5. 加入第三方套件庫 EPEL(Extra Packages for Enterprise Linux)
6. 加裝 grive2 套件,讓系統能與 Google Drive 進行目錄同步備份
7. 每天早上 6 點向 time.stdtime.gov.tw 對時
8. 個人使用環境的設定…..等等

客製化 CentOS 6.8 x86 & x86_64 Server 光碟

安裝 CentOS 6.8 x86_64 Server 只要二步驟:設定 root 管理者密碼分割硬碟

已經取消倒數計時
[@more@]設定 root 管理者密碼

分割硬碟

安裝過程,安裝 306 個套件

安裝完畢

這個版本的特點:
1. 最小化安裝,再補上所需套件,x86-64 光碟容量 498M,x86 光碟容量 445M
2. 套件更新到 2016-05-27
3. 套件更新伺服器改成頭城國小
4. 預設啟動 LAMP (Linux + Apache + MySQL + PHP)
5. Apache Web Server 增加一些安全性上的設定
    ServerTokens Prod
    ServerSignature Off
6. MySQL Server 修改成 UTF-8 的使用環境
7. PHP 部分的設定,僅列出部份的修改
    時區改成 Asia/Taipei
    upload_max_filesize = 500M
    post_max_size = 500M
8. 每天早上 6 點向 time.stdtime.gov.tw 對時
9. 個人使用環境的設定…..等等

解決 客製化 Ubuntu MATE 16.04 安裝光碟執行時的錯誤訊息

客製化完後,試用時會出現如圖的錯誤訊息

[@more@]解決方式
刪除重製時 os.MATE 目錄下的 /etc/xdg/autostart/blueman.desktop
# cd /root
# rm -rf os.MATE/etc/xdg/autostart/blueman.desktop

壓縮 filesystem.squashfs
# mksquashfs os.MATE iso.MATE/casper/filesystem.squashfs

重製成 ISO 光碟
# cd iso.MATE
# mkisofs -r -V “Ubuntu-MATE 16.0_x64” -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul -boot-load-size 4 -boot-info-table -o ../ubuntu-mate-16.04-desktop-amd64_20160422.iso .

客製化 Ubuntu MATE 16.04 x86 安裝光碟

習慣使用這一個版本,所以自己動手改了一下
[@more@]進入試用桌面

功能表

影音功能表

系統工具功能表

網際網路功能表

美工繪圖功能表

軟體開發功能表

辦公功能表,移除 LibreOffice,改裝 OxOffice

附屬應用程式功能表

Firefox 安裝 Adblock Plus 附加元件

Firefox 可以正常連線政府網站

因為 Google Chrome 不支援 x86,所以改安裝 Chromium 瀏覽器及 Adblock Plus 擴充功能

新增字型:文泉驛 / 全字庫 / 思源黑體

移除 fcitx,安裝 hime

目前把它拿來當做正在使用 Linux 桌面及 LiveCD 救援光碟。

客製化 Red Hat Enterprise Linux 7.2

安裝之後順道完成,之後可以很快速產生所須要的純文字 Server 環境
取消倒數,內定選項改成直接安裝 Red Hat Enterprise Linux 7.2

安裝只要二個步驟:分割硬碟和設定 root 密碼

另外,Red Hat Enterprise Linux 的套件庫似乎沒有 php-mbstring 這一個套件!

與之前相同,客製化內容:
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. 套件更新到 2016_04_06
6. 每天早上 6 點對時