<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="en" xml:base="http://www.mtuser.com/wp-atom.php">
	<title type="text">:: user blog ::</title>
	<subtitle type="text">เอ๊า จด</subtitle>

	<updated>2010-01-29T09:19:18Z</updated>
	<generator uri="http://wordpress.org/" version="2.9.1">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://www.mtuser.com" />
	<id>http://www.mtuser.com/feed/atom/</id>
	

			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/mtuser" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="mtuser" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">mtuser</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[Ispconfig apache directives]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2010/01/ispconfig-apache-directives/" />
		<id>http://www.mtuser.com/?p=812</id>
		<updated>2010-01-29T09:19:18Z</updated>
		<published>2010-01-28T05:45:15Z</published>
		<category scheme="http://www.mtuser.com" term="linux" /><category scheme="http://www.mtuser.com" term="ispconfig" /><category scheme="http://www.mtuser.com" term="jsp" /><category scheme="http://www.mtuser.com" term="php" /><category scheme="http://www.mtuser.com" term="servlet" /><category scheme="http://www.mtuser.com" term="tomat6" />		<summary type="html"><![CDATA[สำหรับ .htaccess
&#60;Directory &#8220;/var/www/webX/web/&#8221;&#62;
Options FollowSymLinks
AllowOverride All
&#60;/Directory&#62;
สำหรับ JSP,servlet
JkMount /*.jsp worker1
JkMount /jforum/* worker1
สำหรับ custom php.ini
suPHP_Config /var/www/webX
จบ
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2010/01/ispconfig-apache-directives/"><![CDATA[<p>สำหรับ .htaccess</p>
<blockquote><p>&lt;Directory &#8220;/var/www/webX/web/&#8221;&gt;<br />
Options FollowSymLinks<br />
AllowOverride All<br />
&lt;/Directory&gt;</p></blockquote>
<p>สำหรับ JSP,servlet</p>
<blockquote><p>JkMount /*.jsp worker1</p>
<p>JkMount /jforum/* worker1</p></blockquote>
<p>สำหรับ custom php.ini</p>
<blockquote><p>suPHP_Config /var/www/webX</p></blockquote>
<p>จบ</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2010/01/ispconfig-apache-directives/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2010/01/ispconfig-apache-directives/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[mix port error]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2010/01/mix-port-error/" />
		<id>http://www.mtuser.com/?p=806</id>
		<updated>2010-01-28T05:39:24Z</updated>
		<published>2010-01-28T05:37:12Z</published>
		<category scheme="http://www.mtuser.com" term="linux" /><category scheme="http://www.mtuser.com" term="debian" /><category scheme="http://www.mtuser.com" term="ispconfig" /><category scheme="http://www.mtuser.com" term="jsp" /><category scheme="http://www.mtuser.com" term="tomcat6" />		<summary type="html"><![CDATA[[error] VirtualHost www.mtuser.com:0 &#8212; mixing * ports and non-* ports
with a NameVirtualHost address is not supported, proceeding with
undefined results
แก้ตามกระทู้นี้
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2010/01/mix-port-error/"><![CDATA[<p>[error] VirtualHost www.mtuser.com:0 &#8212; mixing * ports and non-* ports<br />
with a NameVirtualHost address is not supported, proceeding with<br />
undefined results</p>
<p>แก้ตามกระทู้<a href="http://www.howtoforge.com/forums/showpost.php?p=131179&amp;postcount=2">นี้</a></p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2010/01/mix-port-error/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2010/01/mix-port-error/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[ISPConfig JSP Servlet]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2010/01/ispconfig-jsp-servlet/" />
		<id>http://www.mtuser.com/?p=800</id>
		<updated>2010-01-28T05:45:42Z</updated>
		<published>2010-01-24T11:33:27Z</published>
		<category scheme="http://www.mtuser.com" term="linux" /><category scheme="http://www.mtuser.com" term="jsp" /><category scheme="http://www.mtuser.com" term="servlet" /><category scheme="http://www.mtuser.com" term="tomcat6" />		<summary type="html"><![CDATA[ตามเอกสารคู่มือ
ISPconfig 2
Apache-Tomcat
jdk-6u18-linux-x64.bin
apache-tomcat-6.0.24.tar.gz
ISPConfig-2.2.35.tar.gz
ส่วนที่ต่างจากคู่มือ mod_jk ติดตั้งโดย apt-get  install libapache2-mod-jk เอา
แก้ vhost server.xml ใส่ในส่นท้ายของไฟล์
/usr/lib/apache-tomcat/conf/server.xml
&#60;Host name=&#8221;www.mtuser.com&#8221; appBase=&#8221;/var/www/webx/web&#8221;
unpackWARs=&#8221;true&#8221; autoDeploy=&#8221;true&#8221;&#62;
&#60;Context path=&#8221;" docBase=&#8221;apps&#8221; debug=&#8221;0&#8243; reloadable=&#8221;true&#8221;/&#62;
&#60;Valve className=&#8221;org.apache.catalina.valves.AccessLogValve&#8221;
directory=&#8221;logs&#8221;  prefix=&#8221;web1_access_log.&#8221; suffix=&#8221;.txt&#8221;
pattern=&#8221;common&#8221; resolveHosts=&#8221;false&#8221;/&#62;
&#60;/Host&#62;
&#60;Listener className=&#8221;org.apache.jk.config.ApacheConfig&#8221;
modJk=&#8221;/usr/lib/apache2/modules/mod_jk.so&#8221;
workersConfig=&#8221;/etc/apache2/workers.properties&#8221;/&#62;

stop apache2 ก่อน แล้วสั่ง start tomcat จึงจะได้ config file มา
แก้ vhost ทีทำที

ISPconfig Apache Directives
จะเน่าจะเละหรืออะไรไม่รู้ ไม่ใช่โปรแกรมเมอร์ &#8211; -
JkMount /*.jsp worker1
JkMount /*/servlet/* worker1
JkMount /example/* worker1
สมมติวาง forum ไว้ใน rootdoc ใส่
JkMount /jforum/* worker1
จบ
ที่มานอกเหนือจากด้านบน 1 2 3 [...]]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2010/01/ispconfig-jsp-servlet/"><![CDATA[<p>ตามเอกสารคู่มือ</p>
<p><a href="http://www.howtoforge.com/perfect-server-debian-lenny-ispconfig2" target="_blank">ISPconfig 2</a></p>
<p><a href="http://www.howtoforge.com/apache2_tomcat5_mod_jk_p4">Apache-Tomcat</a></p>
<p>jdk-6u18-linux-x64.bin</p>
<p>apache-tomcat-6.0.24.tar.gz</p>
<p>ISPConfig-2.2.35.tar.gz</p>
<p>ส่วนที่ต่างจากคู่มือ mod_jk ติดตั้งโดย apt-get  install libapache2-mod-jk เอา</p>
<p>แก้ vhost server.xml ใส่ในส่นท้ายของไฟล์<br />
/usr/lib/apache-tomcat/conf/server.xml</p>
<p>&lt;Host name=&#8221;www.mtuser.com&#8221; appBase=&#8221;/var/www/webx/web&#8221;<br />
unpackWARs=&#8221;true&#8221; autoDeploy=&#8221;true&#8221;&gt;</p>
<p>&lt;Context path=&#8221;" docBase=&#8221;apps&#8221; debug=&#8221;0&#8243; reloadable=&#8221;true&#8221;/&gt;</p>
<p>&lt;Valve className=&#8221;org.apache.catalina.valves.AccessLogValve&#8221;<br />
directory=&#8221;logs&#8221;  prefix=&#8221;web1_access_log.&#8221; suffix=&#8221;.txt&#8221;<br />
pattern=&#8221;common&#8221; resolveHosts=&#8221;false&#8221;/&gt;<br />
&lt;/Host&gt;</p>
<p>&lt;Listener className=&#8221;org.apache.jk.config.ApacheConfig&#8221;<br />
modJk=&#8221;/usr/lib/apache2/modules/mod_jk.so&#8221;<br />
workersConfig=&#8221;/etc/apache2/workers.properties&#8221;/&gt;</p>
<ul>
<li>stop apache2 ก่อน แล้วสั่ง start tomcat จึงจะได้ config file มา</li>
<li>แก้ vhost ทีทำที</li>
</ul>
<p>ISPconfig Apache Directives</p>
<p>จะเน่าจะเละหรืออะไรไม่รู้ ไม่ใช่โปรแกรมเมอร์ &#8211; -</p>
<p>JkMount /*.jsp worker1<br />
JkMount /*/servlet/* worker1<br />
JkMount /example/* worker1</p>
<p>สมมติวาง forum ไว้ใน rootdoc ใส่</p>
<p>JkMount /jforum/* worker1</p>
<p>จบ</p>
<p>ที่มานอกเหนือจากด้านบน <a href="http://www.howtoforge.com/forums/showthread.php?t=3595&amp;page=3">1</a> <a href="http://5dollarwhitebox.org/wiki/index.php/Howtos_Apache_Tomcat_with_Mod_JK#The_Mod_JK_connector">2</a> <a href="http://www.herongyang.com/jdbc/MySQL-JDBC-Driver-Installation.html">3</a> <a href="https://sec1.woopra.com/docs/deployer-howto.html#Deploying%20on%20a%20running%20Tomcat%20server">4</a> <a href="http://mail-archives.apache.org/mod_mbox/tomcat-users/200308.mbox/%3C3F40C5A3.7080202@johnturner.com%3E">5</a> <a href="http://jforum.net/posts/list/5264.page;jsessionid=58mszsfb0yj">6</a></p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2010/01/ispconfig-jsp-servlet/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2010/01/ispconfig-jsp-servlet/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[clarkconnect eth]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/11/clark-connect-5-0-swap-eth-proble/" />
		<id>http://www.mtuser.com/?p=795</id>
		<updated>2009-11-14T15:10:26Z</updated>
		<published>2009-11-14T15:08:15Z</published>
		<category scheme="http://www.mtuser.com" term="etc" />		<summary type="html"><![CDATA[ภาคต่อ คนอื่นไม่เห็นเจอปัญหาแบบนี้เลย &#8230;เหอะๆ
กำหนดไว้ว่า
eth0 ต่อ PPPOE
eth1 ต่อ lan ทำขา tun0
ifconfig list ดู mac
eth0      Link encap:Ethernet  HWaddr 00:aa:bb:cc:dd:ee
eth1      Link encap:Ethernet  HWaddr 00:35:77:11:33:88
#nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=&#8221;none&#8221;
ONBOOT=&#8221;no&#8221;
สลับไปสลับมา eth0 มันเหลือแค่นี้ (ควรจะต้องเป็น onboot yes มั้ง ไม่รู้สิ &#8211; -)
เพิ่มต่อท้าย
HWADDR=00:aa:bb:cc:dd:ee
eth1 ก็เช่นกัน
#nano /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=&#8221;yes&#8221;
BOOTPROTO=&#8221;none&#8221;
HWADDR=00:35:77:11:33:88
restart ได้บ่อยเท่าที่ต้องการแล้วมั้ง&#8230;
ท้ายสุด clarkconnect ไม่มี /etc/udev/rules.d/70-persistent-net.rules ..
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/11/clark-connect-5-0-swap-eth-proble/"><![CDATA[<p>ภาคต่อ คนอื่นไม่เห็นเจอปัญหาแบบนี้เลย &#8230;เหอะๆ<br />
กำหนดไว้ว่า<br />
eth0 ต่อ PPPOE<br />
eth1 ต่อ lan ทำขา tun0</p>
<p>ifconfig list ดู mac<br />
eth0      Link encap:Ethernet  HWaddr 00:aa:bb:cc:dd:ee<br />
eth1      Link encap:Ethernet  HWaddr 00:35:77:11:33:88</p>
<p>#nano /etc/sysconfig/network-scripts/ifcfg-eth0</p>
<p>DEVICE=eth0<br />
BOOTPROTO=&#8221;none&#8221;<br />
ONBOOT=&#8221;no&#8221;</p>
<p>สลับไปสลับมา eth0 มันเหลือแค่นี้ (ควรจะต้องเป็น onboot yes มั้ง ไม่รู้สิ &#8211; -)<br />
เพิ่มต่อท้าย</p>
<p>HWADDR=00:aa:bb:cc:dd:ee</p>
<p>eth1 ก็เช่นกัน<br />
#nano /etc/sysconfig/network-scripts/ifcfg-eth1<br />
DEVICE=eth1<br />
ONBOOT=&#8221;yes&#8221;<br />
BOOTPROTO=&#8221;none&#8221;<br />
HWADDR=00:35:77:11:33:88<br />
restart ได้บ่อยเท่าที่ต้องการแล้วมั้ง&#8230;<br />
ท้ายสุด clarkconnect ไม่มี /etc/udev/rules.d/70-persistent-net.rules ..</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/11/clark-connect-5-0-swap-eth-proble/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/11/clark-connect-5-0-swap-eth-proble/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[clarkconnect 5.0]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/11/clarkconnect-5-0/" />
		<id>http://www.mtuser.com/?p=786</id>
		<updated>2009-11-14T15:12:08Z</updated>
		<published>2009-11-14T11:06:51Z</published>
		<category scheme="http://www.mtuser.com" term="linux" />		<summary type="html"><![CDATA[สคริปและวิธีทำ ลอกมาจาก
http://www.linuxthai.org/forum/index.php?topic=7880.75
เปิด httpd mysql squid แบบปกติ
#nano /etc/my.cnf
เพิ่ม
character-set-server=utf8
default-collation=utf8_general_ci
exit ออกมา
service mysqld restart
ลง rpm ใน dir rrdtool ให้เสร็จก่อน สคริปขาดไฟล์ที่จำเป็น
# yum upgrade
# yum clean all
# yum groupinstall &#8220;Development Tools&#8221;
# yum install kernel-sourcecode
# yum install kernel-devel kernel-PAE-devel
# rpm -Uvh *.rpm
เช็คที่ขาด ติดตั้งให้เรียบร้อย
#./config
#./installmain
รอสักครู่
** ปัญหาeth สลับไปมาหลังรีสตาร์ท รีปุ๊บเจ๊งปั๊บ  **
** eth ที่ปล่อย tun0 จะไม่ fix ip** ยังไม่ได้ลอง loadbalance



เวลาขึ้นเป็น EST
สั่ง
#cat /usr/share/zoneinfo/Asia/Bangkok &#62; /etc/localtime
#date
Sat Nov 14 18:28:40 [...]]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/11/clarkconnect-5-0/"><![CDATA[<p>สคริปและวิธีทำ ลอกมาจาก</p>
<p>http://www.linuxthai.org/forum/index.php?topic=7880.75</p>
<p>เปิด httpd mysql squid แบบปกติ<br />
#nano /etc/my.cnf<br />
เพิ่ม</p>
<p>character-set-server=utf8<br />
default-collation=utf8_general_ci</p>
<p>exit ออกมา<br />
service mysqld restart</p>
<p><span id="more-786"></span>ลง rpm ใน dir rrdtool ให้เสร็จก่อน สคริปขาดไฟล์ที่จำเป็น</p>
<p># yum upgrade<br />
# yum clean all<br />
# yum groupinstall &#8220;Development Tools&#8221;<br />
# yum install kernel-sourcecode<br />
# yum install kernel-devel kernel-PAE-devel<br />
# rpm -Uvh *.rpm<br />
เช็คที่ขาด ติดตั้งให้เรียบร้อย<br />
#./config<br />
#./installmain<br />
รอสักครู่<br />
** ปัญหาeth สลับไปมาหลังรีสตาร์ท รีปุ๊บเจ๊งปั๊บ  **<br />
** eth ที่ปล่อย tun0 จะไม่ fix ip** ยังไม่ได้ลอง loadbalance<br />
<a href="http://img262.imageshack.us/i/20091114171846.png/" target="_blank"><img src="http://img262.imageshack.us/img262/2792/20091114171846.th.png" border="0" alt="" /></a></p>
<p><a href="http://img208.imageshack.us/i/20091114172142.png/" target="_blank"><img src="http://img208.imageshack.us/img208/917/20091114172142.th.png" border="0" alt="" /><br />
</a><br />
เวลาขึ้นเป็น EST<br />
สั่ง<br />
#cat /usr/share/zoneinfo/Asia/Bangkok &gt; /etc/localtime<br />
#date<br />
Sat Nov 14 18:28:40 ICT 2009<br />
เรียบร้อยแล้ววววว</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/11/clarkconnect-5-0/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/11/clarkconnect-5-0/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[netstat]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/10/netstat/" />
		<id>http://www.mtuser.com/2009/10/netstat/</id>
		<updated>2009-10-12T10:02:03Z</updated>
		<published>2009-10-12T10:01:42Z</published>
		<category scheme="http://www.mtuser.com" term="linux" /><category scheme="http://www.mtuser.com" term="netstat" />		<summary type="html"><![CDATA[listen port
 netstat -tunlp
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/10/netstat/"><![CDATA[<p>listen port<br />
 netstat -tunlp</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/10/netstat/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/10/netstat/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[radiusd service stop]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/10/radiusd-service-stop/" />
		<id>http://www.mtuser.com/?p=778</id>
		<updated>2009-10-10T17:56:13Z</updated>
		<published>2009-10-10T17:56:13Z</published>
		<category scheme="http://www.mtuser.com" term="linux" />		<summary type="html"><![CDATA[radiusd ดับโดยหาสาเหตุไม่เจอ
log ไม่บ่งบอก (ดูไม่เป็น) ไม่ได้เป็นทุกวัน
วิธีแก้บ้านๆ จับมัน start ซะจบ &#8230;
วิธีบ้านๆอีกที ดับก็start auto มันซะ
http://mmonit.com/monit/download/
แตกแล้วติดตั้ง ต้องลงโปรแกรมเพิ่มอีกสองสามตัว ได้แก่ flex byacc bison เสร็จแล้ว
แตกไฟล์ ติดตั้ง ./configure &#8211;without-ssl (มั้งลืม เดี๋ยวมันก็ขึ้นเตือนเอง)
make &#038; make install
cp monit-บลาๆๆ/monitrc ~/.
nano ~/.monitrc
ที่เหลือลอกตาม http://www.itdestination.com/articles/monit/
ไม่รู้มีผลเสียไรไหม&#8230;
ยังหาวิธีทำให้  client timeoutไม่ได้เลย กลัวเจ๊ง
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/10/radiusd-service-stop/"><![CDATA[<p>radiusd ดับโดยหาสาเหตุไม่เจอ<br />
log ไม่บ่งบอก (ดูไม่เป็น) ไม่ได้เป็นทุกวัน<br />
วิธีแก้บ้านๆ จับมัน start ซะจบ &#8230;<br />
วิธีบ้านๆอีกที ดับก็start auto มันซะ</p>
<p>http://mmonit.com/monit/download/</p>
<p>แตกแล้วติดตั้ง ต้องลงโปรแกรมเพิ่มอีกสองสามตัว ได้แก่ flex byacc bison เสร็จแล้ว<br />
แตกไฟล์ ติดตั้ง ./configure &#8211;without-ssl (มั้งลืม เดี๋ยวมันก็ขึ้นเตือนเอง)<br />
make &#038; make install<br />
cp monit-บลาๆๆ/monitrc ~/.<br />
nano ~/.monitrc<br />
ที่เหลือลอกตาม http://www.itdestination.com/articles/monit/<br />
ไม่รู้มีผลเสียไรไหม&#8230;<br />
ยังหาวิธีทำให้  client timeoutไม่ได้เลย กลัวเจ๊ง</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/10/radiusd-service-stop/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/10/radiusd-service-stop/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[Freeradius + Chillispot user ค้าง]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/10/user-online/" />
		<id>http://www.mtuser.com/?p=773</id>
		<updated>2009-10-09T03:54:56Z</updated>
		<published>2009-10-09T03:50:01Z</published>
		<category scheme="http://www.mtuser.com" term="linux" />		<summary type="html"><![CDATA[วันนี้เวบเค้าเข้าไม่ได้.. หรือเน็ตเน่าอีกแล้วหว่า จดสักหน่อยดีกว่า
1. http://ip-server:3990/logout เช่น http://192.168.2.1:3990/logout ที่ address ใน ie
2.
rm -rf /var/log/radutmp
rm -rf /var/log/radwtmp
touch /var/log/radutmp
touch /var/log/radwtmp
chmod 600 /var/log/radutmp
chmod 644 /var/log/radwtmp
chown radiusd:radiusd /var/log/radutmp
chown radiusd:radiusd /var/log/radwtmp
shutdown -r now
ลองละ work เสียแต่เวลาเปิดเครื่องมันนาน :X

3. ลง ezradius  มาร่วมสามารถ kick user ทีละราย และกำหนด timeout ได้ครับ เช่น เมื่อไม่มีการใช้งาน 10 นาที ดีด user ออก
ลงแล้วมองไม่เห็นuser ไม่ได้ใช้รหัสเป็น md5 กลัวทำแล้วเจ๊ง บลาๆๆ
4. ยาวอีก
ปัญหา : เมื่อเครื่องรีสตาร์ท user จะค้าง
วิธีแก้ : [...]]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/10/user-online/"><![CDATA[<p>วันนี้เวบเค้าเข้าไม่ได้.. หรือเน็ตเน่าอีกแล้วหว่า จดสักหน่อยดีกว่า<br />
1. <a href="http://ip-server:3990/logout" target="_blank">http://ip-server:3990/logout</a> เช่น <a href="http://192.168.2.1:3990/logout" target="_blank">http://192.168.2.1:3990/logout</a> ที่ address ใน ie</p>
<p>2.<br />
<blockquote>rm -rf /var/log/radutmp<br />
rm -rf /var/log/radwtmp<br />
touch /var/log/radutmp<br />
touch /var/log/radwtmp<br />
chmod 600 /var/log/radutmp<br />
chmod 644 /var/log/radwtmp<br />
chown radiusd:radiusd /var/log/radutmp<br />
chown radiusd:radiusd /var/log/radwtmp<br />
shutdown -r now</p></blockquote>
<p>ลองละ work เสียแต่เวลาเปิดเครื่องมันนาน :X<br />
<span id="more-773"></span></p>
<p>3. ลง ezradius  มาร่วมสามารถ kick user ทีละราย และกำหนด timeout ได้ครับ เช่น เมื่อไม่มีการใช้งาน 10 นาที ดีด user ออก</p>
<p>ลงแล้วมองไม่เห็นuser ไม่ได้ใช้รหัสเป็น md5 กลัวทำแล้วเจ๊ง บลาๆๆ</p>
<p>4. ยาวอีก</p>
<p>ปัญหา : เมื่อเครื่องรีสตาร์ท user จะค้าง<br />
วิธีแก้ : เมื่อเปิดเครื่องใหม่ ให้ ดีด user ออก อัตโนมัติ</p>
<p>ให้ทดลองใช้เครื่องลูก login เข้าสู่ระบบไว้และห้ามออกจากระบบเพื่อทดสอบการ clear user และ<br />
ทำดังนี้</p>
<p>1. ให้สร้างไฟล์ /var/www/html/wifi/admin/del_user.php</p>
<p>&lt;?<br />
ob_start();<br />
include(&#8220;include/class.mysqldb.php&#8221;);<br />
include(&#8220;include/config.inc.php&#8221;);</p>
<p>$sql = &#8220;select * from radacct  where radacct.AcctStopTime = &#8216;0000-00-00 00:00:00&#8242; order by radacct.AcctStartTime &#8220;;<br />
$result = mysql_query($sql);</p>
<p>while($data = mysql_fetch_object($result)) {<br />
$user = $data-&gt;UserName;<br />
passthru(&#8220;/bin/echo &#8216;User-Name = $user&#8217; | /usr/local/bin/radclient -x localhost:3799 disconnect testing123&#8243;);<br />
$sql2 = &#8220;DELETE from radacct where ((AcctStopTime = &#8216;0000-00-00 00:00:00&#8242;) and (UserName=&#8217;$user&#8217;))&#8221;;<br />
$result2 = mysql_query($sql2);<br />
}</p>
<p>?&gt;</p>
<p>2. จากนั้นให้ chmod 777 /var/www/html/wifi/admin/del_user.php</p>
<p>3. แล้วให้ทำการ แก้ไข /etc/init.d/radiusd</p>
<p>บรรทัดที่ 37-39</p>
<p>echo -n $&#8221;Starting RADIUS server: &#8221;<br />
daemon $RADIUSD -y<br />
เพิ่ม(แทรก)ข้อความต่อไปนี้ใต้บรรทัดที่ 39   php /var/www/html/wifi/admin/del_user.php</p>
<p>จากนั้นสร้างไฟล์ clearuser.sh  เก็บไว้ที่ใหนก็ได้</p>
<p># nano /data/clearuser.sh    #มีข้อความดังนี้</p>
<p>echo &#8220;Clear user Freeradius and Restart System!&#8221;<br />
rm -rf /var/log/radius/radutmp<br />
rm -rf /var/log/radius/radwtmp<br />
touch /var/log/radius/radutmp<br />
touch /var/log/radius/radwtmp<br />
chmod 600 /var/log/radius/radutmp<br />
chmod 644 /var/log/radius/radwtmp<br />
chown radiusd:radiusd /var/log/radius/radutmp<br />
chown radiusd:radiusd /var/log/radius/radwtmp<br />
service radiusd restart</p>
<p>แล้วเปลี่ยนโหมด<br />
# chmod 777 /data/clearuser.sh</p>
<p>เมื่อ เปิดเครื่อง Server ใหม่ให้สั่งรันไฟล์สคริปเพิ่ม ดังนี้<br />
# cd /data<br />
#./clearuser.sh</p>
<p>ทดสอบ ใช้เครื่องลูก login เข้าสู่ระบบได้เลย</p>
<p>#Start clear user#<br />
rm -rf /var/log/radius/radutmp<br />
rm -rf /var/log/radius/radwtmp<br />
touch /var/log/radius/radutmp<br />
touch /var/log/radius/radwtmp<br />
chmod 600 /var/log/radius/radutmp<br />
chmod 644 /var/log/radius/radwtmp<br />
chown radiusd:radiusd /var/log/radius/radutmp<br />
chown radiusd:radiusd /var/log/radius/radwtmp<br />
service radiusd restart<br />
#End clear user#<br />
แค่นี้ก้เรียบร้อยครับ<br />
<a href="mailto:yothin15@hotmail.com">yothin15@hotmail.com</a> said (13:15):<br />
แก้ไข<br />
#Start clear user#<br />
rm -rf /var/log/radius/radutmp<br />
rm -rf /var/log/radius/radwtmp<br />
touch /var/log/radius/radutmp<br />
touch /var/log/radius/radwtmp<br />
chmod 600 /var/log/radius/radutmp<br />
chmod 644 /var/log/radius/radwtmp<br />
chown radiusd:radiusd /var/log/radius/radutmp<br />
chown radiusd:radiusd /var/log/radius/radwtmp<br />
service radiusd start<br />
#End clear user#</p>
<p>5. ถ้า user ในระบบไม่ค้าง radwho ดูแล้วไม่มี แต่มีชื่อใน ม.บูฯ<br />
select * from radacct  where radacct.AcctStopTime = &#8216;0000-00-00 00:00:00&#8242; order by radacct.AcctStartTime แล้วลบทิ้งนะครับ</p>
<p>6.อันนี้ ubuntu นะครับ<br />
หัว ข้อนี้เราจะมาพูดถึงเรื่องของการสั่ง Disconnect User ที่กำลัง online อยู่ ซึ่ง ณ ตอนนี้เราจะไม่สามารถสั่งเองได้นอกจาก User นั้นจะกด Logout ออกจากระบบเอง เรามาดูวิธีการแก้ไขว่ามีอะไรบ้าง ดังนี้</p>
<p>การสั่ง Disconnect นั้นทำได้ 3 วิธี<br />
1. พิมพ์คำสั่งจากเครื่อง SERVER<br />
2. กด Disconnect จาก phpmyprepaid<br />
3. กด Disconnect จาก ezradius</p>
<p>ก่อน ที่จะสั่ง Disconnect ทั้ง 3 วิธีด้านนี้ได้นั้นจะต้องเพิ่ม option ให้กับ chillispot ซะก่อนนะครับไม่งั้นจะใช้งานไม่ได้ครับ ซึ่งวิธีในการเพิ่ม option นั้น สามารถทำได้ดังนี้ครับ<br />
#pico /etc/default/chillispot //เปิดไฟล์ chillispot ขึ้นมาแก้ไข<br />
ที่บรรทัด<br />
DAEMON_ARGS=&#8221;&#8211;conf $CHILLICFG&#8221;<br />
แก้ไขเป็น<br />
DAEMON_ARGS=&#8221;&#8211;coaport 3779 &#8211;conf $CHILLICFG&#8221; //เพิ่มลงไป<br />
เสร็จแล้ว SAVE<br />
#/etc/init.d/chillispot restart</p>
<p>http://www.uboninfo.net/board/index.php?topic=1300.15%3Bwap2</p>
<p>path คนละที่ และลองลอกของชาวบ้านมาก็ใช้ไม่ได้..(หาที่มาไม่เจอละ)</p>
<p>super user copy and paste..</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/10/user-online/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/10/user-online/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[clarkconnect php5]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/10/clarkconnect-php5/" />
		<id>http://www.mtuser.com/?p=771</id>
		<updated>2009-10-04T12:16:11Z</updated>
		<published>2009-10-04T12:16:11Z</published>
		<category scheme="http://www.mtuser.com" term="linux" />		<summary type="html"><![CDATA[#echo &#8220;rpm [pcn] ftp://rhel-4:hiptop@rh.apt.clarkconnect.com System extras&#8221; &#62; /etc/apt/sources.list.d/extras.list
#apt-get update
#apt-get dist-upgrade
กว่าจะหาเจอ.. จดๆๆ
http://www.linuxthai.org/forum/index.php?topic=1820.0
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/10/clarkconnect-php5/"><![CDATA[<p>#echo &#8220;rpm [pcn] <a href="ftp://rhel-4:hiptop@rh.apt.clarkconnect.com/" target="_blank">ftp://rhel-4:hiptop@rh.apt.clarkconnect.com</a> System extras&#8221; &gt; /etc/apt/sources.list.d/extras.list</p>
<p>#apt-get update</p>
<p>#apt-get dist-upgrade</p>
<p>กว่าจะหาเจอ.. จดๆๆ</p>
<p>http://www.linuxthai.org/forum/index.php?topic=1820.0</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/10/clarkconnect-php5/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/10/clarkconnect-php5/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
		<entry>
		<author>
			<name>pang</name>
						<uri>http://www.mtuser.com</uri>
					</author>
		<title type="html"><![CDATA[grep]]></title>
		<link rel="alternate" type="text/html" href="http://www.mtuser.com/2009/09/grep/" />
		<id>http://www.mtuser.com/?p=767</id>
		<updated>2009-09-18T11:35:49Z</updated>
		<published>2009-09-18T08:41:25Z</published>
		<category scheme="http://www.mtuser.com" term="linux" />		<summary type="html"><![CDATA[จด..
grep &#8220;ddclient*&#8221; /var/log/syslog* &#124;more
จบ
]]></summary>
		<content type="html" xml:base="http://www.mtuser.com/2009/09/grep/"><![CDATA[<p>จด..</p>
<p>grep &#8220;ddclient*&#8221; /var/log/syslog* |more</p>
<p>จบ</p>
]]></content>
		<link rel="replies" type="text/html" href="http://www.mtuser.com/2009/09/grep/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.mtuser.com/2009/09/grep/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	</entry>
	</feed>
