<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SpaLinux.com &#187; solaris 10</title>
	<atom:link href="http://spalinux.com/tag/solaris-10/feed" rel="self" type="application/rss+xml" />
	<link>http://spalinux.com</link>
	<description>Resources for Relaxing Linux System Administrators</description>
	<lastBuildDate>Sat, 21 Jan 2012 16:07:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>คอนฟิก SNMP บน Solaris 10</title>
		<link>http://spalinux.com/2010/07/configure_snmp_on_solaris_10</link>
		<comments>http://spalinux.com/2010/07/configure_snmp_on_solaris_10#comments</comments>
		<pubDate>Sat, 17 Jul 2010 07:36:11 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1132</guid>
		<description><![CDATA[SNMP เป็นเครื่องมือหนึ่งที่สามารถใช้ดูการทำงานของเครื่อง เก็บประวัติการใช้ resource ต่างๆ ของเครื่อง ไม่ว่าจะเป็น CPU, Memory, Disk, Network แล้วสามารถนำมาใช้สร้างเป็นกราฟ รายงาน เพื่อวางแผนการเพิ่ม hardware เมื่อจำเป็นได้ ในบทความนี้จะอธิบายวิธีการคอนฟิกและรัน SNMP Server บน Solaris 10 เพื่อให้สามารถใช้โปรแกรม SNMP เช่น MRTG, Cacti, NMS  มาเก็บค่าต่างๆ ได้ ระบบทดสอบ บทความนี้ทดสอบบน Solaris 10 (x86) 10/09 # cat /etc/release                        Solaris 10 10/09 s10x_u8wos_08a X86            Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.                         [...]]]></description>
			<content:encoded><![CDATA[<p>SNMP เป็นเครื่องมือหนึ่งที่สามารถใช้ดูการทำงานของเครื่อง เก็บประวัติการใช้ resource ต่างๆ ของเครื่อง ไม่ว่าจะเป็น CPU, Memory, Disk, Network แล้วสามารถนำมาใช้สร้างเป็นกราฟ รายงาน เพื่อวางแผนการเพิ่ม hardware เมื่อจำเป็นได้</p>
<p>ในบทความนี้จะอธิบายวิธีการคอนฟิกและรัน SNMP Server บน Solaris 10 เพื่อให้สามารถใช้โปรแกรม SNMP เช่น MRTG, Cacti, NMS  มาเก็บค่าต่างๆ ได้</p>
<p><span id="more-1132"></span></p>
<h4>ระบบทดสอบ</h4>
<p>บทความนี้ทดสอบบน Solaris 10 (x86) 10/09</p>
<pre># <strong>cat /etc/release
</strong>                       Solaris 10 10/09 s10x_u8wos_08a X86
           Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 16 September 2009</pre>
<h4>รันเซอร์วิส sma</h4>
<p>โปรแกรมชุด SNMP หรือ System Management Agent ใน Solaris 10 ได้มาจาก Net-SNMP ซึ่งเป็น freeware โดยจะถูกติดตั้งใน path ที่ชื่อ /usr/sfw/ ดังนี้น เวลารันคำสั่ง อาจต้องมีการระบุ PATH เพิ่มเติม</p>
<p>System Management Agent บน Solaris 10 ถูกควบคุมด้วยเซอร์วิสที่ชื่อ sma</p>
<p>ใช้คำสั่ง svcs เพื่อตรวจสอบว่ารันเซอร์วิส sma อยู่หรือไม่</p>
<pre># <strong>svcs -a | grep sma
</strong>disabled       13:50:30 svc:/application/management/sma:default</pre>
<p>หมายเหตุ ต้องระบุออปชั่น &#8216;-a&#8217; เพื่อดูชื่อเซอร์วิสทั้งหมด ทั้งที่ enable และ disable ไว้</p>
<p>ไฟล์คอนฟิกของ SNMP Server คือ /etc/sma/snmp/snmpd.conf</p>
<pre># <strong>cat /etc/sma/snmp/snmpd.conf
</strong>...
###########################################################################
#
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.</pre>
<pre># rocommunity: a SNMPv1/SNMPv2c read-only access community name
#   arguments:  community [default|hostname|network/bits] [oid]</pre>
<pre>rocommunity  public
...</pre>
<p>ดีฟอลต์ SNMP Community String แบบ read-only คือ &#8220;public&#8221; แนะนำให้เปลี่ยน เช่นเปลี่ยนเป็น &#8220;test_public_read&#8221;</p>
<pre># <strong>cat /etc/sma/snmp/snmpd.conf
</strong>...
rocommunity  <strong>test_public_read
</strong>...</pre>
<p>ใช้คำสั่ง svcadm เพื่อรันเซอร์วิส sma</p>
<pre># <strong>svcadm enable svc:/application/management/sma:default</strong></pre>
<pre># <strong>svcs -a  | grep sma
</strong>online         14:18:37 svc:/application/management/sma:default</pre>
<p>ใช้คำสั่ง ps เพื่อตรวจสอบ process ของ snmpd (SNMP Server)</p>
<pre># <strong>ps -ef | grep snmp
</strong>    root  1008     1   0 14:18:38 ?           0:00 /usr/sfw/sbin/snmpd</pre>
<p>ทดลองใช้คำสั่ง snmpwalk เพื่อ walk ค่าต่างๆ ผ่านทาง SNMP</p>
<pre># <strong>/usr/sfw/bin/snmpwalk -v 1 -c test_public_read 127.0.0.1 system
</strong>SNMPv2-MIB::sysDescr.0 = STRING: SunOS sol10u8-zfs64a 5.10 Generic_141445-09 i86pc
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.3
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (12062) 0:02:00.62
SNMPv2-MIB::sysContact.0 = STRING: "System administrator"
SNMPv2-MIB::sysName.0 = STRING: sol10u8-zfs64a
SNMPv2-MIB::sysLocation.0 = STRING: "System administrators office"
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (64) 0:00:00.64
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
...</pre>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://docs.sun.com/app/docs/doc/817-3000/introduction-1?l=en&amp;a=view" target="_blank">Solaris System Management Agent Administration Guide</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2010/07/configure_snmp_on_solaris_10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>คอนฟิก Solaris IP Filter</title>
		<link>http://spalinux.com/2010/05/configure_solaris_ip_filter</link>
		<comments>http://spalinux.com/2010/05/configure_solaris_ip_filter#comments</comments>
		<pubDate>Sat, 22 May 2010 08:46:27 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[ip filter]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1104</guid>
		<description><![CDATA[บทความนี้กล่าวถึงวิธีการใช้คำสั่ง ipf เพื่อสร้าง rule ของ Solaris IP Filter แบบง่ายๆ เพื่อใช้กำหนด packet เข้าออกเครื่อง Solaris IP Filter เป็นโปรแกรม Firewall ที่ควบคุม packet เข้า/ออก เครื่องที่ติดตั้ง Solaris ได้ ipf เป็นคำสั่งที่ใช้ในการแก้ไขกฎ (rule) ของ Solaris IP Filter หมายเหตุ ตัวอย่างในบทความนี้ทดสอบบนเครื่องที่ติดตั้ง Solaris 10 10/09 s10x_u8wos_08a X86 ทดสอบกับเครื่องที่สามารถคอนโซลหน้าจอได้เท่านั้น เพราะถ้าคอนฟิก rule ของ Firewall ผิดพลาด อาจทำให้คุณไม่สามารถ remote เช่น Secure Shell ได้ 1. เปิด (Start) เซอร์วิส ipfilter โดยดีฟอลต์จากการติดตั้ง [...]]]></description>
			<content:encoded><![CDATA[<p>บทความนี้กล่าวถึงวิธีการใช้คำสั่ง ipf เพื่อสร้าง rule ของ Solaris IP Filter แบบง่ายๆ เพื่อใช้กำหนด packet เข้าออกเครื่อง</p>
<p><span id="more-1104"></span></p>
<p>Solaris IP Filter เป็นโปรแกรม Firewall ที่ควบคุม packet เข้า/ออก เครื่องที่ติดตั้ง Solaris ได้</p>
<p>ipf เป็นคำสั่งที่ใช้ในการแก้ไขกฎ (rule) ของ Solaris IP Filter</p>
<p>หมายเหตุ</p>
<ul>
<li>ตัวอย่างในบทความนี้ทดสอบบนเครื่องที่ติดตั้ง Solaris 10 10/09 s10x_u8wos_08a X86</li>
<li>ทดสอบกับเครื่องที่สามารถคอนโซลหน้าจอได้เท่านั้น เพราะถ้าคอนฟิก rule ของ Firewall ผิดพลาด อาจทำให้คุณไม่สามารถ remote เช่น Secure Shell ได้</li>
</ul>
<h4>1. เปิด (Start) เซอร์วิส ipfilter</h4>
<p>โดยดีฟอลต์จากการติดตั้ง เซอร์วิส IP Filter จะถูกปิดการใช้งาน</p>
<p>ใช้คำสั่ง svcs ตรวจสอบสถานะ</p>
<pre># <strong>svcs -av | grep ipfilter
</strong>disabled       -             15:25:36      - svc:/network/ipfilter:default</pre>
<p>ใช้คำสั่ง svcadm เพื่อเปิดการเซอร์วิส</p>
<pre># <strong>svcadm enable ipfilter</strong></pre>
<pre># <strong>svcs -av | grep ipfilter
</strong>online         -             15:27:14      - svc:/network/ipfilter:default</pre>
<h4>2. เปิดคุณสมบัติ (Enable) IP Filter</h4>
<p>ขั้นต่อมา ใช้คำสั่ง ipf -E เพื่อเปิดคุณสมบัติ IP Filter</p>
<pre># <strong>ipf -E</strong></pre>
<h4>3. ทดลองการสร้าง rule แบบง่ายๆ</h4>
<p>สร้างไฟล์ /etc/ipf/ipf.conf เพื่อกำหนด rule ที่ต้องการ</p>
<p>ตัวอย่างเช่น ต้องการสร้าง rule เพื่อกำหนดให้เฉพาะเครื่องที่มี IP 192.168.1.2 เท่านั้นที่สามารถ ping (ICMP) เข้ามาที่เครื่องทางพอร์ต e1000g0 ได้</p>
<pre># <strong>cat /etc/ipf/ipf.conf</strong></pre>
<pre>block in on e1000g0 proto icmp from any to any
pass in on e1000g0 proto icmp from 192.168.1.2/32 to any</pre>
<p>หลังจากสร้างไฟล์เรียบร้อย พิมพ์คำสั่ง ipf -f ตามด้วยไฟล์ ipf.conf เพื่อเริ่มการบังคับใช้ rule ที่สร้างขึ้น</p>
<pre># <strong>ipf -f /etc/ipf/ipf.conf</strong></pre>
<p>*** 4. ลบ (Flush) rule ออกไป ***</p>
<p>หากต้องการยกเลิก rule ที่สร้างขึ้น ใช้คำสั่ง ipf -F เพื่อ ลบ (flush) rule ที่มีออกไป</p>
<pre># <strong>ipf -F a</strong></pre>
<h4>5. ปิดคุณสมบัติ (Disable) IP Filter</h4>
<p>ใช้คำสั่ง ipf -D เพื่อปิดคุณสมบัติ IP Filter</p>
<pre># <strong>ipf -D</strong></pre>
<h4>ตัวอย่าง rule</h4>
<p>มีตัวอย่างการสร้างไฟล์ ipf.conf เพื่อกำหนด rule แบบต่างๆ /usr/share/ipfilter/examples/</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li>man ipf</li>
<li><a href="http://docs.sun.com/app/docs/doc/816-4554/eupsq?l=en&amp;a=view" target="_blank">System Administration Guide: Solaris IP Filter (Overview)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2010/05/configure_solaris_ip_filter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>เพิ่มดิสก์ใหม่บน Solaris 10</title>
		<link>http://spalinux.com/2010/03/add_new_disk_on_solaris_10</link>
		<comments>http://spalinux.com/2010/03/add_new_disk_on_solaris_10#comments</comments>
		<pubDate>Sun, 07 Mar 2010 16:02:40 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Disk]]></category>
		<category><![CDATA[Filesystem]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1100</guid>
		<description><![CDATA[เช่นเดียวกับระบบปฏิบัติการ OS อื่นๆ เมื่อมีการเพิ่มดิสก์ก้อนใหม่เข้าไปในเครื่องที่ติดตั้ง Solaris 10 ต้องมีกระบวนการ หรือต้องรันคำสั่งก่อนที่จะเริ่มใช้ดิสก์ก้อนใหม่ได้ ในบทความนี้ทดสอบการเพิ่มดิสก์ก้อนใหม่ 1 ก้อน บน Solaris 10 (x86) ใช้คำสั่ง format เพื่อดูว่า Solaris มองเห็นดิสก์อะไรบ้าง # format Searching for disks...done AVAILABLE DISK SELECTIONS:        0. c1t0d0 &#60;DEFAULT cyl 4866 alt 2 hd 255 sec 63&#62;           /pci@0,0/pci1000,30@10/sd@0,0        1. c1t1d0 &#60;DEFAULT cyl 4867 alt 2 hd 255 sec 63&#62;           [...]]]></description>
			<content:encoded><![CDATA[<p>เช่นเดียวกับระบบปฏิบัติการ OS อื่นๆ เมื่อมีการเพิ่มดิสก์ก้อนใหม่เข้าไปในเครื่องที่ติดตั้ง Solaris 10 ต้องมีกระบวนการ หรือต้องรันคำสั่งก่อนที่จะเริ่มใช้ดิสก์ก้อนใหม่ได้</p>
<p><span id="more-1100"></span></p>
<p>ในบทความนี้ทดสอบการเพิ่มดิสก์ก้อนใหม่ 1 ก้อน บน Solaris 10 (x86)</p>
<p>ใช้คำสั่ง format เพื่อดูว่า Solaris มองเห็นดิสก์อะไรบ้าง</p>
<pre># <strong>format</strong>
Searching for disks...done</pre>
<pre>AVAILABLE DISK SELECTIONS:
       0. c1t0d0 &lt;DEFAULT cyl 4866 alt 2 hd 255 sec 63&gt;
          <a>/pci@0,0/pci1000,30@10/sd@0,0</a>
       <span style="color: #0000ff;"><strong>1. c1t1d0</strong></span> &lt;DEFAULT cyl 4867 alt 2 hd 255 sec 63&gt;
          <a>/pci@0,0/pci1000,30@10/sd@1,0</a>
Specify disk (enter its number):</pre>
<p>ดิสก์ก้อนใหม่ที่เพิ่มเข้ามาคือดิสก์หมายเลข 1 &#8220;c1t1d0&#8243;</p>
<p>พิมพ์หมายเลขของดิสก์แล้วกด [Enter] เพื่อเข้าสู่โหมดจัดการของดิสก์ก้อนที่ระบุ</p>
<pre>Specify disk (enter its number): <strong>1</strong>
selecting c1t1d0
[disk formatted]</pre>
<pre>FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !&lt;cmd&gt;     - execute &lt;cmd&gt;, then return
        quit</pre>
<p>พิมพ์คำสั่ง partition เพื่อเข้าสู่โหมดการแบ่ง partition</p>
<pre>format&gt; <strong>partition</strong>
<span style="color: #ff0000;">WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.</span></pre>
<p>หากเจอข้อความ WARNING แบบด้านบน ให้พิมพ์คำสั่ง fdisk เพื่อแก้ไข</p>
<pre>format&gt; <strong>fdisk</strong>
No fdisk table exists. The default partition for the disk is:</pre>
<pre>  a 100% "SOLARIS System" partition</pre>
<pre>Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
<strong>y</strong>
format&gt;</pre>
<p>พิมพ์คำสั่ง partition อีกครั้ง</p>
<pre>format&gt; <strong>partition</strong></pre>
<pre>PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        !&lt;cmd&gt; - execute &lt;cmd&gt;, then return
        quit
partition&gt;</pre>
<p>พิมพ์คำสั่ง print เพื่อแสดงการแบ่ง partition</p>
<pre>partition&gt; <strong>print</strong>
Current partition table (original):
Total disk cylinders available: 4866 + 2 (reserved cylinders)</pre>
<pre>Part      Tag    Flag     Cylinders        Size            Blocks
<span style="color: #0000ff;">  0 unassigned    wm       0               0         (0/0/0)           0
</span>  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wu       0 - 4865       37.28GB    (4866/0/0) 78172290
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0</pre>
<pre>partition&gt;</pre>
<p>เริ่มต้น ทดลองสร้าง partition 0 มีขนาด 10 GB</p>
<pre>partition&gt; <strong>0</strong>
Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)           0</pre>
<pre>Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: <strong>10gb</strong></pre>
<p>ใช้คำสั่ง print เพื่อแสดง partition</p>
<pre>partition&gt; <strong>print</strong>
Current partition table (unnamed):
Total disk cylinders available: 4866 + 2 (reserved cylinders)</pre>
<pre>Part      Tag    Flag     Cylinders        Size            Blocks
<span style="color: #0000ff;">  0 unassigned    wm       0 - 1305       10.00GB    (1306/0/0) 20980890
</span>  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wu       0 - 4865       37.28GB    (4866/0/0) 78172290
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0</pre>
<p>หลังจากแก้ไข partition พิมพ์คำสั่ง label เพื่อบันทึกข้อมูลลงดิสก์</p>
<pre>partition&gt; <strong>label</strong>
Ready to label disk, continue? <strong>y</strong></pre>
<pre>partition&gt; <strong>^D</strong></pre>
<p>กดปุ่ม [Ctrl]+[D] เพื่อออกจากคำสั่ง format</p>
<p>ใช้คำสั่ง newfs เพื่อสร้าง filesystem บน partition ที่เพิ่งสร้างขึ้น</p>
<p>หมายเหตุ ชื่อไฟล์ device ของดิสก์ c1t1d0 &#8211; partition 0 คือ /dev/rdsk/c1t1d0s0</p>
<pre># <strong>newfs /dev/rdsk/c1t1d0s0
</strong>newfs: construct a new file system /dev/rdsk/c1t1d0s0: (y/n)? y
Warning: 870 sector(s) in last cylinder unallocated
/dev/rdsk/c1t1d0s0:     20980890 sectors in 3415 cylinders of 48 tracks, 128 sectors
        10244.6MB in 214 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
 20055584, 20154016, 20252448, 20350880, 20449312, 20547744, 20646176,
 20744608, 20843040, 20941472</pre>
<p>แนะนำให้ใช้คำสั่ง fsck เพื่อตรวจสอบความถูกต้องของ filesystem ที่สร้างขึ้น ต้องไม่มีข้อความ error ใดๆ</p>
<pre># <strong>fsck -y /dev/rdsk/c1t1d0s0
</strong>** /dev/rdsk/c1t1d0s0
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
2 files, 9 used, 10331200 free (16 frags, 1291398 blocks, 0.0% fragmentation)</pre>
<p>สร้าง mount point สำหรับ partition ใหม่</p>
<pre># <strong>mkdir /mnt/new-disk0
</strong># <strong>mount /dev/rdsk/c1t1d0s0 /mnt/new-disk0
</strong><span style="color: #ff0000;">mount: /dev/rdsk/c1t1d0s0 not a block device</span></pre>
<p>สำหรับ Solaris เวลาใช้คำสั่ง newfs หรือ fsck ชื่อ device ที่ระบุคือ /dev/rdsk/&#8230; แต่เวลาใช้คำสั่ง mount ต้องระบุชื่อ device เป็น /dev/dsk/&#8230;</p>
<pre># <strong>mount /dev/dsk/c1t1d0s0 /mnt/new-disk0</strong></pre>
<p>ใช้คำสั่ง df เพื่อตรวจสอบ mount point</p>
<pre># <strong>df -h
</strong>Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0       34G   3.7G    30G    11%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   1.6G   932K   1.6G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                        34G   3.7G    30G    11%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.6G     8K   1.6G     1%    /tmp
swap                   1.6G    20K   1.6G     1%    /var/run
/dev/dsk/c1t0d0s7      1.9G   210M   1.6G    12%    /export/home
<span style="color: #0000ff;">/dev/dsk/c1t1d0s0      9.9G    10M   9.7G     1%    /mnt/new-disk0</span></pre>
<p>หากใช้งาน partition ใหม่ได้ถูกต้องเรียบร้อยแล้ว ต้องเพิ่มคอนฟิกเข้าไปในไฟล์ /etc/vfstab เพื่อให้เวลาบู๊ตเครื่องใหม่ มีการ mount partition ใหม่นี้โดยอัตโมมัติ</p>
<pre># <strong>cat /etc/vfstab
</strong>#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/dsk/c1t0d0s0       /dev/rdsk/c1t0d0s0      /       ufs     1       no      -
/dev/dsk/c1t0d0s7       /dev/rdsk/c1t0d0s7      /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
# new disk
<span style="color: #0000ff;">/dev/dsk/c1t1d0s0       /dev/rdsk/c1t1d0s0      /mnt/new-disk0  ufs     2       yes     -</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2010/03/add_new_disk_on_solaris_10/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ขนาดหน่วยความจำกับการติดตั้ง Solaris 10_u8 x86</title>
		<link>http://spalinux.com/2010/03/memory_size_with_solaris_10_u8_x86_installation</link>
		<comments>http://spalinux.com/2010/03/memory_size_with_solaris_10_u8_x86_installation#comments</comments>
		<pubDate>Sat, 06 Mar 2010 07:15:25 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=1092</guid>
		<description><![CDATA[ช่วงนี้รับงานที่ต้องใช้ Solaris 10 เป็นหลัก เลยติดตั้ง Solaris ใน VMware Server เพื่อไว้เป็นเครื่องทดสอบคำสั่ง และโปรแกรมต่างๆ บทความนี้ขอนำประสบการณ์มาแชร์ให้กัน เผื่อเป็นประโยชน์สำหรับผู้ติดปัญหาการติดตั้ง Solaris 10 x86 เหมือนผู้เขียน ในที่นี้ใช้ไฟล์ iso (sol-10-u8-ga-x86-dvd.iso) จากเว็บไซต์ sun.com เพื่อติดตั้งบน VMware Server คอนฟิก guest ที่สร้างไว้ บน VMware Server เวอร์ชั่น 1.0.10 คือ Guest Operating System: Solaris 10 64-bit Memory 512 MB Disk 37.3 GB พยายามติดตั้งอยู่นานก็ไม่สามารถติดตั้งได้ ขึ้น error SunOS Release 5.10 Version Generic_141445-09 32-bit [...]]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้รับงานที่ต้องใช้ Solaris 10 เป็นหลัก เลยติดตั้ง Solaris ใน VMware Server เพื่อไว้เป็นเครื่องทดสอบคำสั่ง และโปรแกรมต่างๆ</p>
<p>บทความนี้ขอนำประสบการณ์มาแชร์ให้กัน เผื่อเป็นประโยชน์สำหรับผู้ติดปัญหาการติดตั้ง Solaris 10 x86 เหมือนผู้เขียน</p>
<p><span id="more-1092"></span></p>
<p>ในที่นี้ใช้ไฟล์ iso (sol-10-u8-ga-x86-dvd.iso) จากเว็บไซต์ sun.com เพื่อติดตั้งบน VMware Server</p>
<p>คอนฟิก guest ที่สร้างไว้ บน VMware Server เวอร์ชั่น 1.0.10 คือ</p>
<p>Guest Operating System: Solaris 10 64-bit<br />
Memory 512 MB<br />
Disk 37.3 GB</p>
<p>พยายามติดตั้งอยู่นานก็ไม่สามารถติดตั้งได้ ขึ้น error</p>
<pre>SunOS Release 5.10 Version Generic_141445-09 32-bit
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.</pre>
<pre><span style="color: #ff0000;">panic[cpu0]/thread=fec20160: page_unlock: page fe2b57d0 is not locked.</span></pre>
<p><a href="http://spalinux.com/wp-content/uploads/2010/03/01-Install_Solaris_10_x86_panic_with_memory_512MB.png"><img title="Install Solaris 10 x86 - panic with memory 512MB" src="http://spalinux.com/wp-content/uploads/2010/03/01-Install_Solaris_10_x86_panic_with_memory_512MB.png" alt="" width="720" height="400" /></a></p>
<p>หลังจากค้นหาข้อมูลอยู่นาน ก็พบต้นตอของปัญหาจากเว็บไซต์ <a href="http://forums.sun.com/thread.jspa?threadID=5411801" target="_blank">Installation &#8211; Solaris 10 Installation error on Thinkpad A20m &#8211; Please help!!!!!!! PLEASE!<br />
</a></p>
<blockquote><p>S10U8 cannot hit a 512Mb memory system and I suspect you are there. In Parallels you can just up the memory slightly. At least in virtual box 512</p>
<p>will give the same error while 609mb does not.</p></blockquote>
<p>ทดลองเปลี่ยนคอนฟิกของ memory เป็น 768 MB ผลเป็นว่าสามารถติดตั้ง Solaris 10 ได้ แต่สังเกตว่าน่าจะเป็นการติดตั้ง Solaris 10 แบบ 32-bit</p>
<pre>SunOS Release 5.10 Version Generic_141445-09 <span style="color: #0000ff;">32-bit</span></pre>
<p><a href="http://spalinux.com/wp-content/uploads/2010/03/02-Install_Solaris_10_x86_32-bit_with_memory_768MB.png"><img title="Install Solaris 10 x86 32-bit with memory 768MB" src="http://spalinux.com/wp-content/uploads/2010/03/02-Install_Solaris_10_x86_32-bit_with_memory_768MB.png" alt="" width="720" height="400" /></a></p>
<p>ทดลองเพิ่มขนาด memory เป็น 1024 MB ผลที่ได้ จะเป็นการติดตั้ง Solaris 10 แบบ 64-bit</p>
<pre>SunOS Release 5.10 Version Generic_141445-09 64-bit</pre>
<p><a href="http://spalinux.com/wp-content/uploads/2010/03/03-Install_Solaris_10_x86_64-bit_with_memory_1024MB.png"><img title="Install Solaris 10 x86 64-bit with memory 1024MB" src="http://spalinux.com/wp-content/uploads/2010/03/03-Install_Solaris_10_x86_64-bit_with_memory_1024MB.png" alt="" width="720" height="400" /></a></p>
<p>แต่ไม่ว่าจะคอนฟิกขนาด Memory 768 MB หรือ 1024 MB ตอนติดตั้ง สุดท้าย Solaris ที่ได้จะเป็นแบบ 64-bit</p>
<p>หมายเหตุ ไม่ได้ทดสอบบนเครื่อง PC จริงๆ ว่าได้ผลเหมือนกันหรือไม่ ลองกันดูนะครับ</p>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://www.sun.com/software/solaris/get.jsp" target="_blank">Get Solaris 10</a></li>
<li><a href="http://forums.sun.com/thread.jspa?threadID=5411801" target="_blank">Installation &#8211; Solaris 10 Installation error on Thinkpad A20m &#8211; Please help!!!!!!! PLEASE!</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2010/03/memory_size_with_solaris_10_u8_x86_installation/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>เพิ่มความปลอดภัยให้ Solaris 10 แบบง่าย</title>
		<link>http://spalinux.com/2009/05/basic_secure_solaris_10</link>
		<comments>http://spalinux.com/2009/05/basic_secure_solaris_10#comments</comments>
		<pubDate>Sat, 23 May 2009 14:55:46 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[X Window]]></category>
		<category><![CDATA[solaris 10]]></category>

		<guid isPermaLink="false">http://spalinux.com/?p=681</guid>
		<description><![CDATA[วันนี้ขอเขียนเกี่ยวกับ Solaris 10 ซะหน่อย ช่วงนี้ได้รับมอบหมายให้เพิ่มความปลอดภัย (secure) ให้กับเครื่อง Solaris  แต่มีข้อแม้ไม่อยากให้ลง JASS (Solaris Security Toolkit) ก็เลยลองทำดู และเรียบเรียงมาเป็นบทความให้ผู้สนใจทั่วไป การเพิ่มความปลอดภัยในบทความนี้  คือการปิดเซอร์วิสที่ไม่ได้ใช้งานโดยไม่กระทบกับงานที่ลูกค้าใช้  ซึ่งนอกจากจะปิดช่องโหว่ที่อาจเกิดขึ้นแล้ว ยังได้ free memory เพิ่มคืนมาอีกด้วย ปิด remote services ตอนติดตั้ง Solaris วิธีการหนึ่งที่ช่วยปิดเซอร์วิสเก่าๆ สำหรับการ remote services ไม่ว่าจะเป็น telnet, rlogin, ftp  เหลือแค่ Secure Shell (SSH) สามารถทำได้ตั้งแต่ระหว่างการติดตั้ง Solaris ในหน้าจอที่เลือก &#8220;Enabling remote services&#8221; ให้เลือก [x] No สำหรับ &#8220;Remote services enabled&#8221; ปิดเซอร์วิส CDE-Login (X [...]]]></description>
			<content:encoded><![CDATA[<p>วันนี้ขอเขียนเกี่ยวกับ Solaris 10 ซะหน่อย ช่วงนี้ได้รับมอบหมายให้เพิ่มความปลอดภัย (secure) ให้กับเครื่อง Solaris  แต่มีข้อแม้ไม่อยากให้ลง JASS (Solaris Security Toolkit) ก็เลยลองทำดู และเรียบเรียงมาเป็นบทความให้ผู้สนใจทั่วไป</p>
<p>การเพิ่มความปลอดภัยในบทความนี้  คือการปิดเซอร์วิสที่ไม่ได้ใช้งานโดยไม่กระทบกับงานที่ลูกค้าใช้  ซึ่งนอกจากจะปิดช่องโหว่ที่อาจเกิดขึ้นแล้ว ยังได้ free memory เพิ่มคืนมาอีกด้วย<span id="more-681"></span></p>
<h4>ปิด remote services ตอนติดตั้ง Solaris</h4>
<p>วิธีการหนึ่งที่ช่วยปิดเซอร์วิสเก่าๆ สำหรับการ remote services ไม่ว่าจะเป็น telnet, rlogin, ftp  เหลือแค่ Secure Shell (SSH) สามารถทำได้ตั้งแต่ระหว่างการติดตั้ง Solaris ในหน้าจอที่เลือก &#8220;<strong>Enabling remote services</strong>&#8221; ให้เลือก <strong>[x] No</strong> สำหรับ &#8220;<strong>Remote services enabled</strong>&#8221;</p>
<p><img class="alignnone size-full wp-image-683" title="Solaris 10 Installation - Disable Remote Services" src="http://spalinux.com/wp-content/uploads/2009/05/00_install_solaris_10_disable_remote_services.png" alt="Solaris 10 Installation - Disable Remote Services" width="720" height="400" /></p>
<h4>ปิดเซอร์วิส CDE-Login (X Window)</h4>
<p>หากคุณไม่เคยเดินไปที่หน้าจอคอนโซลของเครื่อง login เข้า CDE หรือ W Window แล้ว  สามารถปิดเซอร์วิสนี้ไปได้เลย เหลือแค่เป็นคอนโซล แบบ text ธรรมดา ให้สามารถ login ได้</p>
<p>ใช้คำสั่ง svcs เพื่อตรวจสอบสถานะ cde-login</p>
<pre># <strong>svcs cde-login</strong>
 STATE          STIME    FMRI
 online         13:34:58 svc:/application/graphical-login/cde-login:default</pre>
<p>ตัวอย่างหน้าจอ cde-login</p>
<p><img class="alignnone size-full wp-image-684" title="Solaris 10 - CDE Login" src="http://spalinux.com/wp-content/uploads/2009/05/01_solaris_10_cde_login.png" alt="Solaris 10 - CDE Login" width="727" height="414" /></p>
<p>ใช้คำสั่ง svcadm disable เพื่อปิดเซอร์วิส cde-login</p>
<pre># <strong>svcadm disable cde-login</strong></pre>
<p>ตรวจสอบสถานะ cde-login หลังจากปิดเซอร์วิสแล้ว</p>
<pre># <strong>svcs cde-login</strong>
 STATE          STIME    FMRI
 disabled       13:36:59 svc:/application/graphical-login/cde-login:default</pre>
<p>ตัวอย่าง text console login หลังจากปิดเซอร์วิส cde-login</p>
<p><img class="alignnone size-full wp-image-685" title="After Disable CDE Login" src="http://spalinux.com/wp-content/uploads/2009/05/02_after_disable_cde.png" alt="After Disable CDE Login" width="720" height="400" /></p>
<h4></h4>
<h4>ปิดเซอร์วิส Sun Java Web Console</h4>
<p>Sun Java Web Console เป็นเซอร์วิสของ Solaris เพื่อสร้างเป็นจุดรวมของโปรแกรมประเภท system management ผ่านทาง web-based โดยผู้ใช้สามารถเรียกผ่าน https ได้</p>
<p><img class="alignnone size-full wp-image-688" title="Sun Java Web Console" src="http://spalinux.com/wp-content/uploads/2009/05/03_sun_java_web_console.png" alt="Sun Java Web Console" width="762" height="653" /></p>
<p>หากเราใช้แต่ command line เพื่อแก้ไขคอนฟิกเครื่อง เราสามารถปิดเซอร์วิสนี้ได้</p>
<p>ใช้คำสั่ง svcs เพื่อตรวจสอบสถานะ webconsole</p>
<pre># <strong>svcs webconsole</strong>
 STATE          STIME    FMRI
 online         14:01:06 svc:/system/webconsole:console</pre>
<p>ใช้คำสั่ง svcadm disable เพื่อปิดเซอร์วิส webconsole</p>
<pre># <strong>svcadm disable webconsole</strong></pre>
<p>ตรวจสอบสถานะ webconsole หลังจากปิดเซอร์วิสแล้ว</p>
<pre># <strong>svcs webconsole</strong>
 STATE          STIME    FMRI
 disabled       14:41:47 svc:/system/webconsole:console</pre>
<h4>ข้อมูลอ้างอิง</h4>
<ul>
<li><a href="http://www.sun.com/software/security/jass/" target="_blank">Solaris Security Toolkit (JumpStart Architecture and Security Scripts &#8211; JASS &#8211; Toolkit)</a></li>
<li><a href="http://docs.sun.com/app/docs/doc/817-1985/ewpor?a=view" target="_blank">Working With the Sun Java Web Console</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://spalinux.com/2009/05/basic_secure_solaris_10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

