08
8

Debian杂东杂八笔记整合

因为刚刚了解Debian,所以对apt-get安装的方式不是很了解,在安装软件的时候,发现当前安装的软件不是最新版本,虽然知道Debian以安全著称,但软件不会是这么老的版本吧,拿nginx来说,当前nginx官方的开发版本为0.7.8,最新的stable稳定版为0.6.32,然而Debian如果以stable模式安装软件,它的当前nginx版本还是0.4.13-2,虽然我也只是测试,软件版本无所谓,如果真的要安装最新版0.6.32的话,那只有下载nginx的源码包来编译安装了,虽然这可以尝试到新版本,但我还是想试下能否用apt-get install nginx的方式安装最新的0.6.32的版本,在网上找了半天,终于找到了解决方法。
修改/etc/apt/source.list文件,以下面为例:
#deb http://debian.cn99.com/debian/ etch main
#deb-src http://debian.cn99.com/debian/ etch main

deb http://debian.cn99.com/debian/ unstable main non-free contrib
deb-src http://debian.cn99.com/debian/ unstable main non-free contrib

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

这是我测试使用的源测试,前两行为稳定版的cn99源,中间两行为unstable的源,也就是debian官方所提到的开发源,下面为安全更新源。

因为知道debian的各个版本的区别,unstable,testing,stable,所以很好解决这个问题。
也可以打开http://www.debian.org/distrib/packages这个地址来查询某个软件的的unstable,testing,stable的版本,然后修改source.list来实现不同版本软件的安装。

Debian内核升级:
# aptitude search linux-image-2.6*
# aptitude install linux-image-2.6-686
这样就可以安装2.6.18的内核了。
# aptitude dist-upgrade

Debian 关闭IPV6的方法:
将/etc/modprobe.d/aliases的alias net-pf-10 ipv6改成alias net-pf-10 false就可以了

Debian网络设置方法:
设置IP,可以直接编辑/etc/network/interfaces这个文件,固定IP这样写:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.2.2
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1
里面把地址和网关设好即可。用DHCP时后一段是这样:
auto eth0
iface eth0 inet dhcp
这个文件改动之后,应该重启网络:
/etc/init.d/networking restart

Debian系统垃圾清理:
dpkg -l |grep “^rc”|awk ‘{print $2}’ |xargs aptitude -y purge

Debian管理系统服务系统:
#apt-get install rcconf
#rcconf

17fav 收藏本文

Powered by

4 条评论了已经

发表评论

名字(必须)
邮箱(不会被公布)(必须)
网址

字体为 粗体 是必填项目,邮箱地址 永远不会 公布。

允许部分 HTML 代码:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URLs(网站链接)必须完整有效 (比如: http://www.23day.com),所有标签都必须完整的关闭。

超出部分系统将会自动分段及换行。

请保证评论内容是与日志或 Blog 内容相关的,灌水、攻击性或不恰当的评论 可能 会被编辑或删除。

    标签云

    Related links

    随机日志

    最新文章

    最新评论

    我的分享

 

收藏 & 分享

  • 百度搜藏
  • QQ 书签
  • Google 书签
  • 雅虎收藏
  • mister-wong.cn
  • 饭否
  • Facebook
  • del.icio.us

Powered by 17fav.com