ตรวจสอบ package ว่ามีในเครื่องหรือไม่
#pkginfo -x | grep -i samba
SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client)
SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root)
SUNWsmbau samba - A Windows SMB/CIFS fileserver for UNIX (Usr)
หา path ของไฟล์ config
#pkgchk -l SUNWsmbar | grep conf-example
Pathname: /etc/samba/smb.conf-example
ตรวจสอบว่า...
วันศุกร์ที่ 8 พฤศจิกายน พ.ศ. 2556
วันพฤหัสบดีที่ 31 ตุลาคม พ.ศ. 2556
วันพฤหัสบดีที่ 3 ตุลาคม พ.ศ. 2556
build tftp (tftp-hpa) for solaris
Standard ปัญหาของ tftp ใน solaris 10 ที่ไม่สามารถ get หรือ put file ด้วย single command ได้เลยต้องไปหา tftp client แบบอื่นมาลง เคยได้ใช้ของ Red Hat ซึ่งมันก็โอเคก็เลยไปหามา มันชื่อ tftp-hpa ซึ่งวิธีการคอมไฟล์ก็ง่ายแสนง่าย ลองดูกันครับ
Download Source Code จาก
https://www.kernel.org/pub/software/network/tftp/tftp-hpa/
extract file ใช่คำสั่ง ./configure เพื่อสร้าง...
วันศุกร์ที่ 6 กันยายน พ.ศ. 2556
ติดตั้ง tftp server บน CentOS 6
Standard
yum install -y tftp-server
ไฟล์ config ของ tftp-server อยู่ที่
vi /etc/xinetd.d/tftp
ตัวอย่างไฟล์ config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn...
วันพฤหัสบดีที่ 1 สิงหาคม พ.ศ. 2556
การนำ image ของ raspberry pi ลงใน SD card (windows และ linux)
Standard
ช่วงนี้เวลาเขียนน้อยเลยมาเขียนเรื่องสั้นๆ ให้อ่านๆ กันครับ วิธีการนำ Image file ของ Raspberry Pi ลงใน SD card นั้นทั้งใน windows และ linux(ubuntu) นั้นค่อนข้างง่ายกดไม่กี่ปุ่ม หรือ พิมพ์ไม่กี่คำสั่งก็ได้แล้ว มาดูกันเลยครับ
Windows
โปรแกรมที่จำเป็นต้องใช้คือ Win32DiskImager ใช้ในการคัดลอกข้อมูลจาก...
วันพุธที่ 24 กรกฎาคม พ.ศ. 2556
การเปิด NTP Server บนเครื่อง windows server 2003
Standard
NTP Server คืออะไร NTP ย่อมาจาก Network Time Protocol หรือพูดง่ายๆ คือ Protocol ที่เกี่ยวกับเวลาที่ใช้สื่อสารกันใน Network เช่นในระบบมี Server หลายหลายตัว เป็น Web Server, Database Server หรือเครื่อง Client ถ้าหากต้องการที่จะให้เวลาทุกเครื่องเท่ากันหมด จะต้องมีเวลากลางที่ทุกๆ...
วันพฤหัสบดีที่ 18 กรกฎาคม พ.ศ. 2556
Qt 5.0 Programming IX : Anchor
Standard
ปัญหาใหญ่ๆ ของการออกแบบ GUI บนหน้าจอที่มีความละเอียดต่างกันก็คือเรื่องการจัด layout ถ้าเราวางตำแหน่งของ element ด้วยตำแหน่ง x และ y ถ้านำ application ไปรันบนเครื่องที่มีความละเอียดของหน้าจอที่ต่างกัน การแสดงผลก็จะสวยงาม ก็ต้องมาตามแก้ใช้ application ของเรารองรับในทุกๆ...
วันพุธที่ 17 กรกฎาคม พ.ศ. 2556
Qt 5.0 Programming VIII : Element FontLoader
Standard
จากโปรเจคแสดงจำนวนไลค์ในแฟนเพจ ที่เห็นใน Raspberry Pi 66 Club ก็เลยมีความคิดที่จะทำบ้างโดยใช้ RaspberryPi + QML และอยากจะทำให้มันแสดงผลตัวเลขออกมาในรูปขอตัวเลขแบบ Character LCD หรือไม่ก็ 7-Segment ซึ่งตอนแรกตั้งใจว่าจะใช้ภาพในการแสดงผล แต่ดูแล้วต้องการจัดการอีกเยอะ...
วันอังคารที่ 16 กรกฎาคม พ.ศ. 2556
install wget on OSX
Standard
พอดีมีเหตุให้ต้องใช้งานตัว wget ซึ่งใน OSX นั้นไม่ได้ติดตั้งมาให้ด้วย ก็ต้อง download source แล้วมา compile เอง ยังไม่มาลองดูวิธีกันครับ
download source file http://ftp.gnu.org/gnu/wget/ ซึ่งขณะที่ผมโหลดตอนนี้เป็น version 1.14
$tar -vxf wget-1.14.tar.gz
$cd...
วันศุกร์ที่ 12 กรกฎาคม พ.ศ. 2556
เริ่มต้นกับ Secure Shell (ssh) บน Raspberry pi
Standard
พอดีน้องที่มหา'ลัยกำลังเริ่มต้นกับ raspberry pi แล้วเค้าถามถึงการจะ remote ไปใช้งานผ่านทาง Secure Shell หรือที่คุ้นหูคือ ssh ว่าจะต้องทำอะไรยัง
แล้ว Secure Shell คืออะไร ? ผมเขียนคร่าวๆ แล้วกันนะครับ ส่วนลึกๆ สามารหาอ่านได้จาก...
วันพฤหัสบดีที่ 11 กรกฎาคม พ.ศ. 2556
Qt 5.0 Programming VII : Animation part II
Standard
วันนี้มาบอกเรื่องการใช้งาน Animation หลักๆ ใน QML กันครับโดยแบ่งเป็น 2 ส่วนหลักๆ คือ
การกำหนด Animation ให้กับ property ต่างๆ ของ element ซึ่งจะมีใช้งานหลักๆ มี 2 อย่างคือ
NumberAnimation ซึ่งส่วนนี้อยู่ในบทความในเรื่อง Animation part I แล้วขอไปกล่าวถึงครับ
PropertyAnimation...
วันพฤหัสบดีที่ 4 กรกฎาคม พ.ศ. 2556
warning C4996: 'sscanf': This function or variable may be unsafe
Standard
พอดีมีงานที่ต้องเขียน c บน windows แล้วใช้ sscanf พอ compile แล้วขึ้น warning
warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
ปกติเวลาผมเขียนโปรแกรมจะพยายามไม่ให้มี...
วันพุธที่ 3 กรกฎาคม พ.ศ. 2556
Raspberry Pi i/o ภาษาซี ด้วย lib BCM2835
Standard
การเขียน i/o ผ่าน pin ของ Raspberry Pi ผมใช้ library ภาษาซี จาก http://www.open.com.au/mikem/bcm2835/ โดย Core CPU ของ Raspberry Pi นั้นคือ chip Broadcom BCM2835 มาเริ่มกันเลยครับ
1.ขั้นแรกสร้าง folder เพื่อใช้เก็บ library และ source #mkdir /store#mkdir...
วันจันทร์ที่ 1 กรกฎาคม พ.ศ. 2556
Qt 5.0 Programming V : Element ID and Navigating the Objects Tree
Standard
QML นั้นสามารถกำหนดชื่อเรียกให้กับ element (element id, object id) ได้ ซึ่งช่วยให้เข้าถึง กำหนดค่าหรืออ้างอิงกับ element ต่างๆ ในไฟล์ QML นั้นได้ ซึ่งการกำหมด id นั้นมีรูปแบบคือ
...
Qt 5.0 Programming IV : QML + Javascript อะไรจะขนาดนั้น !!!
Standard
วันนี้จะมาแนะนำการใช้งาน javascript ร่วมกับ QML นะครับ ซึ่งตัว QML นั้นสามารถแทรก source code ของ javascript ลงไปด้วยได้ (อะไรจะขนาดนั้น !!!) สำหรับคนที่เขียน javascript คล่องๆ คงสบายมากๆ ลองมาดูตัวอย่างง่ายๆ ดูซัก 1 ตัวอย่างนะครั...
วันอาทิตย์ที่ 30 มิถุนายน พ.ศ. 2556
Qt 5.0 Programming III : Element Hierarchies
Standard
เรื่องลำดับการแสดงผลของ element ใน QML (Element Hierarchies) นั้นจะแสดงผลจากบนลงข้างล่างซึ่งถ้าหากไม่เข้าใจเรื่องจัดเรียงแล้วอาจจะทำให้เกิดการแสดงผลที่ผิดพลาดได้จากตัวอย่าง code นี้ครั...
วันเสาร์ที่ 29 มิถุนายน พ.ศ. 2556
วันศุกร์ที่ 28 มิถุนายน พ.ศ. 2556
Qt 5.0 Programming I : getting start with Qt 5.0
Standard
ก่อนจะมาเริ่มถึงการเขียน code เรามาคุยกันก่อนว่า Qt คืออะไรดีอย่างไรนะครับ Qt อ่านออกเสียงว่าคิวต์ (cute) จากที่ใช้มา อาทิตย์กว่าๆ เป็น tools ที่ใช้พัฒนา software บน OS อะไรก็ได้ ไม่ว่าจะเป็น OSX, Linux, Windows โดยที่เขียน source code ครั้งเดียว แล้วเราต้องการจะนำไปใช้กับระบบปฏิบัติการไหนก็นำ...
วันพฤหัสบดีที่ 27 มิถุนายน พ.ศ. 2556
Raspberry Pi "warning: Setting locale failed"
Standard
หากใครที่เพิ่งลง raspberry pi มาใหม่แล้วเจอ warning
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported...
Raspberry Pi setup Lan & WLan Interface
Standard
วิธีการตั้งค่า interface ของ raspberry pi ให้แก้ไขที่ไฟล์ etc/network/interfaces
$vi etc/network/interfa...
วันพุธที่ 26 มิถุนายน พ.ศ. 2556
Reading CPU Temperature of Raspberry Pi
Standard
Reading CPU Temperature of Raspberry Pi in file
/sys/class/thermal/thermal_zone0/temp
this file show in milli celsius (m˚C) unit, divide 1000 convert to ˚C
for example
44388 ÷ 1000 = 44.388 ˚C
Script for caculate in celsius unit
#!/bin/bash
temp=`cat /sys/class/thermal/thermal_zone0/temp`
real_temp=`bc...
วันอังคารที่ 25 มิถุนายน พ.ศ. 2556
FreeRADIUS config accounting log
Standard
การปรับแต่ง accounting log ตอนที่ user login เข้ามาที่ radius server โดยที่ไฟล์ config อยู่ที่
/etc/raddb/modules/detail
ค่า default ของ config file จะเป็น
detailfile = ${radacctdir}/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%...
วันจันทร์ที่ 24 มิถุนายน พ.ศ. 2556
วันเสาร์ที่ 25 พฤษภาคม พ.ศ. 2556
PiMyLib : PiMyLCD free library for Raspberry Pi + LCD16x2 + LCD5110
Standard
Library สำหรับเชื่อมต่อจอ GLCD5110 หรือ LCD แบบ 16x2 โดยออกแบบมาแน้นใช้งานได้ง่าย
โดยสามารถ Download Source Code ได้จาก Github : PiMyLi...
ทำ LED ไฟวิ่งด้วย Raspberry Pi
Standard
เห็นไฟดาวตกที่เป็นแถวๆ แล้ววิ่งแบบมีการหรี่ขณะวิ่งผมว่ามันสวยดีเลยลองสั่ง LED แบบแถว กะว่าเอามาลองทำเล่นดูบ้าง แต่อันนี้มีแค่ 10 ดวงเองดูสั้นๆ ยังไงก็ไม่รู้ 55...
วันพุธที่ 22 พฤษภาคม พ.ศ. 2556
nginx + php + oci8 on CentOS 6.4
Standard
1.Installation
1.1. download lasted repo
#wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
1.2. install new repo file
#rpm -Uvh remi-release-*.rpm epel-r...
วันจันทร์ที่ 20 พฤษภาคม พ.ศ. 2556
Human Computer Interface : Mirror Robot Control with Kinect
Standard
o Objectives
เป็นการประยุกต์ใช้ความรู้เกี่ยวกับการเขียนโปรแกรม Human-Computer Interface
o Design
· System Overview
ใช้หุ่นยนต์ RoboBuilder เป็น Hardware โดยหุ่น RoboBuilder ที่นำมาใช้...
วันอังคารที่ 9 เมษายน พ.ศ. 2556
Kinect Software Review
Standard
Kinect ที่พัฒนาโดย Microsoft สำหรับเครื่องเกมส์ XBox 360 และ Windows PCs ถูกสร้างขึ้นโดย
Rare
ซึ่งเป็นส่วนหนึ่งของ
Microsoft
Game Studio และใช้กล้องวัดระยะ
ซึ่งเป็น technology
ของ Israeli
developer และมีระบบติดตามการเคลื่อนไหวของร่างกาย
ซึ่งภายในตัว Kinect
จะประกอบไปด้วย
กล้อง...
วันพฤหัสบดีที่ 28 มีนาคม พ.ศ. 2556
CentOS : scp (secure copy) no password login
Standardสร้าง key ด้วยคำสั่ง ssh-keygen
#ssh-keygen -t dsa
copy key ไปที่เครื่อง remote-server ด้วยคำสั่ง
#ssh-copy-id -i /home/[user-name]/.ssh/id_dsa.pub [user-name]@[remote-server]
จากนั้นลอง copy file ไปที่ remote server ด้วยคำสั่ง
#scp [source-file] [user-name]@[remote-server]:[file-path]
หรือลอง ssh ด้วยคำสั่ง
#ssh [user-name]@[remote-server]
## FTP
curl -u ftpuser:ftpuser -T...
การติดตั้งและใช้งาน gSoap บน CentOS
Standardระบบปฎิบัติการที่ใช้ CentOS 6.2 และ gsoap version 2.7.16
1.download package : gsoap-2.7.16-3.el6.x86_64.rpm , gsoap-devel-2.7.16-3.el6.x86_64.rpm
2.install package
#rpm -i gsoap-2.7.16-3.el6.x86_64.rpm
#rpm -i gsoap-devel-2.7.16-3.el6.x86_64.rpm
โดย package ข้างต้นจะมีโปรแกรม wsdl2h ซึ่งใช้เปลี่ยน wsdl เป็น header file ของภาษา c (หรือ...
วันพุธที่ 20 มีนาคม พ.ศ. 2556
SPARC Enterprise T5440 Manage Hardware RAID Volume
Standard- Start to Single User Mode
#boot cdrom -s
-Determine name of RAID volume
#raidctl
-Delete volume
#raidctl -d [volume-name]
Ex raidctl -d c0t0d0
-Create RAID volume
#raidctl -c [primary] [secondary]
Ex #raidctl -c c0t0d0 c0t1d0
กรณีพิมพ์คำสั่ง Format ที่ Single User Mode แล้วไม่เจอ Disks ให้ลอง
ไปที่ OK Prompt แล้วใช้คำสั่ง probe-scsi-all
...
สมัครสมาชิก:
บทความ (Atom)