แสดงบทความที่มีป้ายกำกับ OS แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ OS แสดงบทความทั้งหมด

วันเสาร์ที่ 24 กันยายน พ.ศ. 2559

การใช้งานคำสั่งต่าง ๆ บน Windows ตรวจสอบระบบเครือข่าย

คำสั่งพื้นฐานในการตรวจสอบระบบเครือข่าย
คำสั่ง ping
  เป็นคำสั่งทดสอบการเชื่อมต่อเครือข่ายไปยังเครื่องคอมพิวเตอร์ปลายทาง
หมายเลขเครื่องปลายทางคือ 8.8.8.8 ก็พิมพ์ ping 8.8.8.8 หรือ ping www.google.com
#ถ้าขึ้นข้อความ Reply form... คือ เครื่องคอมพิวเตอร์ได้เชื่อมต่ออินเทอร์เน็ตแล้ว
#ถ้าขึ้นข้อความ Request timed out คือ เครื่องคอมพิวเตอร์ไม่เชื่อมต่ออินเทอร์เน็ต

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
            [-4] [-6] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP
                   Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
                   Per RFC 5095 the use of this routing header has been
                   deprecated. Some systems may drop echo requests if
                   this header is used.
    -S srcaddr     Source address to use.
    -c compartment Routing compartment identifier.
    -p             Ping a Hyper-V Network Virtualization provider address.
    -4             Force using IPv4.
    -6             Force using IPv6.

คำสั่ง ipconfig
  เป็นคำสั่งสำหรับการตรวจสอบหมายเลข IP Address ของเครื่องตัวเอง
มีพารามิเตอร์เพิ่มเติมที่น่าสนใจ เช่น /all จะแสดงรายละเอียดทั้งหมด ตั้งแต่ IP Address / Subnet Mask / Gateway / DNS ของเครื่องเรา

USAGE:
    ipconfig [/allcompartments] [/? | /all |
                                 /renew [adapter] | /release [adapter] |
                                 /renew6 [adapter] | /release6 [adapter] |
                                 /flushdns | /displaydns | /registerdns |
                                 /showclassid adapter |
                                 /setclassid adapter [classid] |
                                 /showclassid6 adapter |
                                 /setclassid6 adapter [classid] ]

where
    adapter             Connection name
                       (wildcard characters * and ? allowed, see examples)

    Options:
       /?               Display this help message
       /all             Display full configuration information.
       /release         Release the IPv4 address for the specified adapter.
       /release6        Release the IPv6 address for the specified adapter.
       /renew           Renew the IPv4 address for the specified adapter.
       /renew6          Renew the IPv6 address for the specified adapter.
       /flushdns        Purges the DNS Resolver cache.
       /registerdns     Refreshes all DHCP leases and re-registers DNS names
       /displaydns      Display the contents of the DNS Resolver Cache.
       /showclassid     Displays all the dhcp class IDs allowed for adapter.
       /setclassid      Modifies the dhcp class id.
       /showclassid6    Displays all the IPv6 DHCP class IDs allowed for adapter.
       /setclassid6     Modifies the IPv6 DHCP class id.


The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.

For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.

For Setclassid and Setclassid6, if no ClassId is specified, then the ClassId is removed.

Examples:
    > ipconfig                       ... Show information
    > ipconfig /all                  ... Show detailed information
    > ipconfig /renew                ... renew all adapters
    > ipconfig /renew EL*            ... renew any connection that has its
                                         name starting with EL
    > ipconfig /release *Con*        ... release all matching connections,
                                         eg. "Wired Ethernet Connection 1" or
                                             "Wired Ethernet Connection 2"
    > ipconfig /allcompartments      ... Show information about all
                                         compartments
    > ipconfig /allcompartments /all ... Show detailed information about all
                                         compartments

คำสั่ง net view
  เป็นคำสั่งที่ใช้สำหรับตรวจสอบระบบเครือข่ายในเวิร์กกรุ๊ปเดียวกัน ว่ามีเครื่องคอมพิวเตอร์เชื่อมอยู่ในวง ทั้งหมดกี่เครื่อง
ในกรณีที่ต้องการตรวจสอบเครื่องคอมพิวเตอร์ที่อยู่ต่างโดเมน หรือต่างเวิร์กกรุ๊ปกัน แต่อยู่บน Hub/Switch ตัวเดียวกัน ให้ใช้คำสั่ง net view/ชื่อ domain นั้น
และถ้าต้องการดูรายละเอียดทรัพยากรที่ต่อกับเครื่องคอมพิวเตอร์นั้น ก็พิมพ์ net view \\ชื่อคอมพิวเตอร์เครื่องนั้น

คำสั่ง tracert
  เป็นคำ tracert สั่งสำหรับตรวจสอบ ตามเส้นทางของแพ็กเก็จข้อมูลที่วิ่งไป ว่าผ่าน Router ตัวไหนบ้าง
สามารถตรวจสอบว่าคุณกำลังใช้งานอยู่บนเครื่องไหน IP Address อะไร
คำสั่ง tracert มีพารามิเตอร์ย่อยหลายตัว

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]
               [-R] [-S srcaddr] [-4] [-6] target_name

Options:
    -d                 Do not resolve addresses to hostnames.
    -h maximum_hops    Maximum number of hops to search for target.
    -j host-list       Loose source route along host-list (IPv4-only).
    -w timeout         Wait timeout milliseconds for each reply.
    -R                 Trace round-trip path (IPv6-only).
    -S srcaddr         Source address to use (IPv6-only).
    -4                 Force using IPv4.
    -6                 Force using IPv6.

คำสั่ง nslookup
  เป็นคำสั่งที่ใช้ทดสอบ DNS Server ที่เราใช้งานอยู่ สามารถตอบสนองการทำงาน หรือไม่
เมื่อพิมพ์เข้าไปแล้ว จะเป็นการเปิดคำสั่ง nslookup ทดสอบว่าโดเมนนี้ตรงกับหมายเลข IP Address อะไร และยังสามารถตรวจสอบได้ว่า DNS ที่คุณใช้งานอยู่ ยังบริการให้กับคุณอยู่หรือไม่

Usage:
   nslookup [-opt ...]             # interactive mode using default server
   nslookup [-opt ...] - server    # interactive mode using 'server'
   nslookup [-opt ...] host        # just look up 'host' using default server
   nslookup [-opt ...] host server # just look up 'host' using 'server'


สนับสนุนข้อมูลจาก powerclub-thailand

วันศุกร์ที่ 20 มีนาคม พ.ศ. 2558

เปิดหน้าเว็บ Airwave ไม่ได้

เว็บ Airwave ใช้งานไม่ได้ ทั้งที่เครื่อง server เปิดใช้งานอยู่


เข้าสู่ระบบทำการตรวจสอบการทำงาน
[root@1]# service pound status
pound is stopped
ตรวจสอบการทำงานของระบบ

[root@1]# service postgresql status
postmaster is stopped

[root@1]# service postgresql restart
Starting postgresql service:    [Failed]
postmaster dead but pid file exists

Cause : To get a better idea on why postgres is not starting we can check the pgsql log under /var/log

# cd /var/log
# less pgsql

Jan 15 10:24:06 rgppaws001 postgres[29137]: [1-2] LOCATION:  CreateLockFile, miscinit.c:919
Jan 15 10:24:52 rgppaws001 postgres[29256]: [1-1] FATAL:  53100: could not write lock file "/tmp/.s.PGSQL.5432.lock": No space left 
on device

The above message states that database is not able to write any more to /tmp/s.PGSQL.5432.lock since there is no space left in "/tmp"

We can do df -h to confirm the space.

Resolution : Clear up the old files in "/tmp" directory. We can use rm -rf command to clear files. Once we get free space under "/tmp" we can try restarting the postgres service.
[root@1 log]# service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]

[root@1]# service pound restart



ข้อมูลจาก http://community.arubanetworks.com

วันพุธที่ 4 มีนาคม พ.ศ. 2558

วิธีการตั้งค่า IP Address บน Linux CentOS

วิธีการตั้งค่า IP Address บน Linux CentOS
1. ตรวจสอบก่อนว่าเราจะกำหนด IP Address ใน Card LAN อันไหน เช่น eth0 ก็ให้ทำตั้งไฟล์ชื่อ ifcfg-eth0

nano /etc/sysconfig/network-scripts/ifcfg-eth0


DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
IPADDR=192.168.1.39
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1


2. ทำการ Restart Service network

/etc/init.d/network restart

เสร็จเรียบร้อยครับ

วันอังคารที่ 17 กุมภาพันธ์ พ.ศ. 2558

ลืมรหัสผ่าน root ของ CentOS Linux

หลายครั้งที่ admin ลืมหรือจำ รหัสผ่านเข้าเครื่องแม่ข่าย
แต่มีวิธีครับสำหรับ CentOS Linux
                                                   
>>  รีบู๊ตเครื่องเข้าระบบใหม่
>>> ตอนบู๊ตเข้าเครื่องกดปุ่ม Esc 1 ครั้ง
>>>>   เลือกเมนู กดปุ่ม e เพื่อเข้าหน้าคอนโซลลีนุกซ์
>>>>> เลื่อนลงมาที่บรรทัด kernel /vmlinuz-2.6.32-279.el6.x86_64 ro /root=/dev/mapper/...
>>>>>> กดปุ่ม e อีกครั้งเพื่อเข้าไปแก้ไขข้อมูล
>>>>>>> กดปุ่ม spacebar เว้นว่างหนึ่งครั้ง แล้วพิมพ์คำว่า single เสร็จแลดกดปุ่ม Enter
>>>>>>>> เลือกเมนู กดปุ่ม b เพื่อบู๊ตเข้าระบบแบบ Single Mode
>>>>>>>>> เข้าระบบแบบ Single mode สังเกตุจะเข้ามาถึงหน้าคอนโซลของ Root ( # )
ให้พิมพ์แก้รหัสผ่าน root ใม่ # passwd root [enter]
>>>>>>>>>> พิมพ์ reboot เพื่อรีบู๊ตเครื่องใหม่
>>>>>>>>>>> ทำการล็อกอินเข้าระบบด้วยรหัสผ่านใหม่


<<<<เสร็จเรียบร้อยครับ>>>>

วันจันทร์ที่ 3 มีนาคม พ.ศ. 2557

การติดตั้ง webmin ใน UBUNTU 12

การติดตั้ง web min ใน UBUNTU 12
1. เปิดเทอร์มินัลใช้คำสั่ง
    sudo nano /etc/apt/sources.list
 ใส่ sources ต่อท้ายที่บรรทัดสุดท้าย ดังนี้
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib