1. Trang chủ
  2. » Trung học cơ sở - phổ thông

Microsoft PowerPoint – config-tcpip

137 12 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 137
Dung lượng 1,53 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

 Cấu hình việc quản lý tên của server  Đ/c: /etc/resolv.conf. Gồm[r]

Trang 1

Quản trị Linux

 Quản trị Linux trên LAN

 Mạng TCP/IP

 Cài đặt, quản lý các dịch vụ LAN

 Lập trình với shell script

Trang 3

Thiết lập Interface cho NIC

 Hay công cụ GUI theo từng distro

 Dùng DHCP (IP được cấp bởi DHCP server)

 Tồn tại 1 DHCP server đang chạy

Trang 4

Thiết lập Interface cho NIC - ifconfig

Trang 5

Thiết lập Interface cho NIC - ifconfig

 Thao tác trên các interface

Trang 6

Thiết lập Interface cho NIC - ifconfig

 Thao tác trên các interface

 Hiển thị tất cả cấu hình

 Tệp /etc/sysconfig/network-scripts/ifcfg-<interface>

Ví dụ: cat /etc/sysconfig/network-scripts/ifcfg-eth0

Trang 7

Ip command

Trang 8

IP v6

Trang 9

IP Aliasing

 single host to have multiple IP addresses

 Each interface in Linux system can have multiple IP addresses assigned

 Same Windows

 eth0 is the main interface,

 eth0:0 is aliased interface,

 eth0:1 is aliased interface,

Trang 10

IP Aliasing

Trang 12

Thiết lập Route - Minimal

Trang 13

Thiết lập Route - Static

 -net <interface của net>: -net 192.168.100.0/24

 -host <IP của host>

Trang 14

Thiết lập Route - Static

 Route – Ví dụ

 Tạo route mặc định cho hệ thống

 Route add default gw 172.16.12.1

 Thêm 1 route cho mạng LAN

 Route add –net 192.168.100.0/24 gw 192.168.2.1 eth0

 Route add –net 172.16.1.0 netmask 255.255.255.0 gw 192.168.2.1 eth0

Trang 15

Classless interdomain routing

 classes use of address space

 waste some addresses

 Ex: class C address space to a certain university campus

  inefficient

 Solution

 no restriction on classes, emerged

 Classless interdomain routing (CIDR)

Trang 16

Classless interdomain routing

 allow variable-length prefix

 to represent network ID

 remaining bits of 32-field address  represent hosts within network

 For example

 1 organization use 20-bit network ID

 another organization use 21-bit network ID

 with first 20 bits of these 2 network IDs is identical

  address space of 1organization contains that

of another one

Trang 17

router using CIDR address space

 increase in speed of routers

 greatly reduced size of routing tables

 Supernetting (for routing table)

 a single routing entry  a group of adjacent addresses

 2 entries with same prefix  router chooses between entries, using longest-prefix-match technique

Trang 18

router using CIDR address space

 Assume that a packet with destination IP

205.101.0.1 is received by router R1

 In entries of this router, 2 routes,

 L1 205.101.8.0/20

 L2 205.101.0.0/21

 CIDR choose longer prefix be eligible match

 link L1, with its 21-bit prefix,

 This link eventually routes packet to network N3

Trang 19

CIDR routing

Trang 20

CIDR routing

 CIDR allows us to reduce number of entries in a router's table

 using aggregate technique,

 all entries have some common partial prefix can

 combined into 1 entry

Trang 22

Install

Trang 23

Install on ubuntu

sudo apt-get install dhcp3-server

Trang 24

Download & Install

http://ftp.isc.org/isc/dhcp/dhcp-4.1.0a1.tar.gz

Trang 25

Thiết lập DHCP

 DHCP server -/etc/dhcpd.conf

Trang 26

Dhcpd.conf

Trang 27

Common dhcpd.conf Options

Trang 29

DHCP client’s option

Trang 31

 Domain Name server

 Được cài đặt bởi BIND (Berkeley Internet Name Domain)

 Tên: named

 Cấu hình

 Cấu hình tệp resolve.conf

 Cấu hình Bind: named.conf

 Tạo các tệp CSDL cho các zone

Trang 34

DNS - named.conf

Thư mục default chứa các tệp CSDL

Zone Root của DNS Zone exemple.fr -> cần tệp named.exemple.fr

Zone local của hệ thống Zone reverser

Tệp chứa mô tả root

Trang 35

Domain & Zone

 gets its own zone

 All of zones collectively form entire domain.

Trang 36

 sales.example.org, and admin.example.org

 Each of four subdomains has its own zone

 example.org has some hosts within it

 that do not fall under any of subdomains;

 Thus, it has a zone of its own

  “example.org” domain is actually composed of five zones in total

Trang 37

 Primary servers

 ones considered authoritative for a particular domain

 primary name server for a domain is

 a DNS server that knows about all hosts and subdomains existing under its domain.

Trang 38

 root name servers

 act as the first port of call for topmost

parts of domain namespace.

 root zone file describes where authoritative servers for DNS top-level domains

Trang 39

DNS - named.conf

Tệp named.exemple.fr

Tên của PC dùng làm server của zone

Trang 40

DNS –Các tệp named

 Named.local

 Dùng để đổi IP: 127.0.0.1 thành localhost

 Thuộc zone 0.0.127.IN-ADDR-ARPA (zone reverse)

Trang 42

DNS –Các tệp named

 Named.rev

 Dùng để đổi IP thành tên& ghi các PTR

Trang 45

Các công cụ TEST

 Netstat

 Xem trạng thái của TCP/IP, NIC

 Option thông dụng

 -I : thông tin về NIC

 -nr: thông tin về route

 Traceroute <host | NET>

 Hiển thị lộ trình đi đến 1 host hay LAN đích

Trang 46

NIS

Trang 48

NIS server

Trang 49

NIS server- install

Trang 50

NIS install

Trang 51

1 Domain name

Trang 52

Start NIS

Trang 53

Edit makefile

 Designating Slave Servers: NOPUSH

 Minimum UIDs and GIDs: MINUID and

Trang 54

4 Ypinit

Trang 55

Config client NIS

Trang 56

 Editing the /etc/yp.conf File

Trang 57

 Enabling and Starting ypbind

Trang 58

EDITING THE

/ETC/NSSWITCH.CONF

Trang 59

NIS working

Trang 60

Quản trị Linux

 Quản trị Linux trên LAN

 Mạng TCP/IP

 Cài đặt, quản lý các dịch vụ LAN

 Chia sẻ tài nguyên

 NFS, Máy in

 Samba

 Mail server: Sendmail, Postfix

 Web server: Apache

 Proxy

 Client- server VNC

 Nhập môn bảo mật

 IP table, công cụ ipchains

 Lập trình với shell script

Trang 61

Chia sẻ tài nguyên - NFS

 Network File System

 Client –server dùng chia sẻ các tệp giữa các hệthống Linux

Trang 62

Chia sẻ tài nguyên - NFS

 Cài đặt

 Server

 Gói APP nfsd (Fedora)

 Dùng rpm với đĩa cài đặt Linux (nếu là PC workstation)

 Xác định& khởi động tiến trình portmap dùng cho các RPC

Trang 63

ENABLING NFS IN FEDORA

Trang 65

NFS on Ubuntu

Trang 66

NFS - Cài đặt

 Tệp cấu hình /etc/exports

 Mô tả các tài nguyên cần chia sẻ

 Nội dung

 Mỗi tài nguyên: 1 dòng

 <Tên tài nguyên> <IP|tên PC client> (options)

 Tên tài nguyên

 Path đến thư mục, tên mô tả thiết bị (máy in)

 IP| tên PC client

 PC Client phải được phép truy cập hệ thống với /etc/hosts.allow

Trang 67

Chia sẻ tài nguyên – NFS - Cài đặt

Trang 69

exportfs

Trang 70

NFS server configuration utility

Trang 71

showmount Command

Trang 74

Chia sẻ tài nguyên - NFS

Trang 75

Chia sẻ tài nguyên - NFS

Trang 76

NFS Client

Trang 79

Chia sẻ tài nguyên – Máy in

 Dùng Printer Configurator

 Cài đặt máy in kiểu UNIX thay cho local

 Chỉ địa chỉ của remote printer (PC!printer)

 Tệp /etc/printcap

 Khai báo remote printer

 Option: rm=<IP|tên>:rp=tên máy in

 Máy in đã được khai báo

 Ví dụ

 Lw:\

 :lp=:rm=bean:rp=Hplaser:\

Trang 80

Chia sẻ tài nguyên – Samba

 App Client –Server

 Chia sẻ tài nguyên (tệp, máy in) giữa các hệ thống Windows

Trang 81

Chia sẻ tài nguyên – Samba

Trang 82

Chia sẻ tài nguyên – Samba

Trang 83

Chia sẻ tài nguyên – Samba

 Tệp /etc/samba/smb.conf

Trang 84

Chia sẻ tài nguyên – Samba

 Tệp /etc/samba/smb.conf

 Global

 Security: cấp độ bảo mật (thường dùng: user)

 Smb passwd file: nơi đặt file chứa thông tin password



 Path: Đ/c của thư mục chia sẻ

 Readonly | Writeable: (yes/no)

 Browseable: (yes/no) cho phép browse (không) thư mục

 Create mask: định nghĩa ATTR tệp được người dùng tạo

 Directory mode: định nghĩa ATTR thư mục được người dùng tạo

Trang 85

Chia sẻ tài nguyên – Samba

Trang 86

Chia sẻ tài nguyên – Samba

Trang 87

Selected Samba Commands

Trang 89

Remote access using mount

Trang 90

SMBFS

Trang 91

SMB users

Trang 92

A Basic Domain Member

 In smb.conf

 security = server

 password server = <NT Server Name>

 Part of an Active Directory

Network

 security = ads

Trang 93

Chia sẻ tài nguyên – Sendmail

Trang 94

Chia sẻ tài nguyên – Sendmail

 Cấu hình sendmail (sendmail.cf)

 Cấu hình trung gian với tệp /etc/mail/sendmail.mc

 Dùng macro m4 để sinh tệp sendmail.cf

 m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

 Khởi động lại sendmail

 /sbin/service sendmail restart

 Các tệp cấu hình trong /etc/mail

Trang 95

Chia sẻ tài nguyên – Sendmail

 Machine đóng vai trò gateway cho hệ thống mail

 Chứa trong tệp /etc/mail/local-hosts-names

 Ví dụ: PC mail.bigcorp.com là gw

Trang 96

Chia sẻ tài nguyên – Sendmail

 Các PC torgo, poodle, khai báo gw trong

sendmail.cf với option DM, DH

Trang 97

Chia sẻ tài nguyên – Sendmail

 Dùng mail với LDAP

 Lightweight Directory Access Protocol

 Tìm nhanh 1 user trên 1 domain rộng

 Với sendmail

 Dùng kết quả của LDAP trong xác định đ/c mail.

 Khởi động với sendmail LDAP

 Cài đặt & cấu hình đúng LDAP (OpenLDAP)

 Thêm vào sendmail.cf khai báo LDAP

Trang 98

Chia sẻ tài nguyên – Sendmail

Trang 99

Apache – Tổng quan

 Web server khả chuyển

 Trên nhiều OS khác nhau

 Trên Redhat - Linux

 Gói APP: apache.rpm

 Tác vụ

 Cài đặt apache server

 Khởi động web server

 Cấu hình apache server

Trang 100

Apache – Cài đặt server

Trang 101

Apache – Khởi động server

 Cấu hình với GUI

 System/ Apache Configurator

Trang 102

Apache – Cấu hình apache

Trang 103

Apache – Cấu hình httpd.conf

Trang 104

Apache – Cấu hình apache

 Các option

 ServerType

 Quy định cách khởi động apache

 Standalone: như 1 daemon độc lập

 Xinetd: qua xinetd

Trang 105

Apache – Cấu hình apache

 Allow (hay Deny)

 Định các client có (không) quyền truy cập

 </Directory>

Trang 106

Apache – Cấu hình apache

 Các khai báo

 Mô tả thư mục tương đối trong document Root

Trang 107

Apache – Cấu hình apache

 Các khai báo

 Mô tả host virtual

 <VirtualHost đ/c ip | host name>

Trang 108

Apache – Cấu hình apache

 Các khai báo

 Mô tả host virtual

Trang 109

Apache – Cấu hình apache

 access.conf

 Định nghĩa cách truy cập toàn cục cho người dùng

 Mỗi directory có thể định nghĩa kiểu riêng

 Dùng khi cần bảo mật doc với người dùng

Trang 110

Apache – Cấu hình apache

Trang 111

Virtual Network Computing

 Remote access với GUI

 Hai trường hợp dùng remote access

 Client – server có cùng OS (Linux)

 Một chức năng của Linux

 Ví dụ: start prog từ PC bean và hiển thị nó trên màn hình (default) của PC quang

 /prog –display quang:0

 Client –Serveur khác OS (Windows, Linux)

 Serveur: Linux

 Client: Windows

 Dùng VNC

Trang 113

VNC – Cài đặt & sử dụng Server

 Sửa đổi ~/.vnc/xstartup: chọn X env

 Startgnome hay startkde

Trang 114

VNC – Cài đặt & sử dụng Client

Trang 115

create database using mySQL

Trang 116

 Start

 using /etc/rc.d/init.d/mysql start

Trang 117

MySQL - working

 Logon

 mysql -u root mysql

 running server with mysqladmin command

 mysqladmin -u root version

 mysqladmin -u root password

newpassword

Trang 118

Working

Trang 120

Working – create database

Trang 121

Working – create table

Trang 122

Working – insert data

Trang 123

Configure MySQL for Websites

 review the list is with the following

command:

 cache search mysql | grep apache

Trang 124

MySQL

Trang 127

Administrator

Trang 129

Users

Trang 130

mysqladmin

Trang 131

Creating a Database

Trang 132

Create table

Trang 133

Insert data

Trang 134

MySQL Control Center

Trang 135

Connect to server

Ngày đăng: 20/04/2021, 01:59

TỪ KHÓA LIÊN QUAN

w