Debian

来自开放百科 - 灰狐
跳转到: 导航, 搜索

Debian GNU/Linux

Debian-100.gif
LAMP

目录

简介

Debian是最重要Linux发行版,根据Distrowatch统计,在323款目前仍然活跃的发行版中,128款是基于Debian,74款是基于Ubuntu,换句话说,所有发行版中有63%是源于Debian。相比之下,50款(15%)是基于FedoraRed Hat,28款(9%)是基于Slackware,还有12款(4%)是基于Gentoo。(March 3, 2011)

新闻

Debian Women Project

自https://planet.debian.org/atom.xml加载RSS失败或RSS源被墙

Debian 是什么

Debian-50.png 是Linux发行版当中最自由的一种。由位于世界各地上千名的自愿者不断开发和维护。它不属于任何的商业公司,完全由开源社区所有。是一套为了您的计算机所设计的自由操作系统 (OS)。操作系统是使计算机运行的基本程序和工具的集合。Debian 使用 Linux 核心(操作系统的最重要部份),但大部份的基本工具则来自 GNU 计划,因此我们称为 GNU/Linux

Sarge经过三年多的开发于2005年6月6日正式发布,替代Woody成为最新的Stable。testing的代号改为etch,unstable的代号还是sid。

Debian于2006年6月底停止对旧Stable版本Woody的支持。

Debian中代号为Sarge的发行版已获得开放源码发展实验室(OSDL)的电信运营商等级Linux(CGL)规格认证。

Debian GNU/Linux 不单是个操作系统,它也包含多过 15490 个软件包,它们是一些经已编译的软件,并包装成一个容易安装的格式。

现在就和微软说再见!http://goodbye-microsoft.com/ 在Windows XP下安装Debian

Huihoo-debian.gif

Huihoo Debian Enterprise Guide - 灰狐Debian企业指南, 并逐步发展成 HDEL :)

DEX

DEX致力于让 Debian 及其派生发行版能更加紧密的进行协作。

版本

Debian-lts.jpeg

Debian Long Term Support

Cloud

Debian 11

How To Upgrade To Debian 11 Bullseye From Debian 10 Buster

Debian 10

Debian 9

Debian镜像使用帮助

How To Install PHP 7.3 on Debian 9 / Debian 8

Debian 8

Debian8-jessie.png

Debian 8.0 Jessie 已经发布,并提供预构建的 OpenStack 镜像。(2015.04.25)

deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

Debian 7

Debian 7“Wheezy”将支持Multiarch。Multiarch(多架构)允许一个系统能安装和运行有多个不同二进制文件的应用程序,例如i386-linux-gnu程序能运行在amd64-linux-gnu系统上。多架构简化了跨架构编译,这将大大增强了Debian实现通用操作系统承诺的能力,加强了新的64位系统对32位应用程序的支持。

deb http://mirrors.163.com/debian/ wheezy main
deb-src http://mirrors.163.com/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

Debian 6

Debian 6.0 "Squeeze" 已正式发行,除了常见的 Debian GNU/Linux,这次还引入了 Debian GNU/kFreeBSD 作"技术预览"。

# main repo
deb http://ftp.debian.org/debian/ squeeze main
deb-src http://ftp.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

Debian将AMD64和Intel64都称作“amd64”

Debian 5

Debian GNU/Linux 5.0.0 was released February 14th, 2009.
Debian GNU/Linux 5.0 updated                             [email protected]
April 11th, 2009                 http://www.debian.org/News/2009/20090411

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
#在后来添加
deb http://ftp.tw.debian.org/debian/ lenny main
deb-src http://ftp.tw.debian.org/debian/ lenny main
deb http://ftp.tw.debian.org/debian/ lenny contrib
deb-src http://ftp.tw.debian.org/debian/ lenny contrib
deb http://ftp.tw.debian.org/debian/ lenny non-free
deb-src http://ftp.tw.debian.org/debian/ lenny non-free

or

deb http://mirrors.163.com/debian/ lenny main non-free contrib
deb-src http://mirrors.163.com/debian/ lenny main non-free contrib 

若出现 W: Failed to fetch http://ftp.at.debian.org/debian/dists/lenny/main/source/Sources.gz Sub-process gzip returned an error code 类似错误

可能这个源没你需要的软件包, 如AMD-64 处理方法: 换一个源并且 clean /var/lib/apt/lists and trying again

Debian 4

大家可试着刻录并安装 debian-40r0-i386-xfce-CD-1.iso , 安装时可以选择非网络安装,这样就可以把光盘上带的 400 多个软件包装上,包括 xfce 4 桌面系统,安装的整个过程还是字符方式,但安装完重新启动 Debian 后就能顺利的进入 xfce 桌面 接着 修改 /etc/apt/sources.list

Etch 国内源

deb http://mirrors.163.com/debian/ etch main
deb-src http://mirrors.163.com/debian/ etch main

Sarge国内源

deb http://mirrors.163.com/debian/ sarge main non-free contrib
deb-src http://mirrors.163.com/debian/ sarge main non-free contrib
aptitude update
aptitude upgrade

安装字体

aptitude install ttf-bitstream-vera ttf-arphic-uming xfonts-wqy  
dpkg-reconfigure locales 选择默认locale为中文的,如zh_CN.UTF-8

安装 fcitx 小企鹅输入法

apt-get install fcitx-pinyin im-switch 
im-switch -s fcitx -z all_ALL 

修改/etc/X11/xinit/xinput.d/fcitx,为:

XIM=fcitx
XIM_PROGRAM=/usr/bin/fcitx
XIM_ARGS=""
GTK_IM_MODULE=fcitx
QT4_IM_MODULE=fcitx
DEPENDS="fcitx" 

英文环境下 Fcitx配置 Xfce:

# touch /etc/X11/Xsession.d/95input

在这个文件中写入如下内容: <bash>

export LANG=zh_CN.UTF-8
export LC_CTYPE=zh_CN.UTF-8
export LC_ALL=
export XMODIFIERS=@im=fcitx
fcitx &

或者

vi ~/.xinitrc,输入:
export LC_ALL=zh_CN.UTF-8
export LANG=zh_CN.UTF-8
export XMODIFIERS=@im=fcitx
fcitx &

包管理

apt-get install synaptic // 通过 Synaptic 进行包管理

参考: Debian etch 简要安装指南

debian的中文美化 - http://colding.bokee.com/4293814.html

using gnome-screensaver in XFCE and NOT xscreensaver

#apt-get remove xscreensaver
#apt-get install gnome-screensaver

To auto-start gnome-screensaver, add it as an Autostarted Application:

Xfce menu > Settings > Autostarted Applications

The command for starting the gnome-screensaver daemon is:

gnome-screensaver

modify the file /usr/bin/xflock4:

cp /usr/bin/xflock4 /usr/bin/xflock4.orig
#xscreensaver-command -lock || xlock $*
gnome-screensaver-command --lock
exit 0 

调整显示器亮度

安装 GNOME

#apt-get install x-window-system-core
#apt-get install gnome

安装 KDE

#apt-get install kde

安装声卡

#apt-get install alsa-base alsa-utils
# alsaconf 

http://www.debian.ha.cn/htmldata/8/2006_03/article_896_1.html

Sun Looking glass Desktop

Java 3D Desktop: Sun Looking glass Desktop

vi /etc/apt/sources.list
deb http://javadesktop.org/lg3d/debian stable contrib
apt-get update
sudo apt-get install lg3d-core
Success. LG has been added as a gdm session.

重启并选择 Looking Glass session, 成功进入 3D 桌面 :)

常用包命令

#useradd -s /bin/bash -m allen
finger allen
#useradd allen
#passwd allen
# userdel -r allen

http://www.debian.org/doc/manuals/reference/ch-package.zh-cn.html

  • dpkg – Debian 包安装工具
  • apt-get – APT 的命令行前端
  • aptitude – APT 的高级的字符和命令行前端
  • synaptic – 图形界面的 APT 前端
  • dselect – 使用菜单界面的包管理工具
  • tasksel – Task 安装工具
  • dpkg-reconfigure - 重新配置已安装的软件包(如果它是使用 debconf 进行配置的)
  • dpkg-source - 管理源码包
  • dpkg-buildpackage - 自动生成包文件
  • apt-cache - 在本地缓冲区检查包文件
  • apt-get check # 更新缓冲区并检查损坏的软件包
  • apt-cache search pattern # 按文本描述搜索软件包,看有哪些包可供选择
  • apt-cache policy package # 软件包的 priority/dists 信息
  • apt-cache show -a package # 显示所有 dists 中软件包描述信息
  • apt-cache showsrc package # 显示相应源码包的信息
  • apt-cache showpkg package # 软件包调试信息
  • dpkg --audit|-C # 搜索未完成安装的软件包
  • dpkg {-s|--status} package ... # 已安装软件包描述
  • dpkg -l package ... # 已安装软件包的状态(每个占一行)
  • dpkg -L package ... # 列出软件包安装的文件的名称

Debian Live

The Debian Live project aims to create Debian Live images for CDs, DVDs, USB sticks and tarballs for netboot for the Etch release (and newer).

常用命令

netstat -ntulp

查看当前目录下文件的个数 ls -l | grep "^-" | wc -l    查看当前目录下文件的个数,包括子目录里的 ls -lR| grep "^-" | wc -l    查看某目录下文件夹(目录)的个数,包括子目录里的 ls -lR| grep "^d" | wc -l

sudo find / -name "scala" -print

GCC

http://lists.debian.org/debian-gcc/

  1. apt-get install build-essential
  2. cat /proc/version // 确定核心是什么版本gcc编译的
  3. apt-get -u install gcc-2.95 g++-2.95 make
  4. export CC=/usr/bin/gcc-2.95
  5. export CXX=/usr/bin/g++-2.95

http://www.debian.org/doc/manuals/reference/ch-program.zh-cn.html // 编程

  1. apt-get install glibc-doc manpages-dev libc6-dev gcc

$ /usr/bin/gcc-2.95 -Wall -g -o run_example example.c -lm $ ./run_example

关联/usr/bin/gcc-2.95 和 gcc ln -sf /usr/bin/gcc-2.95 /usr/bin/gcc $ gcc -Wall -g -o run_example example.c -lm

安装指南

Debian的安装 大体要 经过三个步骤

一,安装基本部分

通过安装光盘或自己制作引导软盘

基础安装部分可参考 - http://www.huihoo.com/gnu_linux/debian/tutorial/Debian-Install-Guide-4.html

二,安装,配制网络

PPPCONFIG 通过它来配制基本项

NUMBER 86 755 25100572
User ...
password
Speed 115200
COM /dev/ttyS1
Method PAP
PPPOEConf 测试

在/etc/resolv.conf加入一个nameserver

如;nameserver 202.96.134.133
$ sudo apt-get install net-tools
$ ifconfig -a

bash: ping: command not found

apt-get install iputils-ping

netstat -nr

/usr/bin/pon dsl-provider (启动adsl)

/usr/bin/poff dsl-provider (关闭adsl)

route add default gw ip (获得的动态IP)

nslookup www.huihoo.com (OK)

假如某台机器的eth0使用DHCP动态IP地址连接Internet,eth1连接LAN,则其/etc/network/interfaces的设置如下(适用于Woody及后继版本)

auto lo
iface lo inet loopback
    
auto eth0
iface eth0 inet dhcp
    
auto eth1
iface eth1 inet static
address 192.168.18.100
gateway 192.168.18.1
netmask 255.255.255.0

/etc/resolv.conf

nameserver 202.96.128.86
nameserver 202.96.128.68
nameserver 202.96.199.133

设置服务启动项,enable & disable daemon

apt-get install rcconf
rcconf

更多细节:https://wiki.debian.org/NetworkConfiguration

三. apt-get 安装方式

通过HTTP,FTP等方式 用APT方式进行其余部件的 安装。这点很吸引人

apt-get install xxx.deb

vi /etc/apt/sources.list

加入 deb http://http.us.debian.org/debian woody main contrib non-free
deb http://non-us.debian.org/debian-non-US woody/non-US main contrib non-free

sid 换成woody

apt-get update

apt-get dist-upgrade

运行 dselect

光标在 Update上 按 enter

完了再 Select,什么都不用改,直接enter返回到前选项单里,因为它已经预订了基本需要的东西.

Install, 是否安装 enter,等下完后开始配置,会问你问题.

完成后回问是否删除下载的.deb文件,随你便,默认删除.

debian server 192.168.1.6

安装ssh

apt-get install ssh

输入法

终端

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Firefox

Running Firefox 3 on Debian Etch with GTK 2.10

Download GTK+ 2.10 from gtk.org and do this:

# cd /opt
# tar xjf gtk+-2.10.14.tar.bz2 
# mkdir gtk210
# cd gtk+-2.10.14
# ./configure --prefix=/opt/gtk210
# make
# make install

Now create the start script "firefox.sh":

#!/bin/sh
export LD_LIBRARY_PATH="/opt/gtk210/lib"
/path-to-firefox-3/firefox $*

问题集

  • ldconfig: Writing of cache data failed: No space left on device
rm -f /var/cache/apt/archives/*.deb
apt-get clean
du -h / --max-depth=1
du -s /var/cache/*
  • locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

如果出现此错误,请执行updatedb

磁盘出问题,无法启动。

进入 BusyBox 模式,运行 fsck /dev/sda1 进行磁盘修复,然后重启成功。

官方链接

  • 官方网站 了解debian,从这里开始
  • 新闻中心 包括升级通告,安装更新等重要新闻
  • 软件包搜索站 提供各个版本的软件包搜索,下载,并提供详细的软件包信息
  • 开发者中心 想成为debian开发者中正式一员?来这里
  • 获得debian 提供网络下载、CD购买,以及正式的安装文档
  • 文档中心 包括 用户手册、开发人员手册、HOWTO以及通用FAQ文档等,你不能错过

民间组织、社区、个人站点

Debian发行版

AIMS Desktop
Mobian
VyOS
Apertis

Debian 衍生发行版

Debian Pure Blends 是为有特定需要的人群提供的一套解决方案

基于 Debian 已经衍生了 400 多个操作系统分发版,其中仍有 120 个还在活跃中,一个真正强大的 OS 生态系统。

主要的 Debian 分发版:

  • Ubuntu: 大家最熟悉
  • AIMS Desktop African Institute for Mathematical Sciences
  • Grml 面向系统管理员的 live 系统
  • Kali Linux: 安全审计和渗透测试
  • PureOS 获得 FSF 认可,专注于隐私、安全和便捷
  • Tails 保护隐私和保持匿名
  • 深度操作系统 基于 Qt 开发了深度桌面环境、深度控制中心和一系列应用。
  • VyOS Open-source router and firewall platform
  • Apertis Collaborative OS platform for products, Production Friendly + Frequent Releases + Developer Ready

项目

  • debos - Debian OS images builder

链接

Debian Mirrors

建立 Debian mirror 的脚本, 如:debian-mirror.sh

#!/bin/bash
SRC=rsync://debian.ethz.ch/debian
DST=/var/mirrors/debian/
rsync -vzrltopg --progress --delete $SRC $DST

建立 Debian ISO mirror 脚本,如: debian-iso.sh

#!/bin/bash
SRC=rsync://debian.ethz.ch/debian-cd
DST=/var/mirrors/debian-cd/
rsync -vzrltopg --progress --delete $SRC $DST

更多 Debian Mirrors: http://www.debian.org/mirror/list

开发相关

相关计划

图集

screenshots.debian.net

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱