分享

如何添加源和安装sun-java6-jdk

 杰出天下 2012-04-06
ubuntu的新立得软件更新速度和源有很大关系,找到一个速度好的源在系统更新或软件安装的时候会有更好的效率,所以我们要学会自己添加一些本地的或者是自己所需要的源。
         在Ubuntu里面 ,源的配置文件是在 /etc/apt/sources.list文件。所以我们用文本编辑软件打开它。(ubuntu里面自带的gedit是很不错的文本编辑软件,在这里我 们就使用gedit,也可以使用其他文本编辑软件,如 vi)
          sudo gedit /etc/apt/sources.list          
          里面的内容可以放心全部删除,然后代替为你所需要的源。(里面内容可以不删除,直接在后面添加即可)
如以下 (注:下面源为8.10)
          deb http://ubuntu./ubuntu/ intrepid main restricted universe multiverse
          deb http://ubuntu./ubuntu/ intrepid-backports main restricted universe multiverse
          deb http://ubuntu./ubuntu/ intrepid-proposed main restricted universe multiverse
          deb http://ubuntu./ubuntu/ intrepid-security main restricted universe multiverse
          deb http://ubuntu./ubuntu/ hardy-updates main restricted universe multiverse
          deb-src http://ubuntu./ubuntu/ intrepid main restricted universe multiverse
          deb-src http://ubuntu./ubuntu/ intrepid-backports main restricted universe multiverse
          deb-src http://ubuntu./ubuntu/ intrepid-proposed main restricted universe multiverse
          deb-src http://ubuntu./ubuntu/ intrepid-security main restricted universe multiverse
          deb-src http://ubuntu./ubuntu/ intrepid-updates main restricted universe multiverse

          添加完成之后,保存退出。
然后运行
         sudo apt-get upgrade
进行源的更新,可以查看有新的软件包更新与否。    

jdk安装方法:
1、添加这个源:
deb http://us.archive./ubuntu/ hardy multiverse。
2、sudo apt-get update
3、sudo apt-get install sun-java6-jdk

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约