Ubuntu 14.04安裝與配置
Ubuntu 14.04 Journal
====================
安裝系統時最好是用Ubuntu 14.04.3版本或者更新版本,因為14.04版本問題比較多!
安裝過好多次Ubuntu了。因為在使用過程中,難免誤操作引起系統崩潰或者安裝移除太多軟體,使系統執行速度降低,
但是每次安裝之後,似乎都要花不少時間對系統進行設定,這是一件麻煩的事情。為了節省時間,我決定用一個檔案來記錄
自己對新裝的系統做了那安裝和修改,以便於以後做重複勞動時,心裡有個數。
這篇文件就用做安裝日記,並在以後保持更新。
=============
系統設定事項:
=============
1. 如果要讓root使用者登入,須修改/etc/passwd檔案,將登入shell的y改成想要使用的shell(如: /bin/bash),root使用者密碼一定要修改!
2. 修改/etc/sudoers檔案,並把普通使用者加入sudo組,使普通使用者在執行sudo免輸入密碼;sudoers的預設許可權為0440,修改檔案內容前後都要修改或還原許可權,
萬一出現麻煩時,可以重啟按ESC進入單使用者模式,那樣可以使用root使用者登入後再進行必要的修改;
3. 修改/bin/sh連結到/bin/bash;
$ sudo ln -sf /bin/bash /bin/sh
4. 解壓或建立使用者自己的bin,並配置使用者的.bashrc和.profile,設定相關環境變數;
5. 修改Ubuntu的編碼是/etc/default/locale檔案,而在Fedora中是/etc/sysconfig/i18n檔案;
6. 修改Ubuntu主機名是/etc/hostname檔案;
7. 關閉防火牆;
$ sudo ufw disable
8. 安裝xbacklight來設定顯示器亮度(對膝上型電腦有效):
$ sudo apt-get install xbacklight -y
9. 安裝gconf-editor以配置系統應用:
$ sudo apt-get install gconf-editor -y
注意:在Ubuntu 12.10中,有一個dconf-editor配置工具,而gconf-editor沒什麼用了。
10. 安裝sysv-rc-conf字元介面服務管理程式;
$ sudo apt-get install sysv-rc-conf -y
11. language support in 'System Settings -> Language Support'. If you have
other input method(e.g: fcitx, scim) installed, you need to change to
use it by the feature 'Keyboard input method system' here.
12. 如果需要修改顯示器解析度, 'System Settings -> Displays'。
13. wmctrl - interact with a EWMH/NetWM compatible X Window Manager
$ sudo apt-get install wmctrl -y
Command: wmctrl -r :ACTIVE: -b toggle,above
14. 安裝parcellite剪貼簿,原因是gnome-settings-daemon在應用程式與系統共享剪貼簿時,只是複製連結而不真正複製資料,
從而導致應用程式退出後,不能共享應用程式中複製內容。安裝parcellite可以解決此問題!
$ sudo apt-get install parcellite -y
15. 為gitolite伺服器建立git帳號
$ sudo adduser --system --shell /bin/bash --group git
or
$ sudo adduser --system --shell /bin/bash --gecos 'Git SCM User' --group --disabled-password --home /home/git git
16. 為gitolite伺服器安裝sendmail
$ sudo apt-get install sendmail -y
=============
軟體安裝列表:
=============
1. 安裝guake終端;
$ sudo apt-get install guake -y
2. 安裝ssh-server和ssh-client;
$ sudo apt-get install openssh-server openssh-client -y
3. 安裝samba,並配置smb.conf;
$ sudo apt-get install samba -y
4. 安裝tftp並進行配置;
$ sudo apt-get install tftp tftpd -y
5. 安裝VSFTPD,並配置vsftpd.conf:
$ sudo apt-get install vsftpd -y
6. 安裝FTP視覺化客戶端:
$ sudo apt-get install filezilla -y
7. 安裝ctags;
$ sudo apt-get install ctags -y
8. 安裝gtags;
$ sudo apt-get install global -y
9. 安裝cscope;
$ sudo apt-get install cscope -y
10. 安裝vim編輯器,包括個性化配置,中文幫助,以及幾個好用的外掛;
$ sudo apt-get install vim vim-gnome -y
注意:
a. 如果VIM不能記住訪問歷史,那麼要檢查一下~/.viminfo檔案是否存在,並且檔案所有者與許可權是否與當前使用者一致。
b. 記得建立~/.vim_undodir目錄,相應的外掛需要使用。
另外,如何使用secureCRT,配置“模擬->終端”選擇Xterm,並且選擇ANSI顏色,就會像Putty一樣。
11. Okular PDF reader
$ sudo apt-get install okular -y
12. tree
$ sudo apt-get install tree -y
13. realpath
$ sudo apt-get install realpath -y
14. dos2unix
$ sudo apt-get install dos2unix -y
15. rar - archive files with compression
$ sudo apt-get install rar -y
16. 安裝git工具;
$ sudo apt-get install git-core gitg gitk -y
17. 安裝git server;
$ sudo apt-get install gitosis -y
or
$ sudo apt-get install gitolite -y
對於git伺服器,推薦安裝gitolite,並且建議安裝github的版本!對應的GIT URL為:
git clone git://github.com/ossxp-com/gitolite.git
18. install git web
$ sudo apt-get install gitweb -y
19. 安裝git daemon,也可以Appache來做;
$ sudo apt-get install git-daemon-run -y
20. review-board
$ sudo apt-get install python-rbtools -y
old ubuntu maybe with following commands:
$ sudo apt-get install python-setuptools -y
$ sudo easy_install -U RBTools
21. 安裝比較工具meld
$ sudo apt-get install meld -y
22. 安裝圖形介面抓包工具wireshark
$ sudo apt-get install wireshark -y
23. 安裝aircrack-ng軟體包,如果需要的話:
$ sudo apt-get install aircrack-ng -y
24. 安裝Linux Dreamweaver Bluefish 編輯網頁
$ sudo apt-get install bluefish -y
25. 安裝NFS服務,以方便開發除錯,詳見當前目錄下NFS-ROOT
$ sudo apt-get install nfs-common nfs-kernel-server -y
26. 安裝mplayer播放器:
$ sudo apt-get install mplayer mplayer-fonts -y
$ sudo apt-get install ffmpeg -y
27. 安裝fcitx輸入法:
$ sudo apt-get install fcitx fcitx-googlepinyin fcitx-table-wbpy fcitx-table-wubi -y
28. 安裝SCIM輸入法:
$ sudo apt-get install scim scim-tables-zh -y
並修改檔案/etc/X11/Xsession.d/95xinput,內容如下:
-------------------------
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
export GTK_IM_MODULE=scim
-------------------------
注意:Ubuntu 12.10不需要了!
29. 解決SCIM在firefox瀏覽器中不能開啟的問題的方法是:用vi或其他編輯器開啟/usr/bin/firefox或/usr/bin/acroread(為啟動指令碼),
在檔案開頭處加入如下內容:
-------------------------------
GTK_IM_MODULE=scim-bridge
export XMODIFIERS GTK_IM_MODULE
-------------------------------
注意:Ubuntu 12.10不需要了!
30. 如果scim沒有自動啟動的話,可能用下面命令重新配置一下:
$ im-switch -s scim_xim
31. 瀏覽器預設情況下不自帶flash播放外掛,安裝命令如下:
$ sudo apt-get install flashplugin-installer -y
32. 關閉本地dnsmasq。把/etc/NetworkManager/NetworkManager.conf中dns=dnsmasq行註釋掉,再重啟network-manager。
33. 安裝DNS和DHCP伺服器
$ sudo apt-get install dnsmasq -y
34. 安裝iperf(windows has jperf)
$ sudo apt-get install iperf -y
35. 建立一個expat庫的連結,RealTek的GDB等工具需要
$ sudo ln -sf /lib/i386-linux-gnu/libexpat.so.1 /lib/libexpat.so.0
36. radvd & dibbler-server
$ sudo apt-get install radvd dibbler-server -y
37. 安裝pppoe-server伺服器
$ sudo apt-get install pppoe -y
38. 安裝snmp
$ sudo apt-get install snmp -y
39. nmap - Network exploration tool and security / port scanner
$ sudo apt-get install nmap -y
40. 安裝brctl工具:
$ sudo apt-get install bridge-utils -y
41. 安裝ebtables工具:
$ sudo apt-get install ebtables -y
42. 安裝traceroute
$ sudo apt-get install traceroute -y
============
安裝開發環境
============
1. 32 bit on 64 bit
$ sudo dpkg --add-architecture i386
Or if you are using Ubuntu 12.04 LTS (Precise Pangolin) or below, use
this:
$ echo "foreign-architecture i386" > /etc/dpkg/dpkg.cfg.d/multiarch
then:
$ sudo apt-get update -y
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 -y
$ sudo apt-get install build-essential libc6-dev libc6-dev-i386 -y
2. 安裝開發環境(如果沒有的話);
$ sudo apt-get install build-essential -y
3. 在執行make menuconfig的時候可能會出錯,安裝一下libncurses5-dev;
$ sudo apt-get install libncurses5-dev -y
4. 安裝zlib庫:
$ sudo apt-get install zlib1g-dev -y
or
$ sudo apt-get install libzip-dev -y
$ sudo ln -sf /usr/include/x86_64-linux-gnu/zconf.h /usr/include
$ sudo ln -sf /usr/include/i386-linux-gnu/zconf.h /usr/include
5. 安裝liblzo2-dev庫:
$ sudo apt-get install liblzo2-dev -y
6. 安裝libssl-dev軟體包:
$ sudo apt-get install libssl-dev -y
7. 安裝uuencode軟體包:
$ sudo apt-get install sharutils -y
8. 安裝automake, autoconf, bison和flex等包;
$ sudo apt-get install automake autoconf bison flex gawk -y
9. install libtool
$ sudo apt-get install libtool -y
10. 安裝doxygen軟體包(這個安裝比較大,可以考慮一下要不要裝):
$ sudo apt-get install doxygen -y
11. 安裝minicom串列埠工具;
$ sudo apt-get install minicom -y
12. 安裝kermit
$ sudo apt-get install ckermit -y
============================
tools for switch development
============================
1. lftp
$ sudo apt-get install lftp -y
2. lua-5.1
$ sudo apt-get install lua5.1 -y
3. libreadline
$ sudo apt-get install libreadline5:i386 -y
4. lzma
$ sudo apt-get install lzma:i386 -y
$ sudo ln -s /lib/i386-linux-gnu/liblzma.so.5.0.0 /lib/i386-linux-gnu/liblzma.so.0
============
可選安裝軟體
============
1. virtualbox
$ sudo apt-get install virtualbox -y
2. gimp - an image manipulation and paint program.
$ sudo apt-get install gimp -y
3. 安裝skype聊天工具:
$ sudo apt-get install skype -y
4. apt-file
$ sudo apt-get install apt-file -y
5. 遠端桌面
$ sudo apt-get install xrdp vnc4server xfce4 -y
$ echo "xfce4-session" >~/.xsession
$ sudo service xrdp restart
6. freeradius - Authentication, Authorization and Accounting server
$ sudo apt-get install freeradius -y
7. mc - Visual shell for Unix-like systems.
$ sudo apt-get install mc -y
8. extundelete - utility to undelete files from an ext3 or ext4 partition
$ sudo apt-get install extundelete -y
9. 安裝chrome瀏覽器
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
$ sudo dpkg -i google-chrome-stable_current_i386.deb
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
or
$ sudo wget http://chrome-deb.googlecode.com/svn/trunk/chrome-deb.list -O /etc/apt/sources.list.d/chrome-deb.list
$ sudo apt-get update -y
$ sudo apt-get install chrome-browser -y