1 / 36

网络操作系统 - Linux

网络操作系统 - Linux. 第三章 Linux 常规配置. 网络配置 配置本机 IP 地址 配置本地其它网络信息 安装图形界面 共享配置 NFS 配置和使用 Samba 的配置和使用. 网络配置. 认识本地 IP 信息. 网络配置. IP 配置信息 Vim /etc/network/interfaces iface eth0 inet dhcp. 网络配置. IP 配置信息 Vim /etc/network/interfaces

Download Presentation

网络操作系统 - Linux

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 网络操作系统 - Linux

  2. 第三章 Linux常规配置 • 网络配置 • 配置本机IP地址 • 配置本地其它网络信息 • 安装图形界面 • 共享配置 • NFS配置和使用 • Samba的配置和使用

  3. 网络配置 • 认识本地IP信息

  4. 网络配置 • IP配置信息 • Vim /etc/network/interfaces • iface eth0 inet dhcp

  5. 网络配置 • IP配置信息 • Vim /etc/network/interfaces • auto eth0address 192.168.0.88netmask 255.255.255.0gateway 192.168.0.1

  6. 网络配置 • 启动网络 • ifconfig eth0 up / ifup • ifconfig eth0 down / ifdown • 重启服务 • /etc/init.d/networking start|stop|restart • service networking start|stop|restart • 检查网络 • ping ip_addr

  7. 网络配置 • 临时修改本地IP信息 • ifconfig eth0 192.168.0.3/24 • ifconfig eth0 hw either xx:xx:xx:xx:xx:xx • ifconfig eth0 netmask 255.255.255.0 • ifconfig eth0 broadcast 192.168.0.255 • ifconfig eth0:0 …

  8. 网络配置 • 修改本地网络信息 - route • 查看路由信息 route • route add default gw 192.168.2.99 • route del default gw

  9. 网络配置 • 修改DNS服务器 • 配置DNS服务器 • vim /etc/resolv.conf • nameserver 219.141.140.10 • 查看DNS信息 • nslookup

  10. 网络配置 • 主机名 • 查看 hosts • 临时修改 • hostname newhostname • 永久修改 • vim /etc/hostname

  11. 图形界面的配置 • 图形界面概述 • X窗口系统 • 登录管理器 • XDM / GDM / KDM • 桌面环境和窗口管理器(GUI) • GNOME / KDE / XFCE

  12. 图形界面的配置 • apt-get install x-window-system-core • apt-get install xdm • 备选 gdm、kdm • apt-get install ubuntu-desktop • 备选 kubuntu-desktop、 xubuntu-desktop

  13. 图形界面的配置

  14. 图形界面的配置

  15. 图形界面的配置 Startx

  16. 图形界面的配置

  17. 图形界面的配置

  18. 图形界面的配置

  19. 图形界面的配置

  20. 图形界面的配置

  21. 图形界面的配置

  22. 图形界面的配置

  23. 安装和使用打印机 • 图形界面的安装位置 • 新打印机 -> print into PDF file->Generic -> PDF file generator

  24. 共享配置 • 共享类型 • UNIX-Like & UNIX-LIKE • Windows 访问 UNIX-LIKE • UNIX-LIKE 访问 Windows

  25. 共享配置 • NFS的安装 • RPC类型的服务(portmap) • 安装 • apt-get install nfs-kernel-server(服务器端) • apt-get install nfs-commmon(客户端)

  26. 共享配置 • NFS的配置 • /etc/default/portmap • vim • dpkg-reconfigure portmap • /etc/hosts.deny • /etc/hosts.allow ### NFS DAEMONS portmap:ALL | 192.168.2. lockd:ALL mountd:ALL rquotad:ALL statd:ALL

  27. 共享配置 • NFS的配置 • /etc/exports • /home/zp/share 192.168.2.*(rw,sync,no_root_squash) • /home/zp/share 192.168.2.0/24(rw,sync,no_root_squash) • exportfs -r • 更新exportfs文件 • 重新启动服务 • nfs-kernel-server

  28. 共享配置 • NFS的挂载 • 挂载 • mount 192.168.2.1:/home/zp/share /mnt /home/zp/share • 查看结果 • df • 释放 • Umount [-f]

  29. 共享配置 • Samba的安装 • 已经安装 • 没有安装 • apt-get install samba

  30. 共享配置 • Samba服务开启 • 查看服务的当前状态 • /etc/init.d/samba status • 开启或者关闭 • /etc/init.d/samba stop|start|restart • service samba stop|start|restart • 状态查询 • Smbstatus • 访问一下试试看

  31. 共享配置 • Samba的配置 • 配置文件 • /etc/samba/smb.conf • 添加共享目录 • [share] • comment = Public • path =/share/public/ • browseable = yes • guest ok = yes • read only = no • writeable = yes • create mask = 0777 • directory mask = 0777

  32. 共享配置 • Samba配置后出现的问题 • 无法写入和创建目录 • 修改共享文件夹的权限 • chmod 777 /share

  33. 共享配置 • 从Linux访问Windows • 在Windows上创建共享文件夹 • 在Linux上创建链接的目标目录 • smbmount //share/folder /mnt/samba • Smbumount /mnt/samba

  34. 复活节彩蛋 • 超级牛力 • apt-get -h • apt-get moo • apt-build moo • 蛇吞象 • aptitude -v moo • aptitude -vv moo • aptitude -vvv moo • aptitude -vvvv moo • aptitude -vvvvv moo • aptitude -vvvvvv moo • aptitude -vvvvvvv moo

  35. 系统设置 • 启动管理 • 默认启动字符界面 • 默认更改网卡信息 • 系统设置 • 时间日期设置 • 【时区】修改 /etc/localtime的指向链接 • 【时间】 • date -s MM/DD/YY • date -s hh:mm • /etc/init.d/hwclock.sh restart

  36. 系统设置 • 忘记密码怎么办? • 启动时按e进入启动菜单列表 • 选择recovery mode按e • 选择kernel按e • ro single -> rw single init=/bin/bash • 按b启动

More Related