Package Management

  1. APT(Ubuntu's Advanced Packaging Tool)
  2. Aptitude

Ethernet

  • # vi /etc/network/interfaces
  • # man interfaces
  • # man resolver หรือ man resolv.conf ก็ได้

DHCP

  • # vi /etc/network/interfaces 
  • auto eth0
    iface eth0 inet dhcp
    • หมายถึง ให้เลือก eth0 โดยอัติโนมัติเมื่อเริ่มต้นระบบ(boot)
    • inet = IPv4 , inet6 = IPv6

Static IP

  1. ค้นหา ip address สังเกตุคำว่า “inet addr:158.108.213.126”
    $ ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 00:08:a1:91:08:a4  
              inet addr:158.108.213.126  Bcast:158.108.213.127  Mask:255.255.255.128
              inet6 addr: fe80::208:a1ff:fe91:8a4/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:130315 errors:0 dropped:0 overruns:0 frame:0
              TX packets:71707 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:40944583 (40.9 MB)  TX bytes:10263714 (10.2 MB)
              Interrupt:17 Base address:0x9000
  2. ค้นหา subnet mask และ gateway
    $ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    158.108.213.0   0.0.0.0         255.255.255.128 U     0      0        0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
    0.0.0.0         158.108.213.1   0.0.0.0         UG    100    0        0 eth0
  3. เปิดไฟล์ /etc/network/interfaces
    auto lo
    iface lo inet loopback
    iface eth0 inet static
    address 158.108.213.126
    netmask 255.255.255.128
    gateway 158.108.213.1
    auto eth0
    
  4. ระบุ DNS Server
    # vi /etc/resolv.conf
    domain thaigrid.or.th
    search thaigrid.or.th
    nameserver 158.108.2.67
    nameserver 158.108.2.70
    
  5. ทดสอบ
    dig www.google.com

Remote Administration

  • ลงโปรแกรม
    # aptitude install openssh-server openssh-client
  • ดูรายละเอียดการปรับแต่งไฟล์คอนฟิก /etc/ssh/sshd_config ที่
    # man sshd_config
  • เปลี่ยนเป็น Port 2222

SVN

Web Server

 
ubuntu_server_1.txt · Last modified: 2010/07/30 23:40 by klainfo · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki