免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1044 | 回复: 0
打印 上一主题 下一主题

Ubuntu8.10 基础配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-21 20:11 |只看该作者 |倒序浏览

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
tigerjxh@192.168.1.3


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 http://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ intrepid-backports main restricted universe multiverse

网通8.1
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu/ intrepid multiverse universe main
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main restricted universe multiverse

#Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器 电信,亚洲地区官方更新服务器,推荐全国用户使用。)
deb
http://mirror.lupaworld.com/ubuntu
intrepid main restricted universe multiverse
deb
http://mirror.lupaworld.com/ubuntu
intrepid-security main restricted universe multiverse
deb
http://mirror.lupaworld.com/ubuntu
intrepid-updates main restricted universe multiverse
deb
http://mirror.lupaworld.com/ubuntu
intrepid-backports main restricted universe multiverse
deb
http://mirror.lupaworld.com/ubuntu
intrepid-proposed main restricted universe multiverse
deb-src
http://mirror.lupaworld.com/ubuntu
intrepid main restricted universe multiverse
deb-src
http://mirror.lupaworld.com/ubuntu
intrepid-security main restricted universe multiverse
deb-src
http://mirror.lupaworld.com/ubuntu
intrepid-updates main restricted universe multiverse
deb-src
http://mirror.lupaworld.com/ubuntu
intrepid-backports main restricted universe multiverse
deb-src
http://mirror.lupaworld.com/ubuntu
intrepid-proposed main restricted universe multiverse

#中国台湾 台湾大学更新服务器
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ intrepid-proposed main restricted universe multiverse

#台湾官方更新服务器
deb http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse
#Ubuntu 官方服务器(欧洲)
deb http://archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
#如果无法解析uestc.edu.cn域名,请使用以下地址
deb http://ubuntu.dormforce.net/ubuntu/ intrepid main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ intrepid-security main multiverse restricted universe
deb http://ubuntu.dormforce.net/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ intrepid main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://ubuntu.dormforce.net/ubuntu/ intrepid-updates main multiverse restricted universe
#上海市上海交通大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
#北京市清华大学更新服务器(教育网,推荐校园网和网通用户使用):
deb http://mirror9.net9.org/ubuntu/ intrepid main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ intrepid-security main multiverse restricted universe
deb http://mirror9.net9.org/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ intrepid main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://mirror9.net9.org/ubuntu/ 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 http://debian.ustc.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ 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 http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-updates main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-backports main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-proposed main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ intrepid-security main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ 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



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/67466/showart_1972598.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP