137
Quản trị Linux Tổng quan – cài đặt HĐH Linux Làm việc với Linux Cấu hình hệ thống, thiết bị 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

Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Quản trị Linux

� Tổng quan – cài đặt HĐH Linux� Làm việc với Linux� Cấu hình hệ thống, thiết bị� 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

Page 2: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Mạng TCP/IP

� Interface cho NIC� Thiết lập interface� Thiết lập route� Danh mục Host� DNS� Các công cụ chuẩn đoán, kiểm tra

Page 3: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Interface cho NIC

� Tệp cấu hình� /etc/sysconfig/network(có thể thay đổi đ/c theo distro hay version)

� Dùng ifconfig (IP tĩnh)� CMD ifconfig� 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

Page 4: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Interface cho NIC - ifconfig

� Địa chỉ� /sbin/ifconfig

� Xem& cấu hình các interface� Xem

� ifconfig [interface] ; mặc định : tất cả interface đang active

� Cấu hình1. ifconfig interface IP netmask đ/c-mask broadcast đ/c-BC� Ví dụifconfig eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255

2. ifconfig interface <mô tả interface>ifconfig eth0 192.168.1.2/24

Page 5: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Interface cho NIC - ifconfig

� Thao tác trên các interface� Active

� ifconfig interface up

� DeActive� ifconfig interface down

� Hiển thị trạng thái� netstat –in ; i: trạng thái các interface, n: dạng số� Kết quả

� R: đã được cấu hình� B: Broadcast – capable� U: active� L: loopback

Page 6: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 7: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Ip command

Page 8: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

IP v6

Page 9: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

IP Aliasing

� single host to have multiple IP addresses� Each interface in Linux system can have multiple IP addresses assigned� Same Windows

� Ex� eth0 is the main interface, � eth0:0 is aliased interface, � eth0:1 is aliased interface, ..

Page 10: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

IP Aliasing

Page 11: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Route� Gateway

� Đường đi giao tiếp hệ thống với bên ngoài (LAN, iternet)� Cùng LAN

� Các PC có cùng gateway� Internet

� Dùng router

� Các kiểu route� Minimal

� Được thêm vào interface khi cấu hình NIC. Dùng trên LAN cố định� Static

� LAN có dùng router (liên lạc với LAN khác)� Dùng cmd route

� Dynamic� Dùng Routing Internet Protocol,…

Page 12: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Route - Minimal

� Hiển thị các route� Cmd: netstat –rn � Hay /sbin/route� Kết quả

� Destination� Đ/c mạng hay Host đích

� Gateway� Route

� Flags� U: up , G: gateway, H:host

� Interface� NIC

Page 13: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập Route - Static

� CMD route� Cấu hình bảng định tuyếnroute [option] [net|host|default] gw <IP> [interface]� Option

� Add: thêm, del: xóa (route)� Net

� -net <interface của net>: -net 192.168.100.0/24� -host <IP của host>� Default

� Route được xác định là route mặc định của hệ thống

� IP:� IP của route

� Interface: I kết hợp với NIC

Page 14: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Tệp cấu hình � /etc/sysconfig/static-routes

� Route cho LAN 0.0.0.0� Route default

� Kiểm tra� Route -n

Page 15: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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)

Page 16: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 17: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 18: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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.

Page 19: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

CIDR routing

Page 20: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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.

� For example� 2 entries 205.101.8.0/20, 205.101.0.0/21 be combined into

205.101.0.0/19

� Combining entries in routing tables not only saves space but also enhances speed of routers, � routers search among fewer addresses

Page 21: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DHCP

� DHCP� Cấp IP dynamic khi client kết nối đến hệ thống

� DHCP server� Kèm theo distro� Tên

� Dhcpd� Đ/c: /etc/init.d/dhcpd

� Tệp cấu hình� /etc/dhcpd.conf� Mô tả các subnet và group cho mạng LAN

Page 22: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Install

Page 23: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Install on ubuntusudo apt-get install dhcp3-server

Page 24: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Download & Installhttp://ftp.isc.org/isc/dhcp/dhcp-4.1.0a1.tar.gz

Page 25: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập DHCP

� DHCP server -/etc/dhcpd.conf

Page 26: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Dhcpd.conf

Page 27: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Common dhcpd.conf Options

Page 28: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Thiết lập DHCP client

� DHCP Client� Kèm theo distro Workstation� Tên

� Hay dhclient

Page 29: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DHCP client’s option

Page 30: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Danh mục host

� Định danh mục tên kết hợp với NIC� Tệp cấu hình

� /etc/hosts

� Kiểm tra� CMD hostname [-i]

Page 31: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS

� 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

Page 32: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS -resolve.conf

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

� nameserver� IP về server để DNS có thể dùng làm root

� search� Chuỗi domain làm đường dẫn tìm kiếm host

Page 33: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS -named.conf

� Cấu hình server DNS� Đ/c: /etc/named.conf

� Gồm� Tên, đ/c các tệp CSDL chứa thông tin cho DNS� Các khai báo

� Options� Các tuy chọn cấu hình toàn cục cho server & các giá trị default

� Zone� Các vùng tên miền của server

� Server� Định nghĩa các đặc tính của remote server

� Include� Bao hàm tệp CSDL khác

Page 34: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS -named.confThư 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

Page 35: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Domain & Zone

� Domains � designated along organizational boundaries.

� Single organization � separated into smaller administrative subdomains. � Each subdomain

� gets its own zone.

� All of zones collectively form entire domain.

Page 36: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Zone� example.org is a domain.

� Within it are subdomains � .engr.example.org, � .marketing.example.org, � .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.

Page 37: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Server

� 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.

� Secondary servers� backups & as load distributors for primary name servers.

� a site queries a secondary name server, secondary responds with authority.

Page 38: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Server

� Caching servers� contain no configuration files for any particular domain.

� Caching data� 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

Page 39: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS -named.conf

Tệp named.exemple.frTên của PC dùng làm server của zone

Page 40: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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)

Page 41: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS –Các tệp named� Các ghi chú trong named reverse

� SOA� Tham số cho toàn zone

� NS� Name server

� A� Tên -> IP

� PTR� IP-> tên

� MX� Mail server

� CNAME� Alias cho tên

Page 42: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS –Các tệp named

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

Page 43: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS –khởi động� Tệp /etc/rc.d/init.d/named

� Tham số� Start� Stop

� Kiểm tra trạng thái� Ndc

� Status� Start� Restart

� Công cụ tìm tên� Nslookup

� Nslookup [tên]

Page 44: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

DNS –công cụ GUI

� Kèm theo distro� Tên

� DNS config

� Khởi động� System/bind config

Page 45: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Ping� Kiểm tra thông mạng giữa các PC, LAN� Ping <machine|IP đích>

� Nslookup� Kiểm tra DNS

� Traceroute� Traceroute <host | NET>� Hiển thị lộ trình đi đến 1 host hay LAN đích

Page 46: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS

Page 47: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS

Page 48: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS server

Page 49: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS server- install

Page 50: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS install

Page 51: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

1. Domain name

Page 52: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Start NIS

Page 53: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Edit makefile

� Designating Slave Servers: NOPUSH� Minimum UIDs and GIDs: MINUID and MINGID

� Merging Shadow Passwords with Real Passwords: MERGE_PASSWD

� Merging Group Shadow Passwords with Real Groups: MERGE_GROUP

� Designating Filenames� What Gets Shared: The all Entry

Page 54: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

4. Ypinit

Page 55: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Config client NIS

Page 56: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS

� Editing the /etc/yp.conf File

Page 57: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS

� Enabling and Starting ypbind

Page 58: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

EDITING THE /ETC/NSSWITCH.CONF

Page 59: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NIS working

Page 60: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 61: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Cài đặt� Khởi động server� Client

� Kích hoạt & dùng thư mục chia sẻ

Page 62: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� /etc/rc.d/init.d/portmap

� Gói APP trên debian: nfs-user-server

� Client� Khởi động mount với option –V

� Mount –V

Page 63: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

ENABLING NFS IN FEDORA

Page 64: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

ENABLING NFS IN FEDORA

Page 65: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS on Ubuntu

Page 66: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 67: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Tệp cấu hình /etc/exports� Nội dung

� Options� Ro: read only� Rw: read&write� No_root_squash

� Client truy cập với root sẽ được xác định như root (default: ngược lại)

� Ví dụ� /home/share/ 192.168.1.2(rw) 192.168.32.2(ro)

Page 68: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS
Page 69: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

exportfs

Page 70: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS server configuration utility

Page 71: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

showmount Command

Page 72: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS - Cài đặt

� Tệp cấu hình /etc/hosts.deny� Cấm những client (không được phép trong hosts.allow) truy cập vào daemon hệ thống

� Nội dung� Daemon (ALL) : ALL| danh sách IP(tên) client

� Ví dụ� portmap: 192.168.32.2� lockd: 192.168.32.2� rquotad: 192.168.32.2� mountd: 192.168.32.2� statd:192.168.32.2

Page 73: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS - Cài đặt

� Tệp cấu hình /etc/hosts.allow� Cho phép các client truy cập vào daemon hệ thống � Nội dung

� Daemon (ALL) : ALL| danh sách IP(tên) client

� Ví dụ� portmap: 192.168.32.2� lockd: 192.168.32.2� rquotad: 192.168.32.2� mountd: 192.168.32.2� statd:192.168.32.2

Page 74: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên - NFS

� Khởi động server� Gọi daemon nfs

� /etc/rc.d/init.d/nfs start

� Stop� Option stop

� Đọc lại /etc/exports� Option reload� CMD exportfs

� Kiểm tra trạng thái� Rpcinfo -p

Page 75: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên - NFS

� Client� Mount

� Mount IP|tên client:/tên thư mục <mount point>

� Chú ý� Quyền truy cập của thư mục phải được định nghĩa lại với nhóm other.

� Ví dụ� Mount 192.168.1.1:/home/share /mnt/share

Page 76: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS Client

Page 77: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS Client

Page 78: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

NFS Client

Page 79: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� GUI� 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:\

Page 80: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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 Linux-

Windows

� Daemon cơ sở� NETBios

� Giao thức chia sẻ tài nguyên giữa các hệ thống Windows� Smbd

� Daemon chính của samba� Nmbd

� Domain Name server của NetBIOS. Đảm bảo tương ứng IP và đ/c NETBios

Page 81: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Samba

� Cài đặt server� Gói APP

� Samba version 2.0. Web site: www.samba.org� Dùng rpm

� Rpm – ivh samba-2.0.5a-3mdk.i586.rpm

� Cấu hình� Tệp cấu hình /etc/samba/smb.conf� SWAT

� Khởi động� /etc/rc.d/init.d/samba start

� Kiểm tra� /etc/rc.d/init.d/samba status

Page 82: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Samba

� Tệp /etc/samba/smb.conf� Gồm nhiều section

� Global� Các thông số cấu hình chung cho server Samba

� Homes� Mô tả thư mục cần chia sẻ

� Printers� Mô tả máy in cần chia sẻ

Page 83: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Samba

� Tệp /etc/samba/smb.conf

Page 84: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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� ..

� Homes� 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

Page 85: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Samba

� Chia sẻ thư mục� [dospc]

� Comment = Documentation PC� Path = /usr/doc/dospc� Browseable = yes� Writeable = no� Public = yes // Quyền truy cập : ALL

� [research]� Comment = Research dept’s shared document� Path = /home/research� Browseable = no� Writeable = yes� Create mode = 0750� Host allow = bean, xavier

Page 86: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Samba� Chia sẻ máy in

� [printers]� Comment = All shared printers� Path = /var/spool/samba� Browseable = no� Guest ok = no� writeable = no � Printable = yes

� [HP4]� Comment = Laser HP 4� Path = /var/spool/samba� public = no� Create mode = 0700� Printable = yes� Printer = lp

Page 87: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Selected Samba Commands

Page 88: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS
Page 89: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Remote access using mount

Page 90: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

SMBFS

Page 91: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

SMB users

Page 92: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

A Basic Domain Member

� In smb.conf� security = server� password server = <NT Server Name>

� Part of an Active Directory Network

� security = ads

Page 93: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Sendmail

� Client-Server� Nhận gởi mail giữa các hệ thống

� Server� Gói APP: sendmail. Đ/c /usr/sbin� Tệp cấu hình /etc/sendmail.cf

� Client� Daemon

� IMAP: imapd (/usr/share/)

� Sendmail agent� /etc/rc.d/init.d/sendmail

Page 94: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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� Domaintable

� Tên miền mail

� Local-hosts-name� Các alias cho machine

Page 95: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Sendmail

� Mask� 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

Page 96: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Sendmail

� Mask� Các PC torgo, poodle,.. khai báo gw trong sendmail.cf với option DM, DH

Page 97: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 98: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Chia sẻ tài nguyên – Sendmail

� Fetchmail� Kết nối & lấy mail từ remote server về MUA� Gồm POP3 và IMAP� Gói APP: fetchmail� Cấu hình

Page 99: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 100: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cài đặt server

� Dùng rpm� Rpm –ivh apache.rpm

� Các thư mục� /etc/httpd/conf

� Chứa các tệp cấu hình

� /etc/rc.d� Chứa tệp script khởi động server

� /home/httpd� Các tệp tài liệu, script của server

Page 101: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Khởi động server

� Khởi động� Gọi daemond httpd

� /etc/rc.d/initd.d/httpd start

� Kiểm tra� Mở 1 web browser� Mở trang: http://localhost.domain :8080

� Stop� /etc/rc.d/initd.d/httpd stop

� Cấu hình với GUI� System/ Apache Configurator

Page 102: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� Các tệp cấu hình� httpd.conf

� Cấu hình cách thực hiện server

� access.conf� Mô tả người dùng truy cập server

� srm.conf� Mô tả CSSDL tài liệu của server

Page 103: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình httpd.conf

Page 104: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� ServerRoot� Đ/c đến root của server

� DocumentRoot� Đ/c đến CSDL root của server

Page 105: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� Các khai báo� Mô tả thư mục tương đối trong document Root

� <Directory> � Options

� Định nghĩa các option cho thư mục� AllowOverride

� Cách thức sinh tệp .htaccess của thư mục� Order

� Thứ tự áp dụng allow deny� Allow (hay Deny)

� Định các client có (không) quyền truy cập� </Directory>

Page 106: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� Các khai báo� Mô tả thư mục tương đối trong document Root

Page 107: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� Các khai báo� Mô tả host virtual

� <VirtualHost đ/c ip | host name> � ServerAdmin

� Đ/c mail của admin� DocumentRoot

� Thư mục root của host� ServerName

� Tên domain kết hợp với host� ErrorLog

� Định file log của host� </VirtualHost>

Page 108: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� Các khai báo� Mô tả host virtual

Page 109: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 110: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Apache – Cấu hình apache

� srm.conf� Cấu hình tài nguyên của site� UserDir

� Đ/c của thư mục tương đối với Root

� DocumentRoot� Đ/c của cây tài liệu

Page 111: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

Page 112: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

VNC – Cài đặt

� Gói APP� Distro Redhat vnr.rpm� Download

� www.uk.research.att.com/vnc/download.html

� Cài đặt� Dùng rpm� Chú ý

� Không đặt vnc như service khởi động auto

Page 113: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Cài đặt� Gói vncserver.rpm

� Khởi động� Gọi daemon vncserver

� Vncserver� 1 số ID được trả về cho người dùng: X

� Ngưng� Vncserver –kill :X

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

� Startgnome hay startkde

Page 114: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

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

� Cài đặt� Gói vnc.rpm

� Khởi động� Gọi daemon vncviewer

� vncviewer� Vào tên server: X

� Ngưng� Tương tự X env khác

Page 115: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

create database using mySQL

� MySQL � Open Source,

� www.mysql.com� install

� MySQL-server-4.0.14.i386.rpm.� MySQL-client-<version>.<architecture>.rpm.� MySQL-shared-<version>.<architecture>.rpm,� MySQL-devel-<version>.<architecture>.rpm.

Page 116: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

MySQL

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

Page 117: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

MySQL - working

� Logon� mysql -u root mysql

� running server with mysqladmin command� mysqladmin -u root version� mysqladmin -u root password newpassword

Page 118: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Working

Page 119: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Working

Page 120: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Working – create database

Page 121: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Working – create table

Page 122: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Working – insert data

Page 123: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Configure MySQL for Websites

� review the list is with the following command:� cache search mysql | grep apache

Page 124: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

MySQL

Page 125: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS
Page 126: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

MySQL

Page 127: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Administrator

Page 128: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS
Page 129: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Users

Page 130: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

mysqladmin

Page 131: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Creating a Database

Page 132: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Create table

Page 133: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Insert data

Page 134: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

MySQL Control Center

Page 135: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Connect to server

Page 136: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Connect to server

Page 137: Quản trịLinux - hoacuong.files.wordpress.com · Lập trình với shell script. Mạng TCP/IP Interface cho NIC Thiết lập interface Thiết lập route Danh mục Host DNS

Connect to server