Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1171823
  • 博文数量: 115
  • 博客积分: 950
  • 博客等级: 准尉
  • 技术积分: 1734
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-08 20:46
文章分类

全部博文(115)

文章存档

2015年(5)

2014年(28)

2013年(42)

2012年(40)

分类: LINUX

2014-05-16 09:15:37

1.  Modify the /etc/sudoers file to remove the password required for "sudo" command

点击(此处)折叠或打开

  1. [sudo] password for martin:
  2. Enter new UNIX password:
  3. Retype new UNIX password:
  4. passwd: password updated successfully
  5. martin@martin-pc:~$

  6. to create the password for root user

  7. martin@martin-pc:~$
  8. martin@martin-pc:~$ su root
  9. Password:
  10. root@martin-pc:/home/martin#

  11. using the root user to modify the /etc/sudoers

  12. root@martin-pc:/home/martin#
  13. root@martin-pc:/home/martin# vi /etc/sudoers
  14. root@martin-pc:/home/martin#

  15. Add the following settings below the "sudo ALL=..."

  16. %martin ALL=(ALL:ALL)NOPASSWD:NOPASSWD:ALL

Then the /etc/sudoers file is like:

点击(此处)折叠或打开

  1. #
  2. # This file MUST be edited with the 'visudo' command as root.
  3. #
  4. # Please consider adding local content in /etc/sudoers.d/ instead of
  5. # directly modifying this file.
  6. #
  7. # See the man page for details on how to write a sudoers file.
  8. #
  9. Defaults env_reset
  10. Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

  11. # Host alias specification

  12. # User alias specification

  13. # Cmnd alias specification

  14. # User privilege specification
  15. root ALL=(ALL:ALL) ALL

  16. # Members of the admin group may gain root privileges
  17. %admin ALL=(ALL) ALL
  18. #%admin ALL=(ALL)NOPASSWD: NOPASSWD: ALL


  19. # Allow members of group sudo to execute any command
  20. %sudo ALL=(ALL:ALL) ALL

  21. %martin ALL=(ALL:ALL)NOPASSWD:NOPASSWD:ALL
  22. # See sudoers(5) for more information on "#include" directives:

  23. #includedir /etc/sudoers.d

  24. ~



2. install the vim


点击(此处)折叠或打开

  1. martin@martin-pc:~$ sudo apt-get install vim
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. ....

3. Modify the /etc/fstab to mount the disk automatically


点击(此处)折叠或打开

  1. # /etc/fstab: static file system information.
  2. #
  3. # Use 'blkid' to print the universally unique identifier for a
  4. # device; this may be used with UUID= as a more robust way to name devices
  5. # that works even if disks are added and removed. See fstab(5).
  6. #
  7. # <file system> <mount point> <type> <options> <dump> <pass>
  8. proc /proc proc nodev,noexec,nosuid 0 0
  9. # / was on /dev/sda7 during installation
  10. UUID=d0131bb0-1bc5-40ca-a244-be745b2a2fee / ext4 errors=remount-ro 0 1

  11. UUID=72e1aa71-eae6-412b-9beb-6538e2eddc83 /home ext4 errors=remount-ro 0 1

  12. UUID=1d2895cd-190c-9ce3-988e-57299f2f9937 /home/martin/linux ext4 errors=remount-ro 0 1

  13. UUID=DCA0CA49A0CA2A3A /home/martin/linux/vm_ubuntu ntfs errors=remount-ro 0 1

  14. # swap was on /dev/sda5 during installation
  15. UUID=69de5ab7-57c3-44da-9135-dcdbe03990df none swap sw 0 0

4. Install git

点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install git
  2. Reading package lists... Done
  3. Building dependency tree

5. Install Skype

点击(此处)折叠或打开

  1. [martin@REV]$ sudo add-apt-repository "deb $(lsb_release -sc) partner"
  2. [martin@REV]$ sudo apt-get update && sudo apt-get install skype
  3. Ign http://cn.archive.ubuntu.com precise InRelease
  4. Ign http://cn.archive.ubuntu.com precise-updates InRelease

Ref:   

6. Install Wireshark

点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install wireshark
  2. Reading package lists... Done
  3. Building dependency tree
  4. ...
  5. Processing triggers for libc-bin ...
  6. ldconfig deferred processing now taking place
  7. [martin@~]$
  8. [martin@~]$


  9. Add Right for matin to caputer using wireshark

  10. [martin@~]$ sudo groupadd wireshark
  11. [martin@~]$ sudo vim /etc/group
  12. [martin@~]$ sudo chgrp wireshark /usr/bin/dumpcap
  13. [martin@~]$ sudo chmod 4755 /usr/bin/dumpcap
  14. [martin@~]$ sudo gpasswd -a martin wireshark
  15. Adding user martin to group wireshark
  16. [martin@~]$

Ref:
ubuntu wireshark 普通用户抓包
cap/pcap类文件无法用wireshark打开

7. Install minicom


点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install minicom
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following extra packages will
  6. ...
  7. [martin@~]$ sudo minicom -s
  8. Serial port setup:
  9.     +-----------------------------------------------------------------------+
  10.     | A - Serial Device : /dev/ttyS0 |
  11.     | B - Lockfile Location : /var/lock |
  12.     | C - Callin Program : |
  13.     | D - Callout Program : |
  14.     | E - Bps/Par/Bits : 115200 8N1 |
  15.     | F - Hardware Flow Control : No |
  16.     | G - Software Flow Control : No |
  17.     | |
  18.     | Change which setting? |
  19.     +-----------------------------------------------------------------------+
  20. Modem and dialing
  21. Remove A,B and K
  22.  
  23. Save as dl_s0. for USB Console, using "/dev/ttyUSB0" for the Serial Device, and save as dl_usb0
  24.  
  25. Using "sudo minicom -w -c on dfl_s0" to start the minicom

Ref:   http://blog.chinaunix.net/uid-26527046-id-3335772.html


8.  Install SunPinyin

点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install ibus-table-wubi ibus-sunpinyin
  2. [martin@~]$
  3. [martin@~]$

Ref:
ubuntu之输入法介绍与设置
ubuntu ibus 输入法之skype不能输入中文


9. Install cscope and Taglist

点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install cscope
  2. Reading package lists... Done
  3. Building dependency tree

Ref:
Ubuntu下创建vim+Taglist+cscope+ctags组合

10. Install vinagre for Remote Desktop Viewer

点击(此处)折叠或打开

  1. [martin@~]$ sudo apt-get install vinagre
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done

11. Install Adobe Flash Player

Download the Flash Player from


点击(此处)折叠或打开

  1. [martin@Downloads]$ tar -xvzf install_flash_player_11_linux.i386.tar.gz
  2. libflashplayer.so
  3. readme.txt
  4. usr/
  5. usr/bin/
  6. usr/bin/flash-player-properties
  7. usr/share/
  8. usr/share/kde4/
  9. usr/share/kde4/services/
  10. usr/share/kde4/services/kcm_adobe_flash_player.desktop
  11. usr/share/applications/
  12. usr/share/applications/flash-player-properties.desktop
  13. usr/share/icons/
  14. usr/share/icons/hicolor/
  15. usr/share/icons/hicolor/22x22/
  16. usr/share/icons/hicolor/22x22/apps/
  17. usr/share/icons/hicolor/22x22/apps/flash-player-properties.png
  18. usr/share/icons/hicolor/48x48/
  19. usr/share/icons/hicolor/48x48/apps/
  20. usr/share/icons/hicolor/48x48/apps/flash-player-properties.png
  21. usr/share/icons/hicolor/24x24/
  22. usr/share/icons/hicolor/24x24/apps/
  23. usr/share/icons/hicolor/24x24/apps/flash-player-properties.png
  24. usr/share/icons/hicolor/32x32/
  25. usr/share/icons/hicolor/32x32/apps/
  26. usr/share/icons/hicolor/32x32/apps/flash-player-properties.png
  27. usr/share/icons/hicolor/16x16/
  28. usr/share/icons/hicolor/16x16/apps/
  29. usr/share/icons/hicolor/16x16/apps/flash-player-properties.png
  30. usr/share/pixmaps/
  31. usr/share/pixmaps/flash-player-properties.png
  32. usr/lib/
  33. usr/lib/kde4/
  34. usr/lib/kde4/kcm_adobe_flash_player.so
  35. [martin@Downloads]$
  36. [martin@Downloads]$ sudo cp -r usr/lib/ /usr/
  37. [martin@Downloads]$ sudo cp -r usr/bin/ /usr/
  38. [martin@Downloads]$ sudo cp -r usr/share/ /usr/
  39. [martin@Downloads]$ sudo cp libflashplayer.so /usr/lib/mozilla/plugins/
  40. [martin@Downloads]$

Ref: 


12. Install tftp, tftpd

点击(此处)折叠或打开

  1. [martin@maple]$ sudo apt-get install tftp
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. ...
  6. [martin@maple]$
  7. [martin@maple]$ sudo apt-get install tftpd-hpa
  8. Reading package lists... Done
  9. Building dependency tree
  10. Reading state information... Done
  11. ...
  12. [martin@maple]$
  13. [martin@maple]$ sudo vim /etc/default/tftpd-hpa
  14.   1 # /etc/default/tftpd-hpa
  15.   2
  16.   3 TFTP_USERNAME="tftp"
  17.   4 TFTP_DIRECTORY="/tftpboot"
  18.   5 TFTP_ADDRESS="0.0.0.0:69"
  19.   6 TFTP_OPTIONS="--secure"


13. Install Java JDK

如果使用OpenJDK,只需要如下步骤

点击(此处)折叠或打开

  1. [martin@linux]$ sudo apt-get install openjdk-7-jre
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following extra packages will be installed:
  6.   ca-certificates-java fonts-dejavu-extra icedtea-7-jre-jamvm java-common libatk-wrapper-java libatk-wrapper-java-jni libbonobo2-0
  7.   libbonobo2-common libgconf2-4 libgif4 libgnome2-0 libgnome2-bin libgnome2-common libgnomevfs2-0 libgnomevfs2-common libidl-common libidl0
  8.   liborbit-2-0 liborbit2 openjdk-7-jre-headless tzdata tzdata-java
  9. Suggested packages:
  10. Processing triggers for libc-bin (2.19-0ubuntu6) ...
  11. Processing triggers for ca-certificates (20130906ubuntu2) ...
  12. Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
  13. Running hooks in /etc/ca-certificates/update.d....
  14. done.
  15. done.
  16. [martin@linux]$
  17. [martin@Cable Modem]$ sudo apt-get install icedtea-7-plugin
  18. Reading package lists... Done
  19. Building dependency tree
  20. Reading state information... Done

如果是安装 Sun JDK,则需要
  1. 下载 JDK软件。 Ref: 
  2. 解压该 tar.gz
  3. 安装


点击(此处)折叠或打开

  1. [martin@Cable Modem]$ sudo cp -afr jdk1.7.0_45/ /usr/lib/jvm/
  2. [martin@Cable Modem]$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_45/bin/javac 1
  3. update-alternatives: using /usr/lib/jvm/jdk1.7.0_45/bin/javac to provide /usr/bin/javac (javac) in auto mode
  4. [martin@Cable Modem]$
  5. [martin@Cable Modem]$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_45/bin/java 1
  6. [martin@Cable Modem]$ sudo update-alternatives --config javac
  7. There is only one alternative in link group javac (providing /usr/bin/javac): /usr/lib/jvm/jdk1.7.0_45/bin/javac
  8. Nothing to configure.
  9. [martin@Cable Modem]$ sudo update-alternatives --config java
  10. There are 2 choices for the alternative java (providing /usr/bin/java).

  11.   Selection Path Priority Status
  12. ------------------------------------------------------------
  13. * 0 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1071 auto mode
  14.   1 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1071 manual mode
  15.   2 /usr/lib/jvm/jdk1.7.0_45/bin/java 1 manual mode

  16. Press enter to keep the current choice[*], or type selection number: 2
  17. update-alternatives: using /usr/lib/jvm/jdk1.7.0_45/bin/java to provide /usr/bin/java (java) in manual mode
  18. [martin@Cable Modem]$
  19. [martin@Cable Modem]$
  20. [martin@Cable Modem]$ java -version
  21. java version "1.7.0_45"
  22. Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
  23. Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode)
  24. [martin@Cable Modem]$
或者使用更加方便的方式

点击(此处)折叠或打开

  1. sudo add-apt-repository ppa:webupd8team/java
  2. sudo apt-get update
  3. sudo apt-get install oracle-java7-installer


Ref:   How to Install Java Runtime In Ubuntu 12.04




14. Install Clementine


点击(此处)折叠或打开

  1. [martin@linux]$ sudo add-apt-repository ppa:me-davidsansome/clementine
  2.  
  3.  More info: https://launchpad.net/~me-davidsansome/+archive/clementine
  4. Press [ENTER] to continue or ctrl-c to cancel adding it

  5. gpg: keyring `/tmp/tmpemb6at3y/secring.gpg' created
  6. gpg: keyring `/tmp/tmpemb6at3y/pubring.gpg' created
  7. gpg: requesting key 044A3B98 from hkp server keyserver.ubuntu.com
  8. gpg: /tmp/tmpemb6at3y/trustdb.gpg: trustdb created
  9. gpg: key 044A3B98: public key "Launchpad Clementine Stable" imported
  10. gpg: Total number processed: 1
  11. gpg: imported: 1 (RSA: 1)
  12. OK
  13. [martin@linux]$ sudo apt-get update
  14. Ign http://cn.archive.ubuntu.com trusty InRelease
  15. Fetched 508 kB in 54s (9,301 B/s)
  16. Reading package lists... Done
  17. [martin@linux]$ sudo apt-get install clementine
  18. Reading package lists... Done
  19. Building dependency tree
  20. Reading state information... Done
  21. The following extra packages will be installed
如上所述,clementine可以正常运行,但是对于 Wma格式的音乐,会提示错误 “Your GStreamer installation is missing a plugin”的错误,需要安装如下的软件包后重启 Clementine

点击(此处)折叠或打开

  1. [martin@maple_linux]$ sudo apt-add-repository ppa:mc3man/trusty-media
  2. [martin@maple_linux]$ sudo apt-get update
  3. Ign http://ppa.launchpad.net trusty InRelease
  4. [martin@maple_linux]$ sudo apt-get install gstreamer0.10-ffmpeg
  5. Reading package lists... Done
  6. Building dependency tree



15, Install WPS

点击(此处)折叠或打开

  1. [martin@Downloads]$ sudo dpkg -i wps-office_8.1.0.3724~b1p2_i386.deb
  2. Selecting previously unselected package wps-office.
  3. (Reading database ... 171118 files and directories currently installed.)
  4. Preparing to unpack wps-office_8.1.0.3724~b1p2_i386.deb ...
  5. Unpacking wps-office (8.1.0.3724~b1p2) ...
  6. Setting up wps-office (8.1.0.3724~b1p2) ...
  7.         Processing triggers for hicolor-icon-theme (0.13-1) ...
  8. Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
  9. Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
  10. Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
  11. Rebuilding /usr/share/applications/bamf-2.index...
  12. Processing triggers for mime-support (3.54ubuntu1) ...
  13. Processing triggers for fontconfig (2.11.0-0ubuntu4) ...
  14. Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
  15. [martin@Downloads]$
  16. [martin@Downloads]$
  17. [martin@Downloads]$
  18. [martin@Downloads]$ sudo dpkg -i symbol-fonts_1.1_all\ .deb
  19. Selecting previously unselected package symbol-fonts.
  20. (Reading database ... 172086 files and directories currently installed.)
  21. Preparing to unpack symbol-fonts_1.1_all .deb ...
  22. Unpacking symbol-fonts (1.1) ...
  23. Setting up symbol-fonts (1.1) ...

Ref:  Ubuntu 安装WPS


16. Install kchmviewer

点击(此处)折叠或打开

  1. [martin@Cable Modem]$ sudo apt-get install kchmviewer
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. The following extra packages will be installed:




阅读(892) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~