1. 將更新的 Server 都指向國家高速網路中心
cp /etc/apt/sources.list /etc/apt/sources.list.$(date +%F)
sed -i 's/ftp.debian.org/free.nchc.org.tw/g' /etc/apt/sources.list
清除所有的
apt-get clean all
更新套件庫
apt-get update -y
2. 進行套件更新
apt-get upgrade -y
3. 補足缺少的套件 cp /etc/apt/sources.list /etc/apt/sources.list.$(date +%F)
sed -i 's/ftp.debian.org/free.nchc.org.tw/g' /etc/apt/sources.list
清除所有的
apt-get clean all
更新套件庫
apt-get update -y
2. 進行套件更新
apt-get upgrade -y
apt-get install -y vim zip unzip mailutils ntpdate rsync sysv-rc-conf
4. 讓終端機程式可以輸入及顯示中文
dpkg-reconfigure locales
vim /etc/default/locale
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
/usr/bin/locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
5. 時區及預設編輯器設定
tail -2 /etc/profile
export TZ="Asia/Taipei"
export EDITOR="/usr/bin/vim"
/usr/bin/tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa
2) Americas
3) Antarctica
4) Arctic Ocean
5) Asia
6) Atlantic Ocean
7) Australia
8) Europe
9) Indian Ocean
10) Pacific Ocean
11) coord - I want to use geographical coordinates.
12) TZ - I want to specify the time zone using the Posix TZ format.
#? 5
Please select a country whose clocks agree with yours.
1) Afghanistan 18) Israel 35) Palestine
2) Armenia 19) Japan 36) Philippines
3) Azerbaijan 20) Jordan 37) Qatar
4) Bahrain 21) Kazakhstan 38) Russia
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
6) Bhutan 23) Korea (South) 40) Singapore
7) Brunei 24) Kuwait 41) Sri Lanka
8) Cambodia 25) Kyrgyzstan 42) Syria
9) China 26) Laos 43) Taiwan
10) Cyprus 27) Lebanon 44) Tajikistan
11) East Timor 28) Macau 45) Thailand
12) Georgia 29) Malaysia 46) Turkmenistan
13) Hong Kong 30) Mongolia 47) United Arab Emirates
14) India 31) Myanmar (Burma) 48) Uzbekistan
15) Indonesia 32) Nepal 49) Vietnam
16) Iran 33) Oman 50) Yemen
17) Iraq 34) Pakistan
#? 43
The following information has been given:
Taiwan
Therefore TZ='Asia/Taipei' will be used.
Local time is now: Tue Feb 28 22:47:26 CST 2017.
Universal Time is now: Tue Feb 28 14:47:26 UTC 2017.
Is the above information OK?
1) Yes
2) No
#? 1
You can make this change permanent for yourself by appending the line
TZ='Asia/Taipei'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Taipei
6. 安裝 snmpd
apt-get install snmpd snmp
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.$(date +%F)
echo 'rocommunity public' > /etc/snmp/snmpd.conf
chmod 600 /etc/snmp/snmpd.conf
update-rc.d snmpd defaults
/etc/init.d/snmpd restart
沒有留言:
張貼留言