Chinaunix首页 | 论坛 | 博客
  • 博客访问: 293658
  • 博文数量: 69
  • 博客积分: 3370
  • 博客等级: 中校
  • 技术积分: 1035
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-25 10:52
文章分类

全部博文(69)

文章存档

2019年(1)

2009年(7)

2008年(61)

我的朋友

分类: LINUX

2009-06-21 20:11:51

Ubuntu8.10 网络基本设置

Ubuntu8.10 基本应用设置

 
Environment :

Hardware:i686
Memory:2G RAM
NIC:
rl0 —> for interenet
em0 —> for intranet
OS:
Ubuntu8.10-intrepid

Ubuntu8.10 网络基本设置

 

//配置IP

sudo vi /etc/network/interfaces  

auto l1
iface l1 inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.220   //这里填IP地址
netmask 255.255.255.0   //这里填掩码
gateway 192.168.0.3     //这里填网关

 

//配置DNS
sudo vi /etc/resolv.conf
改为
domain domain
search domain
nameserver 202.114.0.242
nameserver 202.114.20.131


//重启网络服务
/etc/init.d/networking restart

// 解决网络连接被重置的问题(新浪博客比较明显):
   ubuntu默认的网络连接mtu为576,我们所在网络环境通才情况下mtu是1500,因此做如下修改:
   i.网络连接管理器里“编辑连接”设定MTU值
   ii./etc/network/interfaces加上这样一句:
      post -up /sbin/ifconfig mtu 1500

 

//关闭IPV6:
sudo gedit /etc/modprobe.d/aliases
然后修改这一行:
alias net-pf-10 ipv6
为:
alias net-pf-10 off #ipv6

 

sudo vi /etc/modprobe.d/bad_list

最后添加

alias net-pf-10 off



//注释掉 hosts 文件中所有与 IPV6 的行:

sudo vi /etc/hosts
 

 

//安装ssh

apt-get install openssh-server openssh-client

 

停止/启动/重启ssh:

/etc/init.d/ssh stop/start/restart

 

//配置ssh 密码认证

sudo vi /etc/ssh/sshd

#RSAAuthentication yes
#PubkeyAuthentication yes  添加#注销

PasswordAuthentication yes 减去#生效

sudo ps -aux |grep sshd

sudo Kill -HUP sshd_pid

sudo ssh

 

 

Ubuntu8.10 基本应用设置

 

// 如何让终端不显示完整路径的解决办法:

编辑用户主目录的.bashrc文件,eg:(~/.bashrc),修改其PS1参数中的\w为\w,如下例子
if [ "$color_prompt" = yes ]; then
   PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
else
   PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ '
fi

 

//KDM模式切换成GDM模式:

移除原先启动画面: sudo aptitude --purge remove usplash
安装上ubuntu默认启动画面: sudo aptitude install usplash-theme-ubuntu

//更改登录模式

KDE的登录模式:sudo dpkg-reconfigure kdm
GONE的登录模式:sudo dpkg-reconfigure gdm

 

//启用root用户登录:
 $sudo gedit /etc/gdm/gdm.conf

  AllowRoot=false  改成:AllowRoot=true

//禁用 root 帐号
$sudo passwd -l root

 

// 用ubuntu 的root登录也能出中文

sudo vi /root/profile

LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh"

 

配置/etc/apt/sources.list
sudo cp /etc/apt/sources.list  /etc/apt/sources.list.backup

代码:

sudo rm -rf /etc/apt/sources.list
sudo vi /etc/apt/sources.list

 

#Ubuntu.cn99.com更新服务器
deb intrepid main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb intrepid-proposed main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb-src intrepid-proposed main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse
 

网通8.1

deb intrepid main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb intrepid-proposed main multiverse restricted universe
deb intrepid multiverse universe main
deb-src intrepid-proposed main restricted universe multiverse

 

#Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器 电信,亚洲地区官方更新服务器,推荐全国用户使用。)

deb intrepid main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb intrepid-proposed main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse
deb-src intrepid-proposed main restricted universe multiverse

 

#中国台湾 台湾大学更新服务器
deb intrepid main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb intrepid-proposed main multiverse restricted universe
deb-src intrepid-proposed main restricted universe multiverse

 

#台湾官方更新服务器

deb intrepid main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb intrepid-proposed main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse
deb-src intrepid-proposed main restricted universe multiverse

#Ubuntu 官方服务器(欧洲)
deb intrepid main restricted universe multiverse
deb intrepid-security main restricted universe multiverse
deb intrepid-updates main restricted universe multiverse
deb intrepid-proposed main restricted universe multiverse
deb intrepid-backports main restricted universe multiverse
deb-src intrepid main restricted universe multiverse
deb-src intrepid-security main restricted universe multiverse
deb-src intrepid-updates main restricted universe multiverse
deb-src intrepid-proposed main restricted universe multiverse
deb-src intrepid-backports main restricted universe multiverse

#如果无法解析uestc.edu.cn域名,请使用以下地址
deb intrepid main multiverse restricted universe
deb intrepid-backports main multiverse restricted universe
deb intrepid-proposed main multiverse restricted universe
deb intrepid-security main multiverse restricted universe
deb intrepid-updates main multiverse restricted universe
deb-src intrepid main multiverse restricted universe
deb-src intrepid-backports main multiverse restricted universe
deb-src intrepid-proposed main multiverse restricted universe
deb-src intrepid-security main multiverse restricted universe
deb-src intrepid-updates main multiverse restricted universe

#上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用):
deb intrepid main multiverse restricted universe
deb intrepid-backports main multiverse restricted universe
deb intrepid-proposed main multiverse restricted universe
deb intrepid-security main multiverse restricted universe
deb intrepid-updates main multiverse restricted universe
deb-src intrepid main multiverse restricted universe
deb-src intrepid-backports main multiverse restricted universe
deb-src intrepid-proposed main multiverse restricted universe
deb-src intrepid-security main multiverse restricted universe
deb-src intrepid-updates main multiverse restricted universe



#北京市清华大学更新服务器(教育网,推荐校园网和网通用户使用):
deb intrepid main multiverse restricted universe
deb intrepid-backports main multiverse restricted universe
deb intrepid-proposed main multiverse restricted universe
deb intrepid-security main multiverse restricted universe
deb intrepid-updates main multiverse restricted universe
deb-src intrepid main multiverse restricted universe
deb-src intrepid-backports main multiverse restricted universe
deb-src intrepid-proposed main multiverse restricted universe
deb-src intrepid-security main multiverse restricted universe
deb-src intrepid-updates main multiverse restricted universe

#沈阳市东北大学更新服务器(教育网,推荐校园网和网通用户使用):
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-backports main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-proposed main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-security main multiverse restricted universe
deb ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-security main multiverse restricted universe
deb-src ftp://ftp.neu.edu.cn/mirror/archive.ubuntu.com/ubuntu/ intrepid-updates main multiverse restricted universe
 

#中国科学技术大学更新服务器(教育网,推荐校园网和网通用户使用):
deb intrepid main multiverse restricted universe
deb intrepid-backports main multiverse restricted universe
deb intrepid-proposed main multiverse restricted universe
deb intrepid-security main multiverse restricted universe
deb intrepid-updates main multiverse restricted universe
deb-src intrepid main multiverse restricted universe
deb-src intrepid-backports main multiverse restricted universe
deb-src intrepid-proposed main multiverse restricted universe
deb-src intrepid-security main multiverse restricted universe
deb-src intrepid-updates main multiverse restricted universe

#厦门大学更新服务器(教育网服务器):
deb ftp://ubuntu.realss.cn/ubuntu/ intrepid main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ intrepid-backports restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ intrepid-security main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ intrepid main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ intrepid-security main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ intrepid-updates main restricted universe multiverse

#成都市 电子科技大学更新服务器(教育网,推荐校园网和网通用户使用):
deb intrepid main multiverse restricted universe
deb intrepid-backports main multiverse restricted universe
deb intrepid-proposed main multiverse restricted universe
deb intrepid-security main multiverse restricted universe
deb intrepid-updates main multiverse restricted universe
deb-src intrepid main multiverse restricted universe
deb-src intrepid-backports main multiverse restricted universe
deb-src intrepid-proposed main multiverse restricted universe
deb-src intrepid-security main multiverse restricted universe
deb-src intrepid-updates main multiverse restricted universe
sudo apt-get update

 

关于ubuntu TAB键自动补齐功能大扩展

sudo apt-get install bash-completion

sudo vi /etc/bash.bashrc
去注释或者添加以下几行:

# enable bash completion in interactive shells

if [ -f /etc/bash_completion ]; then

. /etc/bash_completion

fi

 

阅读(2282) | 评论(0) | 转发(0) |
0

上一篇:wget 命令帮助

下一篇:流行网站索引

给主人留下些什么吧!~~