分类: LINUX
2011-03-04 09:25:25
Copyright (C) 2004 Chua Wen Kiat.
本程序为免费软件. 您可以在免费软件基金会的 条例的许可之下对此版本或后来版本随意修改和传播.
本程序的目的在于给大家带来方便, 但是我们不承担任何责任, 更不会承担买卖或者其他特殊目的责任. 具体详见 .
$ cd browse_to_your_download_folder
$ tar xvf ubuntu4.10.tar
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
$ sudo gedit /etc/apt/sources.list
...
## Uncomment the following two lines to fetch updated software from the network
# deb warty main restricted
# deb-src warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb warty universe
# deb-src warty universe
# deb http://security.ubuntu.com/ubuntu warty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu warty-security main restricted
...
## Uncomment the following two lines to fetch updated software from the network
deb / warty main restricted
deb-src / warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb / warty universe
deb-src / warty universe
deb http://security.ubuntu.com/ubuntu/ warty-security main restricted
deb-src http://security.ubuntu.com/ubuntu/ warty-security main restricted
deb / warty multiverse
deb-src / warty multiverse
deb ftp://ftp.nerim.net/debian-marillat/ stable main
deb ftp://ftp.nerim.net/debian-marillat/ unstable main
deb ftp://ftp.nerim.net/debian-marillat/ testing main
deb warty-backports main universe
$ sudo apt-get update
$ mkdir -p $HOME/backup/var/lib/
$ sudo cp -R /var/lib/apt/ $HOME/backup/var/lib/
$ mkdir -p $HOME/backup/var/cache/
$ sudo cp -R /var/cache/apt/ $HOME/backup/var/cache/
$ mkdir -p $HOME/backup/etc/apt
$ sudo cp -R /etc/apt/ $HOME/backup/etc/
$ sudo chown -R $用户$HOME/backup/
$ sudo cp -fR $HOME/backup/var/* /var/
$ sudo cp -fR $HOME/backup/etc/apt/* /etc/apt/
例子. 每天半夜自动执行升级
* * * * * 含义 分 小时 天 月 年
$ sudo gedit /root/.autoupdates
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
/usr/bin/apt-get update
/usr/bin/apt-get -y upgrade
$ sudo chmod 500 /root/.autoupdates
$ export EDITOR=gedit && sudo crontab -e
00 00 * * * /root/.autoupdates
$ sudo apt-get install acroread
$ sudo apt-get install pan
$ sudo apt-get install d4x
$ sudo apt-get install gftp
$ cd browse_to_your_download_folder
$ sudo tar jxvf Azureus_2.2.0.2_linux.GTK.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/azureus/
$ nautilus applications:///Internet
文件菜单 -> 创建起动器
Basic Tab ->
Name: Azureus
Command: /opt/azureus/azureus
Icon: /opt/azureus/Azureus.png
$ cd browse_to_your_download_folder
$ sudo sh LimeWireLinux.bin
Choose Install Folder Tab ->
Where Would You Like to Install?
/opt/LimeWire
$ nautilus applications:///Internet
文件菜单 -> 创建起动器
Basic Tab ->
Name: LimeWire
Command: /opt/LimeWire/LimeWire
$ sudo apt-get install amule
$ cd browse_to_your_download_folder
$ sudo tar jxvf skype_staticQT-1.0.0.1.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/skype_staticQT-1.0.0.1/
$ nautilus applications:///Internet
文件菜单 -> 创建起动器
Basic Tab ->
Name: Skype
Command: /opt/skype_staticQT-1.0.0.1/skype
Icon: /opt/skype_staticQT-1.0.0.1/icons/skype_48_32.png
$ sudo apt-get install libgtk1.2
$ cd browse_to_your_download_folder
$ sudo dpkg -i linpopup_1.2.0-7_i386.deb
$ nautilus applications:///Accessories
文件菜单 -> 创建起动器
Basic Tab ->
Name: LinPopUp
Command: linpopup
Icon: /usr/share/pixmaps/linpopup.xpm
$ sudo apt-get install xfonts-intl-arabic
$ sudo apt-get install xfonts-intl-asian
$ sudo apt-get install xfonts-intl-chinese
$ sudo apt-get install xfonts-intl-chinese-big
$ sudo apt-get install xfonts-intl-european
$ sudo apt-get install xfonts-intl-japanese
$ sudo apt-get install xfonts-intl-japanese-big
$ sudo apt-get install xfonts-intl-phonetic
$ sudo apt-get install msttcorefonts
$ sudo apt-get install xmms
$ cd browse_to_your_download_folder
$ chmod +x realplay-10.0.2.608-linux-2.2-libc6-gcc32-i586.bin
$ sudo ./realplay-10.0.2.608-linux-2.2-libc6-gcc32-i586.bin
Enter the complete path to the directory where you want
RealPlayer to be installed. You must specify the full
pathname of the directory and have write privileges to
the chosen directory.
Directory: [/home/chua/RealPlayer]: /opt/RealPlayer
You have selected the following RealPlayer configuration:
Destination: /opt/RealPlayer
Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]: F
Copying RealPlayer files...configure system-wide symbolic links? [Y/n]: Y
enter the prefix for symbolic links [/usr]: /usr
$ sudo apt-get install xine-ui
$ sudo apt-get install mozilla-mplayer
$ sudo apt-get install mplayer-fonts
$ sudo apt-get install totem-xine
$ sudo apt-get install mozplugger
$ sudo cp /etc/mozpluggerrc /etc/mozpluggerrc_backup
$ sudo gedit /etc/mozpluggerrc
...
application/x-mplayer2: wmv,asf,mov: Windows Media
video/x-ms-asf: asf,asx,wma,wax,wmv,wvx: Windows Media
video/x-ms-wmv: wmv: Windows Media
stream
noisy ignore_errors: mplayer -really-quiet -nojoystick -nofs -wid
$window -vo xv,x11 -ao esd,alsa9,oss,arts,null -zoom -osdlevel 0 "$file"
...
stream noisy ignore_errors: totem "$file"
$ rm ~/.mozilla/pluginreg.dat
$ sudo apt-get install audacity
$ nautilus applications:///Multimedia
文件菜单 -> 创建起动器
Basic Tab ->
Name: Audacity
Command: audacity
Icon: /usr/share/audacity/audacity.xpm
$ cd browse_to_your_download_folder
$ sh jre-1_5_0_01-linux-i586.bin
$ sudo mkdir /usr/java
$ sudo mv jre1.5.0_01/ /usr/java/
$ sudo chown -R root:root /usr/java/jre1.5.0_01/
$ sudo ln -s /usr/java/jre1.5.0_01/bin/java /usr/bin/java
$ sudo ln -s /usr/java/jre1.5.0_01/bin/java_vm /usr/bin/java_vm
$ sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
$ sudo gedit /etc/bash.bashrc
JAVA_HOME=/usr/java/jre1.5.0_01
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
$ java -version
$ sudo ln -s /usr/java/jre1.5.0_01/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
$ sudo ln -s /usr/java/jre1.5.0_01/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/
$ sudo apt-get install libstdc++2.10-glibc2.2
$ cd browse_to_your_download_folder
$ sudo tar jxvf nvu-0.80-pc-linux2.4.23-gnu.tar.bz2 -C /opt/
$ sudo chown -R root:root /opt/nvu-0.80/
$ sudo /opt/nvu-0.80/nvu
$ nautilus applications:///Office
文件菜单 -> 创建起动器
Basic Tab ->
Name: Nvu
Command: /opt/nvu-0.80/nvu
Icon: /opt/nvu-0.80/icons/mozicon50.xpm
$ sudo apt-get install planner
$ sudo apt-get install scribus
$ sudo apt-get install qtparted
$ nautilus applications:///System
Remove the existing QTParted Icon
文件菜单 -> 创建起动器
Basic Tab ->
Name: QTParted
Command: gksudo qtparted
Icon: /usr/share/pixmaps/qtparted.xpm
$ sudo apt-get install firestarter
$ nautilus applications:///Internet
Remove the existing Firestarter Firewall Tool Icon
$ nautilus applications:///System
Remove the existing Firestarter Firewall Tool Icon
文件菜单 -> 创建起动器
Basic Tab ->
Name: Firestarter Firewall Tool
Command: gksudo /usr/sbin/firestarter
Icon: /usr/share/pixmaps/firestarter.png
$ sudo fdisk -l
$ df -T -h
$ mount
$ sudo ln -sf /dev/cdrom /dev/dvd
$ sudo cp /etc/udev/udev.rules /etc/udev/udev.rules_backup
$ sudo gedit /etc/udev/udev.rules
...
BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2}"
...
BUS="ide", KERNEL="hd[a-z]", SYMLINK="cdrom dvd"
例子. 假设 /media/cdrom0/ 是 CD/DVD-ROM 的位置
$ sudo mount /media/cdrom0/ -o unhide
$ sudo umount /media/cdrom0/
例子. 假设 /media/cdrom0/ 是 CD/DVD-ROM 的位置
$ sudo umount /media/cdrom0/ -l
$ sudo apt-get install nvidia-glx
$ sudo apt-get install nvidia-settings
$ sudo nvidia-glx-config enable
$ nautilus applications:///System
文件菜单 -> 创建起动器
Basic Tab ->
Name: NVIDIA Settings
Command: nvidia-settings
$ sudo cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4_backup
$ sudo gedit /etc/X11/XF86Config-4
...
Section "Device"
Identifier "NVIDIA Corporation NV34M [GeForce FX Go 5200]"
Driver "nvidia"
BusID "PCI:1:0:0"
...
Option "NoLogo"
$ sudo cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4_backup
$ sudo gedit /etc/X11/XF86Config-4
...
Section "Device"
Identifier "NVIDIA Corporation NV34M [GeForce FX Go 5200]"
Driver "nvidia"
BusID "PCI:1:0:0"
...
Option "RenderAccel" "true"
Option "NvAGP" "1"
$ sudo ln -sf /dev/ttyUSB1 /dev/pilot
$ nautilus burn:///
Drag files into window
文件菜单 -> Write to Disc... -> Write
例子. 假设 /dev/cdrom 是 CD/DVD-ROM 的位置
$ dd if=/dev/cdrom of=file.iso bs=1024
例子. 假设 Folder/ 是文件夹的位置
$ mkisofs -RJ -o file.iso Folder/
Right click on 映象文件(ISO) -> Write to Disc... -> Write
$ sudo mkdir /media/iso
$ sudo modprobe loop
$ sudo mount file.iso /media/iso/ -t iso9660 -o loop
$ sudo umount /media/iso/
例子. 假设 /dev/cdrom 是 CD/DVD-ROM 的位置
$ sudo umount /dev/cdrom
$ cdrecord dev=/dev/cdrom blank=all
/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed for CD/DVD Burner)
/ -> apps -> nautilus-cd-burner -> burnproof (Checked)
/ -> apps -> nautilus-cd-burner -> overburn (Checked)
$ md5sum file.iso > file.iso.md5
例子. file.iso 和 file.iso.md5 必需在同样的目录
$ md5sum -c file.iso.md5
Connections Tab -> Add/Properties/Delete/Activate/Deactivate network connections
DNS Tab -> DNS Servers -> Add/Delete DNS servers
General Tab -> Host Settings -> Hostname: Fill in the system name
General Tab -> Windows Networking ->
Enable Windows networking (Checked)
Descriptions: Fill in the 系统 descriptions
General Tab -> Windows Networking ->
Enable Windows networking (Checked)
Domain / Workgroup: Fill in the System Domain/Workgroup
例子. 网络电脑的 IP: 192.168.0.1
共享的文件夹: linux
smb://192.168.0.1/linux
例子. 网络电脑的 IP: 192.168.0.1
网络电脑的帐号: myusername
网络电脑的口令: mypassword
共享目录的名称: linux
本地 mount 目录: /media/sharename
$ sudo mkdir /media/sharename
$ sudo mount //192.168.0.1/linux /media/sharename/ -t smbfs -o username=myusername,password=mypassword
$ sudo umount /media/sharename/
例子. 网络电脑的 IP: 192.168.0.1
网络电脑的 Username: myusername
网络电脑的 Password: mypassword
共享目录的 name: linux
本地 mount 目录: /media/sharename
$ sudo mkdir /media/sharename
$ sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
$ sudo umount /media/sharename/
例子. 网络电脑的 IP: 192.168.0.1
网络电脑的 Username: myusername
网络电脑的 Password: mypassword
共享目录的 name: linux
本地 mount 目录: /media/sharename
$ sudo mkdir /media/sharename
$ sudo gedit /root/.smbcredentials
username=myusername
password=mypassword
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials 0 0
例子. 网络电脑的 IP: 192.168.0.1
网络电脑的 Username: myusername
网络电脑的 Password: mypassword
共享目录的 name: linux
本地 mount 目录: /media/sharename
$ sudo mkdir /media/sharename
$ sudo gedit /root/.smbcredentials
username=myusername
password=mypassword
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
//192.168.0.1/linux /media/sharename smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0
Q: 关于我的Ubuntu的安全问题, 我需要知道一些什么基本问题?
$ grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
## password ['--md5'] passwd
# If used in the first section of a menu file,禁止 all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# 例子. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
$ rm $HOME/.bash_history
$ touch $HOME/.bash_history
$ chmod 000 $HOME/.bash_history
$ sudo cp /etc/inittab /etc/inittab_backup
$ sudo gedit /etc/inittab
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
$ sudo telinit q
$ sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
$ sudo gedit /etc/bash.bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
Ubuntu, kernel 2.6.8.1-4-386
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash
grub edit> kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash rw init=/bin/bash
root@(none):/ #
[!!] Fdisk disks
~ # mkdir /ubuntu
~ # fdisk -l /dev/discs/disc0/disc
~ # mount
~ # chroot /ubuntu/
sh-2.05b#
# passwd root
# passwd your_system_main_username
$ grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
例子. 假设 /dev/hda1 是 /boot 分区的地址
sh-2.05b# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
例子. 假设 /dev/hda1 是 Windows 分区的地址
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
title Windows 95/98/NT/2000
root (hd0,0)
makeactive
chainloader +1
savedefault
例子. 假设 /dev/hda1 是 Windows 分区 (NTFS)
本地 mount 目录: /media/windows
$ sudo mkdir /media/windows
$ sudo mount /dev/hda1 /media/windows -t ntfs -o umask=0222
$ sudo umount /media/windows
例子. 假设 /dev/hda1 是 Windows 分区 (FAT)
本地 mount 目录: /media/windows
$ sudo mkdir /media/windows
$ sudo mount /dev/hda1 /media/window -t vfat -o umask=000
$ sudo umount /media/windows
例子. 假设 /dev/hda1 是 Windows 分区 (NTFS)
本地 mount 目录: /media/windows
$ sudo mkdir /media/windows
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
/dev/hda1 /media/windows ntfs umask=0222 0 0
例子. 假设 /dev/hda1 是 Windows 分区 (FAT)
本地 mount 目录: /media/windows
$ sudo mkdir /media/windows
$ sudo cp /etc/fstab /etc/fstab_backup
$ sudo gedit /etc/fstab
/dev/hda1 /media/windows vfat umask=000 0 0
$ sudo passwd root
$ sudo passwd -l root
Security Tab -> Options ->允许 root to login with GDM (Checked)
$ sudo -s -H (specify your 用户口令)
or
$ su (specify your root 用户口令)
Users Tab -> Add User.../Properties/Delete users
Groups Tab -> Add Group.../Properties/Delete users
General Tab -> Automatic Login ->
Login a 用户automatically on first bootup (Checked)
Automatic login username: Select the username to automatic login
$ export EDITOR=gedit && sudo visudo
your_system_username ALL=(ALL) ALL
$ sudo -K
$ export EDITOR=gedit && sudo visudo
...
your_system_username ALL=(ALL) ALL
...
your_system_username ALL=(ALL) NOPASSWD: ALL
$ nautilus applications:///
$ sudo nautilus applications-all-users:///
在文件上按右键 -> 属性
Permissions Tab ->读取/写入/执行 (为 Owner/Group/Others 勾选权限)
$ sudo chown -R your_system_username /location_of_your_file_or_folder
$ sudo chgrp -R your_system_groupname /location_of_your_file_or_folder
$ sudo smbpasswd -a your_system_username
$ sudo gedit /etc/samba/smbusers
your_system_username = "your network username"
$ sudo smbpasswd -a your_system_username
$ sudo smbpasswd -x your_system_username
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = yes
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/group
$ sudo chmod 777 /home/group/
$ sudo chmod +t /home/group/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = your_system_username1 your_system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/group
$ sudo chmod 777 /home/group/
$ sudo chmod +t /home/group/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = your_system_username1 your_system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = user
...
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no
...
username map = /etc/samba/smbusers
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public
$ sudo chmod 777 /home/public/
$ sudo chmod +t /home/public/
$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
$ sudo gedit /etc/samba/smb.conf
...
; security = user
...
security = share
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
$ sudo testparm
$ sudo /etc/init.d/samba restart
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务
阅读 怎样为远控管理服务安装SSH服务器?
远程 Ubuntu 计算机: 192.168.0.1
$ ssh username@192.168.0.1
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
远程 Ubuntu 计算机: 192.168.0.1
远程 文件/目录 地址: /home/username/remotefile.txt
本机计算机保存地址: . (当前目录)
$ scp -r username@192.168.0.1:/home/username/remotefile.txt .
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
本地文件/目录地址: localfile.txt
远程 Ubuntu 计算机: 192.168.0.1
远程 Ubuntu 计算机保存地址: /home/username/
$ scp -r localfile.txt username@192.168.0.1:/home/username/
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
远程 Ubuntu 计算机: 192.168.0.1
远程 文件/目录 地址: /home/username/remotefile.txt
本机计算机保存地址: . (当前目录)
$ rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
本地文件/目录地址: localfile.txt
远程 Ubuntu 计算机: 192.168.0.1
远程 Ubuntu 计算机保存地址: /home/username/
$ rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
例子. 假设远程 Ubuntu 计算机已经安装了 SSH Server 服务(scp)?
阅读 怎样为远控管理服务安装SSH服务器?
例子. 假设 "eth0" 是网卡
IP Address Range: 192.168.0.100 to 192.168.0.200
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5
Domains: tm.net.my
Gateway Address: 192.168.0.1
$ sudo apt-get install dhcp3-server
$ sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
$ sudo gedit /etc/default/dhcp3-server
...
INTERFACES=""
INTERFACES="eth0"
$ sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
$ sudo gedit /etc/dhcp3/dhcpd.conf
...
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
...
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600;
#max-lease-time 7200;
...
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
...
# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 202.188.0.133, 202.188.1.5;
option domain-name "tm.net.my";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
$ sudo /etc/init.d/dhcp3-server restart
$ sudo apt-get install mysql-server
$ sudo /usr/bin/mysqladmin -u root password your_db_user_password
$ sudo apt-get install php4
$ sudo apt-get install libapache2-mod-php4
$ sudo /etc/init.d/apache2 force-reload
$ sudo gedit /var/www/testphp.php
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get install php4-mysql
$ sudo /etc/init.d/apache2 restart
编辑 菜单 -> 重新载入软件包信息
编辑 菜单 -> 标记全部软件包以便升级... -> 默认升级
编辑 菜单 -> 实施标记的更新
编辑 菜单 -> 搜索... (在搜索对话框指定包名)
选择的包将被安装
软件包 菜单 -> 标记以便安装
编辑 菜单 -> 实施标记的更新
选择的包将被删除
软件包 菜单 -> 标记以便删除
编辑 菜单 -> 实施标记的更新
Address Bar -> about:config
Filter: -> network.dns.disableIPv6 -> Change the Value to true (Double click)
Address Bar -> about:config
Filter: -> accessibility.typeaheadfind.enablesound -> Change the Value to false (Double click)
/ -> apps -> nautilus -> preferences -> always_use_browser (Checked)
编辑 菜单 -> 首选项
视图 页面 -> 默认视图 -> 显示隐藏和备份文件 (勾选)
/ -> apps -> nautilus -> desktop ->
computer_icon_visible (Checked)
home_icon_visible (Checked)
trash_icon_visible (Checked)
$ cd browse_to_your_download_folder
$ sudo tar jxvf gnome-clipboard-daemon-1.0.bin.tar.bz2 -C /usr/bin/
$ sudo chown root:root /usr/bin/gnome-clipboard-daemon
$ sudo chmod 755 /usr/bin/gnome-clipboard-daemon
$ sudo /usr/bin/gnome-clipboard-daemon &
启动程序 页面 -> 添加 ->
启动命令: /usr/bin/gnome-clipboard-daemon
顺序: 80
启动程序 页面 -> 添加/编辑/删除 程序
Right click on file -> Properties
Open With Tab -> Add
Select the added open with program (Checked)
编辑 菜单 -> 当前配置文件...
常规 页面 -> 常规 -> 终端响铃 (不勾选)
$ sudo mount -a
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
hiddenmenu
...
#hiddenmenu
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
timeout 3
...
timeout X_seconds
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
default 0
...
default X_sequence
$ sudo chmod -x /etc/init.d/service_name
$ sudo chmod +x /etc/init.d/service_name
$ sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
$ sudo gedit /etc/apt/sources.list
...
## Uncomment the following two lines to fetch updated software from the network
# deb warty main restricted
# deb-src warty main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb warty universe
# deb-src warty universe
# deb http://security.ubuntu.com/ubuntu warty-security main restricted
# deb-src http://security.ubuntu.com/ubuntu warty-security main restricted
...
## Uncomment the following two lines to fetch updated software from the network
deb / hoary main restricted
deb-src / hoary main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb / hoary universe
deb-src / hoary universe
deb http://security.ubuntu.com/ubuntu/ hoary-security main restricted
deb-src http://security.ubuntu.com/ubuntu/ hoary-security main restricted
$ sudo apt-get update
$ sudo apt-get dist-upgrade
service_name = networking
service_name = ntpdate
$ sudo cp /etc/hotplug/blacklist /etc/hotplug/blacklist_backup
$ sudo gedit /etc/hotplug/blacklist
pciehp
shpchp
hw_random
$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
$ sudo gedit /boot/grub/menu.lst
...
title Ubuntu, kernel 2.6.8.1-4-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash
...
title Ubuntu, kernel 2.6.8.1-4-386
root (hd0,0)
kernel /boot/vmlinuz-2.6.8.1-4-386 root=/dev/hda1 ro quiet splash acpi=off apm=off
$ sudo cp /etc/modules /etc/modules_backup
$ sudo gedit /etc/modules
apm
$ gst-register-0.8
$ sudo cp /etc/default/rcS /etc/default/rcS_backup
$ sudo gedit /etc/default/rcS
...
UTC=yes
...
UTC=no
设置当前日期和时间
$ sudo /etc/init.d/hwclock.sh restart
$ sudo rm -fr $HOME/.Trash/
This guide was made possible thanks to these people, for which would like to express my greatest appreciation. Please accept my apologies in advance if I have missed out your Web site/name
People from these Web sites
People from these forums
People from these IRC channel
People that contributed in this guide (sorted by name/nick)
This How-to applies to: 4.10