<?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>STORY of AODDY. &#187; Apache</title>
	<atom:link href="http://www.aoddy.com/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aoddy.com</link>
	<description>If you lose yourself, you lose everything. -- Michael Scofield</description>
	<lastBuildDate>Sat, 17 Jul 2010 00:06:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to install trac service on Ubuntu for multiple projects using Mod_Python.</title>
		<link>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/</link>
		<comments>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 16:25:21 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=228</guid>
		<description><![CDATA[Previously I have installed a DNS service on my Ubuntu server. Today I would like to install a Trac service which supports for multiple projects using Mod_Python on Apache. Condition : I would like to use sub-domain for trac service &#8230; <a href="http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="How to install DNS server on Ubuntu 8.04.1." href="http://www.aoddy.com/2008/10/11/how-to-install-dns-server-on-ubuntu-8041/" target="_blank"><img class="alignleft" style="margin: 5px;" title="Trac Integrated SCM &amp; Project management" src="http://www.edgewall.org/gfx/trac_logo.png" alt="Trac Logo" width="214" height="61" />Previously</a> I have installed a DNS service on my Ubuntu server. Today I would like to install a Trac service which supports for multiple projects using Mod_Python on Apache.</p>
<p><span style="text-decoration: underline;"><strong><br />
</strong></span></p>
<p><span style="text-decoration: underline;"><strong>Condition :</strong></span></p>
<ol>
<li>I would like to use sub-domain for trac service that is trac.aoddy.com</li>
<li>Trac service can support multiple projects such as trac.aoddy.com/Project1, trac.aoddy.com/Project2</li>
<li>Trac service supports SVN service too.</li>
</ol>
<p><span id="more-228"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<span style="text-decoration: underline;"><strong>Softwares :<br />
</strong></span></p>
<ol>
<li>enscript</li>
<li>libapache2-mod-python</li>
<li>python-docutils</li>
<li>trac</li>
<li>db4.3-util</li>
<li>libapache2-svn</li>
<li>subversion-tools</li>
</ol>
<p>You can install software by</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo apt-get install enscript libapache2-mod-python python-docutils trac db4.3-util libapache2-svn subversion-tools</pre></td></tr></table></div>

<p><span style="text-decoration: underline;"><strong>Install &amp; Configurations :</strong></span></p>
<ol>
<li>Create SVN directory such as :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir /svn</pre></td></tr></table></div>

</li>
<li>Set SVN directory to repository.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo svnadmin create /svn</pre></td></tr></table></div>

</li>
<li>Create a user account so as to security policy.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo htpasswd 2 -cm /etc/apach2/dav_svn.passwd YOUR-ACCOUNT</pre></td></tr></table></div>

</li>
<li>Create TRAC directory such as :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir /trac</pre></td></tr></table></div>

</li>
<li>Change owner of TRAC directory to www-data :

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo chown -R www-data:www-data /trac</pre></td></tr></table></div>

</li>
<li>Create a configuration file of TRAC in apache

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo vi /etc/apache2/site-available/trac.aoddy.com
&lt;VirtualHost * &gt;
ServerName trac.aoddy.com
DocumentRoot /trac
&lt;Location /&gt;
SetHandler mod_python
PythonInterpreter main_interpreter
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /
&lt;/Location&gt;
&lt;LocationMatch &quot;/[^/]+/login&quot;&gt;
AuthType Basic
AuthName &quot;Trac&quot;
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
&lt;/LocationMatch&gt;
Alias /svn /svn
&lt;Location /svn/&gt;
DAV svn
SVNParentPath /svn
SVNListParentPath On
AuthType Basic
AuthName &quot;Subversion Repository&quot;
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/authz_svn.access
Require valid-user
&lt;/Location&gt;
ErrorLog /var/log/apache2/trac.aoddy.com/error.log
CustomLog /var/log/apache2/trac.aoddy.com/access.log common
&lt;/VirtualHost&gt;</pre></td></tr></table></div>

</li>
<li>Create a directory for keep error log.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo mkdir -p /var/log/apache2/trac.aoddy.com/</pre></td></tr></table></div>

</li>
<li>Add this site into apache service.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo a2ensite trac.aoddy.com
$ sudo /etc/init.d/apach2 restart</pre></td></tr></table></div>

</li>
<li>Sometime you need to re-configure in this file, I recommend you should use these commands.

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo a2dissite trac.aoddy.com
$ sudo a2ensite trac.aoddy.com
$ sudo /etc/init.d/apach2 restart</pre></td></tr></table></div>

</li>
<li>Test by open an URL http://trac.aoddy.com/</li>
</ol>
<p><span style="text-decoration: underline;"><strong>Create SVN</strong></span></p>
<p>You can use this script for create a SVN environment.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">#!/bin/bash
PROJECTNAME=$1
mkdir -p /tmp/${PROJECTNAME}/branches /tmp/${PROJECTNAME}/tags/ /tmp/${PROJECTNAME}/trunks
svnadmin create /svn/${PROJECTNAME}
svn import /tmp/${PROJECTNAME} file:///svn/${PROJECTNAME} -m &quot;initial import&quot;
sudo rm -rf /tmp/${PROJECTNAME}</pre></td></tr></table></div>

<p>Don&#8217;t remember to change mode of this script to execute file and run this script by root permission.</p>
<p><span style="text-decoration: underline;"><strong>Create TRAC </strong></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo trac-admin /trac/YOUR-PROJECT-NAME initenv</pre></td></tr></table></div>

<p>After you run this command you should find some question about your project</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">the project name (YOUR-PROJECT-NAME)
use the default database connection string (sqlite:db/trac.db)
the path to svn repository (/svn/YOUR-PROJECT-NAME)
use the default Trac templates directory (/usr/share/trac/templates)</pre></td></tr></table></div>

<p>Change permission of this project so as to support apache service</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">$ sudo chown -R www-data /trac/YOUR-PROJECT-NAME</pre></td></tr></table></div>

<p>Woowww, you should find your new project on trac service at http://trac.aoddy.com/YOUR-PROJECT-NAME<br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/10/17/how-to-install-trac-service-on-ubuntu-for-multiple-projects-using-mod_python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to create virtual host on Apache.</title>
		<link>http://www.aoddy.com/2008/05/11/how-to-create-virtual-host-on-apache/</link>
		<comments>http://www.aoddy.com/2008/05/11/how-to-create-virtual-host-on-apache/#comments</comments>
		<pubDate>Sun, 11 May 2008 13:41:22 +0000</pubDate>
		<dc:creator>aoddy</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/2008/05/11/how-to-create-virtual-host-on-apache/</guid>
		<description><![CDATA[Yesterday, my boss wanted to start his new domain on old web server. I ever heard about apache could start many domain on one server by virtual host. I tried to find document for configuration and I found&#8230;. 1. Change &#8230; <a href="http://www.aoddy.com/2008/05/11/how-to-create-virtual-host-on-apache/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, my boss wanted to start his new domain on old web server. I ever heard about apache could start many domain on one server by virtual host. I tried to find document for configuration and I found&#8230;.</p>
<p><span id="more-123"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-2013111130648878";
google_ad_slot = "7396784224";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
1. Change ServerName variable in /etc/httpd/conf/httpd.conf to your IP Address.</p>
<table bgcolor="#000000" width="90%">
<tr>
<td><font color="#ffffff">NameVirtualHost 192.168.0.3</font></td>
</tr>
</table>
<p>2. Create virtual host by add below these lines in /etc/httpd/conf/httpd.conf :</p>
<table bgcolor="#000000" width="90%">
<tr>
<td><font color="#ffffff">&lt;virtualhost&gt;<br />
</font></p>
<blockquote><p><font color="#ffffff"> ServerAdmin  admin@aoddy2.com</font><br />
<font color="#ffffff"> DocumentRoot  /var/www/html/aoddy2</font><br />
<font color="#ffffff"> ServerName  www.aoddy2.com</font><br />
<font color="#ffffff"> ErrorLog  /var/www/html/aoddy2/logs/error_log</font><br />
<font color="#ffffff"> TransferLog  /var/www/html/aoddy2/logs/access_log</font></p></blockquote>
<p><font color="#ffffff"> &lt;/virtualhost&gt;<br />
&lt;virtualhost&gt;<br />
</font></p>
<blockquote><p><font color="#ffffff"> ServerAdmin  admin@aoddy3.com</font><br />
<font color="#ffffff"> DocumentRoot  /var/www/html/aoddy3</font><br />
<font color="#ffffff"> ServerName  www.aoddy3.com</font><br />
<font color="#ffffff"> ErrorLog  /var/www/html/aoddy3/logs/error_log</font><br />
<font color="#ffffff"> TransferLog  /var/www/html/aoddy3/logs/access_log</font></p></blockquote>
<p><font color="#ffffff"> &lt;/virtualhost&gt;</font></td>
</tr>
</table>
<p>3. Restart httpd service</p>
<table bgcolor="#000000" width="90%">
<tr>
<td><font color="#ffffff"># service httpd restart</font></td>
</tr>
</table>
<p>Perfect !!!! Woooo <img src='http://www.aoddy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2008/05/11/how-to-create-virtual-host-on-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install PHP5,Apach2.2,MySQL5 by manual compile.</title>
		<link>http://www.aoddy.com/2007/12/08/how-to-install-php5apach22mysql5-by-manual-compile/</link>
		<comments>http://www.aoddy.com/2007/12/08/how-to-install-php5apach22mysql5-by-manual-compile/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 09:47:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/2007/12/08/how-to-install-php5apach22mysql5-by-manual-compile/</guid>
		<description><![CDATA[ได้รับมอบหมายให้ Install OS พร้อม Software จำพวก Apache, PHP5 แล้วก็ MySQL5 เริ่มแรกเราก็ไปหา source file มาก่อน เตรียมๆ เอาไว้ ดังนี้ Apache 2.2 MySQL 5.0.37 PHP 5.2.1 ลำดับการติดตั้ง ก็ตามนี้ครับ การติดตั้ง Apache 2.2 การติดตั้ง MySQL 5.0.37 : http://laffers.net/howtos/howto-install-mysql การติดตั้ง PHP 5.2.1 *** ไอ้ Apache กะ &#8230; <a href="http://www.aoddy.com/2007/12/08/how-to-install-php5apach22mysql5-by-manual-compile/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ได้รับมอบหมายให้ Install OS พร้อม Software จำพวก Apache, PHP5 แล้วก็ MySQL5 เริ่มแรกเราก็ไปหา source file มาก่อน เตรียมๆ เอาไว้ ดังนี้</p>
<ol>
<li><a href="http://httpd.apache.org/download.cgi">Apache 2.2</a></li>
<li><a href="http://dev.mysql.com/downloads/mysql/5.2.html">MySQL 5.0.37</a></li>
<li><a href="http://www.php.net/downloads.php">PHP 5.2.1</a></li>
</ol>
<p>ลำดับการติดตั้ง ก็ตามนี้ครับ</p>
<ol>
<li>การติดตั้ง Apache 2.2</li>
<li>การติดตั้ง MySQL 5.0.37 : <a href="http://laffers.net/howtos/howto-install-mysql">http://laffers.net/howtos/howto-install-mysql</a></li>
<li>การติดตั้ง PHP 5.2.1</li>
</ol>
<p><span id="more-85"></span><br />
*** ไอ้ Apache กะ MySQL เนี้ยจะอันไหนก่อนก็ได้นะครับ แต่ PHP ขอเป็นอันท้ายสุดละกัน..เวลา Compile มันต้องทำให้ PHP รู้จักกับ Apache&amp;MySQL ด้วยอ่ะครับ (การ set prefix) มาเริ่มกันเลยดีกว่าครับ&#8230;<!--break--></p>
<p><strong><font color="red">1. การติดตั้ง Apache 2.2</font></strong><br />
<blockcode><br />
# tar xvfj httpd-2.2.4.tar.bz2  -&gt; อันนี้ถ้าเรา Download มาเป็น .tar.gz ก็ใช้ tar xvfz httpd-2.2.4.tar.gz ครับ<br />
# cd httpd-2.2.4<br />
# ./configure &#8211;prefix=/usr/local/apache2  -&gt;  prefix ตรงนี้เป็น option ที่ให้เรากำหนดว่าเราจะเอา ไฟล์ที่ จะ install ไปไว้ที่ path ไหน<br />
# make          -&gt; เริ่มทำการ Compile<br />
# make install    -&gt; install ครับ<br />
</blockcode></p>
<p>เป็นอันเสร็จสิ้นในส่วนของ Apache</p>
<p><strong><font color="red">2. การติดตั้ง MySQL 5.0.37</font></strong></p>
<p>อันนี้ก็คล้ายๆ กับ apache ครับ</p>
<p><blockcode><br />
# tar xvfz mysql-5.0.37.tar.gz<br />
# cd mysql-5.0.37<br />
# ./configure &#8211;prefix=/usr/local/mysql5  -&gt; ถ้าอยากรู้ว่า default เป็นอะไร ก็ให้ลองพิมพ์ ./configure &#8211;help<br />
# make          -&gt; เริ่มทำการ Compile<br />
# make install    -&gt; install ครับ<br />
# cp support-files/my-medium.cnf /etc/my.cnf<br />
</blockcode><br />
เมื่อถึงขั้นตอนนี้ให้คุณเข้าไปแก้ไขไฟล์ /etc/my.cnf โดยให้เพิ่ม user = mysql ไปที่บรรทัดใต้คำว่า <strong>[mysqld]</strong> อ่ะแล้วก็ Save<br />
<blockcode># cd /usr/local/mysql5<br />
# bin/mysql_install_db &#8211;user=mysql<br />
# chown -R root  .<br />
# chown -R mysql var<br />
# chgrp -R mysql .<br />
# bin/mysqld_safe &#8211;user=mysql &amp;  -&gt; Start ครับผม</blockcode><br />
ทำการทดสอบว่า mysql ทำงานได้เปล่า ก็ ใช้คำสั่งนี้ดู<br />
<blockcode># /usr/local/mysql5/bin/mysqladmin version</blockcode><br />
ถ้าออกมาเป็น version ต่างๆของ mysql ก็ถือว่า ผ่าน ต่อไปก็เป็นการ set password ให้กับ user root โดยต้อง Login เข้าไปเป็น root ก่อนดังนี้<br />
<blockcode># /usr/local/mysql5/bin/mysql -u root</blockcode><br />
เมื่อเข้าไปแล้วก็ใช้คำสั่งตามนี้<br />
<blockcode>DELETE FROM mysql.user WHERE User = &#8221;;<br />
FLUSH PRIVILEGES;<br />
SELECT Host, User FROM mysql.user;<br />
SET PASSWORD FOR &#8216;root&#8217;@'localhost&#8217; = PASSWORD(&#8216;new_password&#8217;);<br />
SET PASSWORD FOR &#8216;root&#8217;@'host_name&#8217; = PASSWORD(&#8216;new_password&#8217;);<br />
quit</blockcode><br />
หลังจากนั้นก็ ทำการ Restart Mysql อีกซักรอบ โดย<br />
<blockcode># /usr/local/mysql5/bin/mysqladmin -u root -p shutdown<br />
# /usr/local/mysql5/bin/mysqld_safe &#8211;user=mysql &amp;<br />
</blockcode><br />
เป็นอันเสร็จสิ้น ในส่วนของ mysql</p>
<p><strong><font color="red">3. การติดตั้ง PHP 5.2.1</font></strong></p>
<p>สำหรับ PHP เวลาติดตั้งคุณจำเป็นต้อง บอก path ของ apache กับ mysql ด้วยครับ โดยตอนที่คุณบอก ก็คือตอนใช้ คำสั่ง configure นั่นเอง ตามนี้ครับ<br />
<blockcode><br />
# tar xvfz php-5.2.1.tar.gz<br />
# cd php-5.2.1<br />
# ./configure &#8211;prefix=/usr/local/php5 &#8212;-with-apxs2=/usr/local/apache2/bin/apxs &#8211;with-mysql=/usr/local/mysql5<br />
# make<br />
# make install<br />
</blockcode><br />
เป็นอันเสร็จพิธีทั้งหมด..</p>
<p>หลังจากนี้เราก็มาดูวิธีการ Start Service แต่ละตัวกันครับมาเริ่มที่</p>
<p>apache : /usr/local/apache2/bin/apachectl start ** อันนีเราสามารถเปลี่ยนได้เป็น start/stop/restart ครับ</p>
<p>mysql : /usr/local/mysql5/bin/mysqld_safe &#8211;user=mysql &amp;</p>
<p>php : อันนี้ไม่ต้อง start ครับมันจะถูกผูกให้โดยอัตโมมัติ ตอนที่เรา compile นั่นเอง</p>
<p>คราวนี้เราก็มาดูกันครับว่า..ไอ้ที่เรา ติดตั้งไป มันใช้ได้เปล่า&#8230;ก็ให้ลอง เขียน script php ขึ้นมาซักอันครับเช่น<br />
<blockcode> phpinfo();<br />
?&gt;<br />
</blockcode> save เป็นชื่อไฟล์ว่า noi.php (noi เป็นชื่อสาวครับ..ผมจีบอยู่ อิๆ) แล้วก็เอาไปวางไว้ที่ path /usr/local/apache2/htdocs/ หลังจากนั้นก็ไปเครื่องอื่น..แล้วลองใช้โปรแกรม Web Browser เรียกหน้าดังกล่าวดู เช่น http://192.168.168.12/noi.php</p>
<p>ถ้าได้หน้าตาเว็บเป็นแบบนี้ก็แสดงว่า..โอเคครับ</p>
<p><center><a href="http://www.aoddy.com/wp-content/uploads/2007/12/index.jpg" title="index.jpg"><img src="http://www.aoddy.com/wp-content/uploads/2007/12/index.thumbnail.jpg" alt="index.jpg" /></a></center>จบ..ครับ เดี๋ยวคราวหน้าจะมาพูดถึงการติดตั้ง ProFTFD กันพร้อมกับ ตัวอย่างการ Config สำหรับคราวนี้เอาไว้แค่นี้ก่อนละกันครับพี่น้องงงงงงงง สวัสดี</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2007/12/08/how-to-install-php5apach22mysql5-by-manual-compile/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Apache&amp;PHP5&amp;MySQL5 on Ubuntu 7.04</title>
		<link>http://www.aoddy.com/2007/09/15/apachephp5mysql5-on-ubuntu-704/</link>
		<comments>http://www.aoddy.com/2007/09/15/apachephp5mysql5-on-ubuntu-704/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 14:05:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.aoddy.com/?p=11</guid>
		<description><![CDATA[ไม่มีไรครับ&#8230;อยากจะเอางานที่เขียนด้วย PHP มา Test ที่เครื่องผม คำสั่งในการ ให้ Ubuntu สุดรักของผมมี โปรแกรมพวกนี้ ก็คือ # # sudo apt-get install apache2 php5 mysql-client-5.0 mysql-server-5.0 phpmyadmin libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql # หลังจากที่ มันทำอะไรของมันเสร็จ ผมก็อยาก Set password ให้กับ MySQL ผมซ่ะหน่อยก็ตามนี้ครับ # mysqladmin -u root password พาสเวิร์ดที่เราจะใช้ เวลาจะเข้าไปใช้ก็ &#8230; <a href="http://www.aoddy.com/2007/09/15/apachephp5mysql5-on-ubuntu-704/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>ไม่มีไรครับ&#8230;อยากจะเอางานที่เขียนด้วย PHP มา Test ที่เครื่องผม คำสั่งในการ ให้ Ubuntu สุดรักของผมมี โปรแกรมพวกนี้ ก็คือ</p>
<table bgcolor="black" width="95%">
<tr>
<td><font color="white">#<br />
# sudo apt-get install apache2 php5 mysql-client-5.0 mysql-server-5.0 phpmyadmin libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql<br />
#<br />
</font></td>
</tr>
</table>
<p><span id="more-11"></span></p>
<p>หลังจากที่ มันทำอะไรของมันเสร็จ ผมก็อยาก Set password ให้กับ MySQL ผมซ่ะหน่อยก็ตามนี้ครับ</p>
<p># mysqladmin -u root password พาสเวิร์ดที่เราจะใช้</p>
<p>เวลาจะเข้าไปใช้ก็</p>
<p># mysql -u root -p<br />
Enter password: กรอกพาสเวิร์ด</p>
<p>คราวนี้พอ start เสร็จแล้วมันจะมี Error ขึ้นว่า</p>
<table bgcolor="black" width="95%">
<tr>
<td><font color="white">apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.1.1 for ServerName<br />
</font></td>
</tr>
</table>
<p>ให้เข้าไปแก้ไขในไฟล์ /etc/apache2/apache2.conf</p>
<p>โดยให้เข้าไปเพิ่ม</p>
<p>ServerName &#8220;localhost&#8221;</p>
<p>ใต้บรรทัด</p>
<p>ServerRoot &#8220;/etc/apache2&#8243;</p>
<p>นอกจากนั้น&#8230;ก็ลองไปที่ Browser แล้วลองพิมพ์คำว่า http://localhost</p>
<p>ถ้ามันมีหน้าเด้งมาให้เรา Save File ก็ให้กลับไปแก้ที่ ไฟล์ /etc/apache2/apache2.conf อีกครั้งโดย เพิ่มบรรทัดนี้ไปไว้ที่ท้ายบรรทัดของไฟล์</p>
<table bgcolor="black" width="95%">
<tr>
<td><font color="white"># Use for PHP 5.x:<br />
LoadModule php5_module          /usr/lib/apache2/modules/libphp5.so<br />
AddHandler php5-script php</font><font color="white"># Add index.php to your DirectoryIndex line:<br />
DirectoryIndex index.html index.php</font><font color="white">AddType text/html       php</font><font color="white"># PHP Syntax Coloring<br />
# (optional but useful for reading PHP source for debugging):<br />
AddType application/x-httpd-php-source phps<br />
</font></td>
</tr>
</table>
<p>ก็จะสามารถเข้าไปใช้ได้ครับ&#8230;จบตามนั้น&#8230;</p>
<p><!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aoddy.com/2007/09/15/apachephp5mysql5-on-ubuntu-704/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
