ubuntu12.04教育网更新源

现在是已经发布到ubuntu 12.04,不过我用的还是11.10,电子科大的源今天挂了,写个文章存个档

更新源方法
1.备份:$sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.编辑:$sudo gedit /etc/apt/sources.list
删除文件里的所有,然后复制其中以下一个更新源到文件中,保存!
3.更新:$sudo apt-get update
4.升级:$sudo apt-get upgrade

ubuntu版本—版本号
Ubuntu 10.04 Lucid Lynx—lucid
Ubuntu 10.10 Maverick Meerkat—maverick
Ubuntu 11.04 Natty Narwhal—natty
Ubuntu 11.10 Oneiric Ocelot—oneiric
Ubuntu 12.04 Precise Pangolin—precise

教育网更新源:
ubuntu源的格式为 “deb url 版本号 main restricted universe multiverse”
一般来讲,url是不变的,所以只要修改版本号,就可以得到最新的源了

中国科技大学

deb http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

上海交通大学

deb http://ftp.sjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ precise main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

厦门大学的:

deb ftp://ubuntu.realss.cn/ubuntu/ precise main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ precise-backports restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ precise-security main restricted universe multiverse
deb ftp://ubuntu.realss.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ precise main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src ftp://ubuntu.realss.cn/ubuntu/ precise-updates main restricted universe multiverse

成都市 电子科技大学更新服务器:

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

ssh-keygen的使用方法

一、概述

1、就是为了让两个linux机器之间使用ssh不需要用户名和密码。采用了数字签名RSA或者DSA来完成这个操作

2、模型分析

假设 A (192.168.20.59)为客户机器,B(192.168.20.60)为目标机;

要达到的目的:
A机器ssh登录B机器无需输入密码;
加密方式选 rsa|dsa均可以,默认dsa

二、具体操作流程

单向登陆的操作过程(能满足上边的目的):
1、登录A机器
2、ssh-keygen -t [rsa|dsa],将会生成密钥文件和私钥文件 id_rsa,id_rsa.pub或id_dsa,id_dsa.pub
3、将 .pub 文件复制到B机器的 .ssh 目录, 并 cat id_dsa.pub >> ~/.ssh/authorized_keys
4、大功告成,从A机器登录B机器的目标账户,不再需要密码了;(直接运行 #ssh 192.168.20.60 )

双向登陆的操作过程:

1、ssh-keygen做密码验证可以使在向对方机器上ssh ,scp不用使用密码.具体方法如下:
2、两个节点都执行操作:#ssh-keygen -t rsa
然后全部回车,采用默认值.

3、这样生成了一对密钥,存放在用户目录的~/.ssh下。
将公钥考到对方机器的用户目录下 ,并将其复制到~/.ssh/authorized_keys中(操作命令:#cat id_dsa.pub >> ~/.ssh/authorized_keys )。

4、设置文件和目录权限:

设置authorized_keys权限
$ chmod 600 authorized_keys
设置.ssh目录权限
$ chmod 700 -R .ssh

5、要保证.ssh和authorized_keys都只有用户自己有写权限。否则验证无效。(今天就是遇到这个问题,找了好久问题所在),其实仔细想想,这样做是为了不会出现系统漏洞。

我从20.60去访问20.59的时候会提示如下错误:

[java] view plaincopy

The authenticity of host ‘192.168.20.59 (192.168.20.59)’ can’t be established.
RSA key fingerprint is 6a:37:c0:e1:09:a4:29:8d:68:d0:ca:21:20:94:be:18.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.20.59’ (RSA) to the list of known hosts.
root@192.168.20.59’s password:
Permission denied, please try again.
root@192.168.20.59’s password:
Permission denied, please try again.
root@192.168.20.59’s password:
Permission denied (publickey,gssapi-with-mic,password).

三、总结注意事项

1、文件和目录的权限千万别设置成chmod 777.这个权限太大了,不安全,数字签名也不支持。我开始图省事就这么干了

2、生成的rsa/dsa签名的公钥是给对方机器使用的。这个公钥内容还要拷贝到authorized_keys

3、linux之间的访问直接 ssh 机器ip

4、某个机器生成自己的RSA或者DSA的数字签名,将公钥给目标机器,然后目标机器接收后设定相关权限(公钥和authorized_keys权限),这个目标机就能被生成数字签名的机器无密码访问了

maven

http://marshal.easymorse.com/archives/1212

http://marshal.easymorse.com/archives/2644
http://devbbs.doit.com.cn/thread-11232-1-1.html

http://devbbs.doit.com.cn/forum.php?mod=viewthread&tid=44055

http://blog.jeoygin.org/2012/03/hdfs-source-analysis-1-datanode-overview.html
http://hi.baidu.com/yangzhibin_bai/blog/item/1cd781ddfeffbad18d1029d1.html

http://devbbs.doit.com.cn/forum.php?mod=viewthread&tid=11232

http://devbbs.doit.com.cn/forum.php?mod=viewthread&tid=50067

http://devbbs.doit.com.cn/forum.php?mod=viewthread&tid=50199
http://juvenshun.iteye.com/blog/305865