免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1200 | 回复: 0

Debian基本配置 [复制链接]

论坛徽章:
0
发表于 2007-11-08 22:07 |显示全部楼层
--> --> -->
网络连接
禁用Ipv6
sed [color="#ffdead"]-e [color="#f0e68c"]'s/alias net-pf-10 ipv6/#alias net-pf-10 ipv6\nalias net-pf-10
off/g[color="#f0e68c"]' [color="#ffdead"]-i /etc/modprobe.d/aliases
安装网络调试配置工具包 iproute
aptitude install iproute
查看机器联网设备
ip link show
ip地址设定
vim /etc/network/interfaces
使用动态ip地址分配服务
#
/etc/network/interfaces
allow-hotplug ethx
iface ethx inet dhcp
使用静态ip地址
#
/etc/network/interfaces
allow-hotplug ethx
iface ethx inet
static
    address [color="#ff00ff"]111.[color="#ff00ff"]111.[color="#ff00ff"]111.[color="#ff00ff"]111
    netmask [color="#ff00ff"]255.[color="#ff00ff"]255.[color="#ff00ff"]255.[color="#ff00ff"]0
    gateway [color="#ff00ff"]001.[color="#ff00ff"]001.[color="#ff00ff"]001.[color="#ff00ff"]001
    dns-nameservers [color="#ff00ff"]002.[color="#ff00ff"]002.[color="#ff00ff"]002.[color="#ff00ff"]002
指定dns服务
vim /etc/resolv.conf #
/etc/resolv.conf
nameserver [color="#ff00ff"]001.[color="#ff00ff"]001.[color="#ff00ff"]001.[color="#ff00ff"]001
nameserver [color="#ff00ff"]002.[color="#ff00ff"]002.[color="#ff00ff"]002.[color="#ff00ff"]002
启用ip地址设定
ifdown ethx
ifup ethx
查看设定结果
ifconfig
软件包管理
设定软件在线更新源
# for
debian 4.0 etch
[color="#98fb98"]str=[color="#f0e68c"]"[color="#ffdead"]\n[color="#f0e68c"]"
[color="#98fb98"]str=[color="#cd5c5c"]$str[color="#f0e68c"]"deb
http://debian.cn99.com/debian
etch main
non-free contrib               [color="#ffdead"]\n[color="#f0e68c"]"
[color="#98fb98"]str=[color="#cd5c5c"]$str[color="#f0e68c"]"deb-src
http://debian.cn99.com/debian
etch main
non-free contrib           [color="#ffdead"]\n[color="#f0e68c"]"
[color="#98fb98"]str=[color="#cd5c5c"]$str[color="#f0e68c"]"deb
http://debian.cn99.com/debian-security

etch/updates main contrib       [color="#ffdead"]\n[color="#f0e68c"]"
[color="#98fb98"]str=[color="#cd5c5c"]$str[color="#f0e68c"]"deb-src
http://debian.cn99.com/debian-security

etch/updates main contrib   [color="#ffdead"]\n[color="#f0e68c"]"
[color="#f0e68c"]echo[color="#ffa0a0"] -e [color="#f0e68c"]"[color="#cd5c5c"]$str[color="#f0e68c"]"[color="#ffa0a0"] [color="#f0e68c"]> /etc/network/interfaces
[color="#f0e68c"]unset temp
更新系统
aptitude update
aptitude upgrade
远程管理
安装SSH服务器
aptitude install openssh-server
下载安装Windows SSH客户端
Putty
时钟设置
安装启用时间同步服务(无察觉微调)
aptitude install openntpd
设定系统启动时强制同步
sed [color="#ffdead"]-e [color="#f0e68c"]'[color="#ffa0a0"]s/#DAEMON_OPTS=[color="#ffdead"]\"[color="#ffa0a0"]-s[color="#ffdead"]\"[color="#ffa0a0"]/DAEMON_OPTS=[color="#ffdead"]\"[color="#ffa0a0"]-s[color="#ffdead"]\"[color="#ffa0a0"]/g[color="#f0e68c"]' [color="#ffdead"]-i /etc/default/openntpd
强制同步
ntpd [color="#ffdead"]-s
查看本地时间
date


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

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP