มูลนิธิสื่อเพื่อเยาวชน
ว่าที่ร้อยตรี จิรศักดิ์ กรรเจียกพงษ์

การสร้างเอกสารตามรูปแบบที่ FreeBSD และที่อื่นๆ ใช้ แนะนำเทคนิคของการใช้ Docbook (ตอนที่ 3)


FreeBSD

 samira samilan

ตอนที่ ๓ ตัวอย่างของจริง QandA or FAQ’s

ตัวอย่างข้างบน ( qanda.xml) ได้ทดลองสร้าง โดยไป copy กระทู้ของ ครูมานิส แล้วเอาไป paste บน text editor แล้ว กำหนดตั้ง header ให้ถูกต้อง จากนั้นก็เอา tags ต่างๆ ที่เกี่ยวกับ QandA ครอบหน้าหลัง เท่านั้นเอง

เมื่อได้ file QandA.xml เนื่องจากเราจะเอาขึ้น web เราก็ให้มันออกมาในรูป ของ html โดยออกคำสั่งแปลงโฉมมัน

xalan -o qanda.html qanda.xml /dir_where_book_xsl_locate/book.xsl

แค่นี้ มันก็จะให้ qanda.html มาให้เรา พอมี ข้อมูลเพิ่ม เราก็เอาข้อมูลใหม่ ปะเข้าไปตอนท้ายของ qanda.xml แล้ว แปลงโฉมใหม่
qanda.html ที่ได้ ก็จะมาในรูป ( ข้อมูลนี้ เป็น utf-8 และท่านสามารถ copy & paste เอาไปลองได้เลย ในเวป ของท่าน )

QandA.html
========================================
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>"The ThaiBSD.COM" Q &amp; A</title>
<link rel="stylesheet" href="ss.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="qandaset">
<h2 class="title">"The ThaiBSD.COM" Q &amp; A</h2>
<dl>
<dt>1. <a href="http://gotoknow.org/blog/naigod/post#N005EEC90N00848894">&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; FAMP &#3649;&#3610;&#3610; &#3604;&#3634;&#3609;&#3634;&#3626; **</a>
</dt>
<dt>2. <a href="http://gotoknow.org/blog/naigod/post#N005EEC90N00848924">&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; perl?</a>
</dt>
<dt>3. <a href="http://gotoknow.org/blog/naigod/post#N005EEC90N008489D8">&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; MySQL4.1 &#3612;&#3656;&#3634;&#3609; Ports </a>
</dt>
</dl>
<a name="example.anchor.1"></a>
<table border="0" summary="Q and A Set">
<col align="left" width="1%">
<tbody>
<tr class="question">
<td align="left" valign="top"><a name="N005EEC90N00848894"></a><a name="N005EEC90N008488B8"></a><b>1.</b></td><td align="left" valign="top">
<p>&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; FAMP &#3649;&#3610;&#3610; &#3604;&#3634;&#3609;&#3634;&#3626; **</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td><td align="left" valign="top">
<pre xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" class="programlisting">
&#3650;&#3611;&#3619;&#3649;&#3585;&#3619;&#3617;&#3607;&#3637;&#3656;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; &#3585;&#3634;&#3619;&#3648;&#3619;&#3637;&#3618;&#3585;&#3651;&#3594;&#3657; URL
Freebsd 6.0
cvsup
Perl <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets/cgi-bin/test.cgi " target="_top">http://www.thecyberoutlets/cgi-bin/test.cgi</a>
apache2 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets.com/ " target="_top">http://www.thecyberoutlets.com/</a>
MySQL4.1
PHP5.0.4 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets.com/test.php" target="_top">http://www.thecyberoutlets.com/test.php</a> &#3651;&#3594;&#3657;&#3652;&#3604;&#3657;
phpMyAdmin 2.6.3 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets/pma/ " target="_top">http://www.thecyberoutlets/pma/ </a>
ZendOptimizer-2.5.7-i386
unzip552.tar.gz
Mambo <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets/mambo/index.php" target="_top">http://www.thecyberoutlets/mambo/index.php</a>
phpsysinfo-2.3 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets.com/phpsysinfo-" target="_top">http://www.thecyberoutlets.com/phpsysinfo- </a>
dev/index.php &#3651;&#3594;&#3656;&#3652;&#3604;&#3657;
Webalizer 2.01 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets.com/webalizer/" target="_top">http://www.thecyberoutlets.com/webalizer/ </a>
openwebmail 2.51 <a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://www.thecyberoutlets.com//cgi-" target="_top">http://www.thecyberoutlets.com//cgi- </a>
bin/openwebmail/openwebmail.pl
mrtg-2.12.2,1
</pre>
</td>
</tr>
<tr class="question">
<td align="left" valign="top"><a name="N005EEC90N00848924"></a><a name="N005EEC90N00848948"></a><b>2.</b></td><td align="left" valign="top">
<p>&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; perl?</p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td><td align="left" valign="top">
<pre xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" class="programlisting">
&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; Perl5.8
<a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://gotoknow.org/blog/naigod/post#example.anchor.1">top</a>
<div class="procedure">
<ol type="1">
<li>#cd /usr/ports/lang/perl5.8 </li>
<li>&#3648;&#3609;&#3639;&#3656;&#3629;&#3591;&#3592;&#3634;&#3585;&#3617;&#3637;&#3648;&#3623;&#3629;&#3619;&#3660;&#3594;&#3633;&#3656;&#3609;&#3648;&#3585;&#3656;&#3634;&#3607;&#3637;&#3656;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591;&#3617;&#3634;&#3614;&#3619;&#3657;&#3629;&#3617; FreeBSD &#3629;&#3618;&#3641;&#3656;&#3585;&#3656;&#3629;&#3609;&#3649;&#3621;&#3657;&#3623; &#3651;&#3627;&#3657;&#3592;&#3633;&#3604;&#3585;&#3634;&#3619;&#3621;&#3610;&#3629;&#3629;&#3585;&#3585;&#3656;&#3629;&#3609; </li>
<li>#make deinstall &amp;&amp; make clean </li>
<li>&#3648;&#3619;&#3636;&#3656;&#3617;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; </li>
<li>#make \
? WITHOUT_PERL_64BITINT=yes \
? WITH_THREADS=yes \
? ENABLE_SUIDPERL=yes \ </li>
<li>? install clean </li>
</ol>
</div>
</pre>
</td>
</tr>
<tr class="question">
<td align="left" valign="top"><a name="N005EEC90N008489D8"></a><a name="N005EEC90N008489FC"></a><b>3.</b></td><td align="left" valign="top">
<p>&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; MySQL4.1 &#3612;&#3656;&#3634;&#3609; Ports </p>
</td>
</tr>
<tr class="answer">
<td align="left" valign="top"></td><td align="left" valign="top">
<pre xmlns:sverb="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.Verbatim" xmlns:xverb="com.nwalsh.xalan.Verbatim" xmlns:lxslt="http://xml.apache.org/xslt" class="programlisting">
&#3649;&#3609;&#3632;&#3609;&#3635;&#3651;&#3627;&#3657;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591; MySQL &#3585;&#3656;&#3629;&#3609;&#3648;&#3611;&#3655;&#3609;&#3629;&#3633;&#3609;&#3604;&#3633;&#3610;&#3649;&#3619;&#3585;&#3609;&#3632;&#3588;&#3619;&#3633;&#3610;
&#3626;&#3635;&#3627;&#3619;&#3633;&#3610;&#3585;&#3634;&#3619;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591;&#3650;&#3611;&#3619;&#3649;&#3585;&#3619;&#3617;&#3607;&#3633;&#3657;&#3591; 4 &#3605;&#3633;&#3623;&#3586;&#3657;&#3634;&#3591;&#3605;&#3657;&#3609;
<a xmlns:suwl="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.UnwrapLinks" href="http://gotoknow.org/blog/naigod/post#example.anchor.1">top</a>
<div class="procedure">
<ol type="1">
<li>$ su </li>
<li># cd /usr/ports/databases/mysql41-server </li>
<li># make \ </li>
<li>install clean </li>
<li># pico /etc/rc.conf </li>
<li>&#3648;&#3614;&#3636;&#3656;&#3617;&#3588;&#3635;&#3626;&#3633;&#3656;&#3591; mysql_enable=&rdquo;YES&rdquo; &#3648;&#3586;&#3657;&#3634;&#3652;&#3611; </li>
<li>reboot &#3648;&#3588;&#3619;&#3639;&#3656;&#3629;&#3591;&#3651;&#3627;&#3617;&#3656; </li>
<li>&#3626;&#3634;&#3617;&#3634;&#3619;&#3606;&#3607;&#3604;&#3621;&#3629;&#3591;&#3648;&#3619;&#3637;&#3618;&#3585;&#3651;&#3594;&#3657;&#3591;&#3634;&#3609;&#3652;&#3604;&#3657;&#3604;&#3657;&#3623;&#3618;&#3588;&#3635;&#3626;&#3633;&#3656;&#3591; mysql </li>
<li>&#3648;&#3614;&#3639;&#3656;&#3629;&#3588;&#3623;&#3634;&#3617;&#3611;&#3621;&#3629;&#3604;&#3616;&#3633;&#3618;&#3651;&#3627;&#3657;&#3651;&#3626;&#3656;&#3619;&#3627;&#3633;&#3626;&#3648;&#3614;&#3639;&#3656;&#3629;&#3648;&#3586;&#3657;&#3634;&#3652;&#3611;&#3651;&#3594;&#3657; MySQL </li>
<li>&#3604;&#3657;&#3623;&#3618;&#3588;&#3635;&#3626;&#3633;&#3656;&#3591; mysqladmin &#3604;&#3633;&#3591;&#3609;&#3637;&#3657; </li>
<li># /usr/local/bin/mysqladmin -u root password 'password &#3607;&#3637;&#3656;&#3605;&#3657;&#3629;&#3591;&#3585;&#3634;&#3619;' </li>
<li># /usr/local/bin/mysqladmin -u root -h servername password 'password &#3607;&#3637;&#3656;&#3605;&#3657;&#3629;&#3591;&#3585;&#3634;&#3619;' </li>
<li>&#3626;&#3635;&#3627;&#3619;&#3633;&#3610; MySQL &#3585;&#3655;&#3605;&#3636;&#3604;&#3605;&#3633;&#3657;&#3591;&#3648;&#3626;&#3619;&#3655;&#3592;&#3648;&#3619;&#3637;&#3618;&#3610;&#3619;&#3657;&#3629;&#3618;&#3626;&#3634;&#3617;&#3634;&#3619;&#3606;&#3651;&#3594;&#3657;&#3591;&#3634;&#3609;&#3652;&#3604;&#3657;&#3649;&#3621;&#3657;&#3623;</li>
<li># mysql -u root -pzxcvbn
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 22 to server version: 4.1.10a
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql&gt; exit </li>
</ol>
</div>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

========================================

หวังว่า บทความนี้ จะทำให้ท่านได้ ความรู้ เข้าใจ เรืองการสร้าง document ในองค์กรใหญ่ ต่างๆ รวมทั้ง FreeBSD.org ซึ่งอาศัย Docbook technology ในการสร้างเอกสารต่างๆ
หมายเหตุ ขอบคุณ คุณครู ยุทธนา แม่นผล( อ. บัวเชค จ.สุรินทร์) ที่ได้ชี้ให้เห็นประโยชน์ของ xml & docbook technology ทำให้ผู้เขียนได้เข้าไป ศึกษาและได้รับประโยชน์จาก technology นี้ เป็นอันมาก

หากผู้ใดมีข้อข้องใจ ผู้เขียน ยินดีตอบคำถาม ในเรื่องที่เขียนมาเล่าใฟ้ฟัง

HTH

Samira samilan
ที่มา :: http://www.thaibsd.com/webboard/show.php?Category=thaibsd&No=6402



 

หมายเลขบันทึก: 34431เขียนเมื่อ 17 มิถุนายน 2006 15:26 น. ()แก้ไขเมื่อ 11 กุมภาพันธ์ 2012 15:09 น. ()สัญญาอนุญาต: จำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (1)
"The ThaiBSD.COM" Q & A

"The ThaiBSD.COM" Q & A

1. การติดตั้ง FAMP แบบ ดานาส **
2. ติดตั้ง perl?
3. การติดตั้ง MySQL4.1 ผ่าน Ports
1.

การติดตั้ง FAMP แบบ ดานาส **

โปรแกรมที่ติดตั้ง การเรียกใช้ URL Freebsd 6.0 cvsup Perl http://www.thecyberoutlets/cgi-bin/test.cgi apache2 http://www.thecyberoutlets.com/ MySQL4.1 PHP5.0.4 http://www.thecyberoutlets.com/test.php ใช้ได้ phpMyAdmin 2.6.3 http://www.thecyberoutlets/pma/  ZendOptimizer-2.5.7-i386 unzip552.tar.gz Mambo http://www.thecyberoutlets/mambo/index.php phpsysinfo-2.3 http://www.thecyberoutlets.com/phpsysinfo-  dev/index.php ใช่ได้ Webalizer 2.01 http://www.thecyberoutlets.com/webalizer/  openwebmail 2.51 http://www.thecyberoutlets.com//cgi-  bin/openwebmail/openwebmail.pl mrtg-2.12.2,1 
2.

ติดตั้ง perl?

การติดตั้ง Perl5.8 top 
  1. #cd /usr/ports/lang/perl5.8
  2. เนื่องจากมีเวอร์ชั่นเก่าที่ติดตั้งมาพร้อม FreeBSD อยู่ก่อนแล้ว ให้จัดการลบออกก่อน
  3. #make deinstall && make clean
  4. เริ่มติดตั้ง
  5. #make \ ? WITHOUT_PERL_64BITINT=yes \ ? WITH_THREADS=yes \ ? ENABLE_SUIDPERL=yes \
  6. ? install clean
3.

การติดตั้ง MySQL4.1 ผ่าน Ports

แนะนำให้ติดตั้ง MySQL ก่อนเป็นอันดับแรกนะครับ สำหรับการติดตั้งโปรแกรมทั้ง 4 ตัวข้างต้น top 
  1. $ su
  2. # cd /usr/ports/databases/mysql41-server
  3. # make \
  4. install clean
  5. # pico /etc/rc.conf
  6. เพิ่มคำสั่ง mysql_enable=”YES” เข้าไป
  7. reboot เครื่องใหม่
  8. สามารถทดลองเรียกใช้งานได้ด้วยคำสั่ง mysql
  9. เพื่อความปลอดภัยให้ใส่รหัสเพื่อเข้าไปใช้ MySQL
  10. ด้วยคำสั่ง mysqladmin ดังนี้
  11. # /usr/local/bin/mysqladmin -u root password 'password ที่ต้องการ'
  12. # /usr/local/bin/mysqladmin -u root -h servername password 'password ที่ต้องการ'
  13. สำหรับ MySQL ก็ติดตั้งเสร็จเรียบร้อยสามารถใช้งานได้แล้ว
  14. # mysql -u root -pzxcvbn Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 to server version: 4.1.10a Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> exit
พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท