====================
Ubuntu 16.04 Journal
====================
user@group:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
安装过好多次Ubuntu了。因为在使用过程中,难免误操作引起系统崩溃或者安装移除太多软件,使系统运行速度降低,
但是每次安装之后,似乎都要花不少时间对系统进行设置,这是一件麻烦的事情。为了节省时间,我决定用一个文件来记录
自己对新装的系统做了那安装和修改,以便于以后做重复劳动时,心里有个数。
这篇文档就用做安装日记,并在以后保持更新。
==================
I. System Settings
==================
1. change the password for root user.
$ sudo passwd root
2. change /etc/sudoers so that user can execute sudo command without password.
The file permission is 0440, you should use 'visudo' to edit it.
$ sudo visudo
from:
%sudo ALL=(ALL:ALL) ALL
to:
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
PS: you may also need to add the user to sudo group in /etc/group.
3. make symbolic links /bin/sh to /bin/bash
$ sudo ln -sf /bin/bash /bin/sh
4. you may need customize your own ~/.bashrc or ~/.profile, and have you own ~/bin and so on.
5. change Ubuntu coding in /etc/default/locale(/etc/sysconfig/i18n for Fedora).
6. change Ubuntu hostname in the file /etc/hostname.
7. disable firewall
$ sudo ufw disable
8. for notebook user, intall xbacklight to set sceen brightness.
$ sudo apt-get install xbacklight -y
9. install gconf-editor to configure system programmes:
$ sudo apt-get install gconf-editor -y
PS: in Ubuntu 12.10, there is a dconf-editor. so gconf-editor is obsolete.
10. install sysv-rc-conf to manage service programmes
$ 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. maybe need change display resolution in '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. install parcellite clipboard, the reason is that when
gnome-settings-daemon shares clipborad between user programme and system,
it just copy the link not real data. therefore, when the application exit,
it can use the content in the clipboard. using parcellite can resolve this
problem!
$ sudo apt-get install parcellite -y
15. create git account for gitolite server
$ 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. install sendmail for gitolite server
$ sudo apt-get install sendmail -y
=================
II. Software List
=================
1. Install Input Method
(a). fcitx(preferred):
$ sudo apt-get install fcitx fcitx-googlepinyin fcitx-table-wbpy fcitx-table-wubi -y
(b). SCIM:
$ sudo apt-get install scim scim-tables-zh -y
change /etc/X11/Xsession.d/95xinput as following:
-------------------------
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
export GTK_IM_MODULE=scim
-------------------------
Note: It's unnecessary in Ubuntu 12.10!
2. The method to settle the conflict between SCIM and Firefox Browser is: edit /usr/bin/firefox or /usr/bin/acroread(adobe reader script).
Add following lines in the beginning.
-------------------------------
XMODIFIERS=@im=scim
GTK_IM_MODULE=scim-bridge
export XMODIFIERS GTK_IM_MODULE
-------------------------------
Note: It's unnecessary in Ubuntu 12.10!
3. if scim doesn't start automatically, you can reconfigure it with the command below.
$ im-switch -s scim_xim
4. install samba and configure smb.conf and add a samba user
$ sudo apt-get install samba -y
$ sudo smbpasswd -a user
PS: user should be a shell user.
5. install tftp and tftpd
$ sudo apt-get install xinetd tftp tftpd -y
6. install VSFTPD and configure vsftpd.conf:
$ sudo apt-get install vsftpd -y
7. install FTP client:
$ sudo apt-get install filezilla -y
8. Install flash player plugin for browser.
$ sudo apt-get install flashplugin-installer -y
9. tree
$ sudo apt-get install tree -y
10. realpath
$ sudo apt-get install realpath -y
11. dos2unix
$ sudo apt-get install dos2unix -y
12. rar - archive files with compression
$ sudo apt-get install rar -y
13. Okular PDF reader
$ sudo apt-get install okular -y
14. install mplayer:
$ sudo apt-get install mplayer mplayer-fonts -y
$ sudo apt-get install ffmpeg -y
=================================
III. Embedded Develop Environment
=================================
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. install develop environment
$ sudo apt-get install build-essential -y
3. make menuconfig may fail, so install libncurses5-dev
$ sudo apt-get install libncurses5-dev -y
4. install automake, autoconf, bison and flex
$ sudo apt-get install automake autoconf bison flex gawk -y
5. install libtool
$ sudo apt-get install libtool -y
6. need a link to expat libary, RealTek's GDBs need it.
$ sudo ln -sf /lib/i386-linux-gnu/libexpat.so.1 /lib/libexpat.so.0
7. install libssl-dev
$ sudo apt-get install libssl-dev -y
8. install uuencode
$ sudo apt-get install sharutils -y
9. install doxygen(this package is big)
$ sudo apt-get install doxygen -y
10. install minicom
$ sudo apt-get install minicom -y
11. install kermit
$ sudo apt-get install ckermit -y
12. install NFS for debug purpose(refer to NFS-ROOT)
$ sudo apt-get install nfs-common nfs-kernel-server -y
========================
tools for switch project
========================
1. lftp
$ sudo apt-get install lftp -y
2. lua-5.1
$ sudo apt-get install lua5.1 -y
3. 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
4. libreadline
$ sudo apt-get install libreadline5:i386 -y
5. install zlib
$ sudo apt-get install zlib1g-dev:i386 -y
$ sudo ln -s /usr/include/i386-linux-gnu/zconf.h /usr/include
or
$ sudo apt-get install libzip-dev -y
$ sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include
6. 安装liblzo2-dev库:
$ sudo apt-get install liblzo2-dev -y
=================================
IV. Some useful tools for develop
=================================
1. install guake terminal
$ sudo apt-get install guake -y
2. install vim editor
$ sudo apt-get install vim vim-gnome -y
Note:
a. if VIM can't remember history, you need to check if ~/.viminfo exist and make sure the file perssion and owner is current user.
b. and ~/.vim_undodir directory is needed for my own.
In addition, if use secureCRT, configure “仿真->终端” to choose Xterm,and use ANSI color, it will work like putty.
3. install ctags & cscope
$ sudo apt-get install exuberant-ctags cscope -y
4. install gtags
$ sudo apt-get install global -y
5. Linux Dreamweaver Bluefish
$ sudo apt-get install bluefish -y
6. install ssh-server and ssh-client
$ sudo apt-get install openssh-server openssh-client -y
7. install git
$ sudo apt-get install git-core gitg gitk -y
8. install 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
9. install git web
$ sudo apt-get install gitweb -y
10. git daemon,也可以Appache来做;
$ sudo apt-get install git-daemon-run -y
11. review-board
$ sudo apt-get install python-rbtools -y
or
$ sudo apt-get install python-setuptools -y
$ sudo easy_install -U RBTools
12. meld
$ sudo apt-get install meld -y
13. wireshark
$ sudo apt-get install wireshark -y
14. aircrack-ng
$ sudo apt-get install aircrack-ng -y
15. DNS and DHCP server
$ sudo apt-get install dnsmasq -y
16. shutdown local dnsmasq. comment 'dns=dnsmasq' line in
/etc/NetworkManager/NetworkManager.conf, then restart network-manager.
17. radvd & dibbler-server
$ sudo apt-get install radvd dibbler-server -y
18. iperf(windows has jperf)
$ sudo apt-get install iperf -y
19. pppoe-server
$ sudo apt-get install pppoe -y
20. snmp
$ sudo apt-get install snmp -y
21. nmap - Network exploration tool and security / port scanner
$ sudo apt-get install nmap -y
22. install VLAN
$ sudo apt-get install vlan -y
$ sudo modprobe 8021q
23. brctl
$ sudo apt-get install bridge-utils -y
24. ebtables
$ sudo apt-get install ebtables -y
25. traceroute
$ sudo apt-get install traceroute -y
=========================
some other optional tools
=========================
1. virtualbox
$ sudo apt-get install virtualbox -y
2. gimp - an image manipulation and paint program.
$ sudo apt-get install gimp -y
3. install skype chatting software
$ sudo apt-get install skype -y
4. apt-file
$ sudo apt-get install apt-file -y
5. remote desktop
$ 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. google 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
Ubuntu 16.04 Journal
====================
user@group:~$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
安装过好多次Ubuntu了。因为在使用过程中,难免误操作引起系统崩溃或者安装移除太多软件,使系统运行速度降低,
但是每次安装之后,似乎都要花不少时间对系统进行设置,这是一件麻烦的事情。为了节省时间,我决定用一个文件来记录
自己对新装的系统做了那安装和修改,以便于以后做重复劳动时,心里有个数。
这篇文档就用做安装日记,并在以后保持更新。
==================
I. System Settings
==================
1. change the password for root user.
$ sudo passwd root
2. change /etc/sudoers so that user can execute sudo command without password.
The file permission is 0440, you should use 'visudo' to edit it.
$ sudo visudo
from:
%sudo ALL=(ALL:ALL) ALL
to:
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
PS: you may also need to add the user to sudo group in /etc/group.
3. make symbolic links /bin/sh to /bin/bash
$ sudo ln -sf /bin/bash /bin/sh
4. you may need customize your own ~/.bashrc or ~/.profile, and have you own ~/bin and so on.
5. change Ubuntu coding in /etc/default/locale(/etc/sysconfig/i18n for Fedora).
6. change Ubuntu hostname in the file /etc/hostname.
7. disable firewall
$ sudo ufw disable
8. for notebook user, intall xbacklight to set sceen brightness.
$ sudo apt-get install xbacklight -y
9. install gconf-editor to configure system programmes:
$ sudo apt-get install gconf-editor -y
PS: in Ubuntu 12.10, there is a dconf-editor. so gconf-editor is obsolete.
10. install sysv-rc-conf to manage service programmes
$ 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. maybe need change display resolution in '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. install parcellite clipboard, the reason is that when
gnome-settings-daemon shares clipborad between user programme and system,
it just copy the link not real data. therefore, when the application exit,
it can use the content in the clipboard. using parcellite can resolve this
problem!
$ sudo apt-get install parcellite -y
15. create git account for gitolite server
$ 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. install sendmail for gitolite server
$ sudo apt-get install sendmail -y
=================
II. Software List
=================
1. Install Input Method
(a). fcitx(preferred):
$ sudo apt-get install fcitx fcitx-googlepinyin fcitx-table-wbpy fcitx-table-wubi -y
(b). SCIM:
$ sudo apt-get install scim scim-tables-zh -y
change /etc/X11/Xsession.d/95xinput as following:
-------------------------
/usr/bin/scim -d
XMODIFIERS="@im=SCIM"
export XMODIFIERS
export GTK_IM_MODULE=scim
-------------------------
Note: It's unnecessary in Ubuntu 12.10!
2. The method to settle the conflict between SCIM and Firefox Browser is: edit /usr/bin/firefox or /usr/bin/acroread(adobe reader script).
Add following lines in the beginning.
-------------------------------
XMODIFIERS=@im=scim
GTK_IM_MODULE=scim-bridge
export XMODIFIERS GTK_IM_MODULE
-------------------------------
Note: It's unnecessary in Ubuntu 12.10!
3. if scim doesn't start automatically, you can reconfigure it with the command below.
$ im-switch -s scim_xim
4. install samba and configure smb.conf and add a samba user
$ sudo apt-get install samba -y
$ sudo smbpasswd -a user
PS: user should be a shell user.
5. install tftp and tftpd
$ sudo apt-get install xinetd tftp tftpd -y
6. install VSFTPD and configure vsftpd.conf:
$ sudo apt-get install vsftpd -y
7. install FTP client:
$ sudo apt-get install filezilla -y
8. Install flash player plugin for browser.
$ sudo apt-get install flashplugin-installer -y
9. tree
$ sudo apt-get install tree -y
10. realpath
$ sudo apt-get install realpath -y
11. dos2unix
$ sudo apt-get install dos2unix -y
12. rar - archive files with compression
$ sudo apt-get install rar -y
13. Okular PDF reader
$ sudo apt-get install okular -y
14. install mplayer:
$ sudo apt-get install mplayer mplayer-fonts -y
$ sudo apt-get install ffmpeg -y
=================================
III. Embedded Develop Environment
=================================
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. install develop environment
$ sudo apt-get install build-essential -y
3. make menuconfig may fail, so install libncurses5-dev
$ sudo apt-get install libncurses5-dev -y
4. install automake, autoconf, bison and flex
$ sudo apt-get install automake autoconf bison flex gawk -y
5. install libtool
$ sudo apt-get install libtool -y
6. need a link to expat libary, RealTek's GDBs need it.
$ sudo ln -sf /lib/i386-linux-gnu/libexpat.so.1 /lib/libexpat.so.0
7. install libssl-dev
$ sudo apt-get install libssl-dev -y
8. install uuencode
$ sudo apt-get install sharutils -y
9. install doxygen(this package is big)
$ sudo apt-get install doxygen -y
10. install minicom
$ sudo apt-get install minicom -y
11. install kermit
$ sudo apt-get install ckermit -y
12. install NFS for debug purpose(refer to NFS-ROOT)
$ sudo apt-get install nfs-common nfs-kernel-server -y
========================
tools for switch project
========================
1. lftp
$ sudo apt-get install lftp -y
2. lua-5.1
$ sudo apt-get install lua5.1 -y
3. 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
4. libreadline
$ sudo apt-get install libreadline5:i386 -y
5. install zlib
$ sudo apt-get install zlib1g-dev:i386 -y
$ sudo ln -s /usr/include/i386-linux-gnu/zconf.h /usr/include
or
$ sudo apt-get install libzip-dev -y
$ sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include
6. 安装liblzo2-dev库:
$ sudo apt-get install liblzo2-dev -y
=================================
IV. Some useful tools for develop
=================================
1. install guake terminal
$ sudo apt-get install guake -y
2. install vim editor
$ sudo apt-get install vim vim-gnome -y
Note:
a. if VIM can't remember history, you need to check if ~/.viminfo exist and make sure the file perssion and owner is current user.
b. and ~/.vim_undodir directory is needed for my own.
In addition, if use secureCRT, configure “仿真->终端” to choose Xterm,and use ANSI color, it will work like putty.
3. install ctags & cscope
$ sudo apt-get install exuberant-ctags cscope -y
4. install gtags
$ sudo apt-get install global -y
5. Linux Dreamweaver Bluefish
$ sudo apt-get install bluefish -y
6. install ssh-server and ssh-client
$ sudo apt-get install openssh-server openssh-client -y
7. install git
$ sudo apt-get install git-core gitg gitk -y
8. install 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
9. install git web
$ sudo apt-get install gitweb -y
10. git daemon,也可以Appache来做;
$ sudo apt-get install git-daemon-run -y
11. review-board
$ sudo apt-get install python-rbtools -y
or
$ sudo apt-get install python-setuptools -y
$ sudo easy_install -U RBTools
12. meld
$ sudo apt-get install meld -y
13. wireshark
$ sudo apt-get install wireshark -y
14. aircrack-ng
$ sudo apt-get install aircrack-ng -y
15. DNS and DHCP server
$ sudo apt-get install dnsmasq -y
16. shutdown local dnsmasq. comment 'dns=dnsmasq' line in
/etc/NetworkManager/NetworkManager.conf, then restart network-manager.
17. radvd & dibbler-server
$ sudo apt-get install radvd dibbler-server -y
18. iperf(windows has jperf)
$ sudo apt-get install iperf -y
19. pppoe-server
$ sudo apt-get install pppoe -y
20. snmp
$ sudo apt-get install snmp -y
21. nmap - Network exploration tool and security / port scanner
$ sudo apt-get install nmap -y
22. install VLAN
$ sudo apt-get install vlan -y
$ sudo modprobe 8021q
23. brctl
$ sudo apt-get install bridge-utils -y
24. ebtables
$ sudo apt-get install ebtables -y
25. traceroute
$ sudo apt-get install traceroute -y
=========================
some other optional tools
=========================
1. virtualbox
$ sudo apt-get install virtualbox -y
2. gimp - an image manipulation and paint program.
$ sudo apt-get install gimp -y
3. install skype chatting software
$ sudo apt-get install skype -y
4. apt-file
$ sudo apt-get install apt-file -y
5. remote desktop
$ 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. google 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