<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[[转帖文章]Freebsd6.1+Apache2.2.3+Mysql5.0.26+PHP5.1.6+phpMyAdmin2.9.0.2手工整合指南]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Wed, 29 Aug 2007 10:12:22 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	经过一晚上的操作,终于成功整合.写一篇文章和大家交流一下经验,什么问题可以联系我. 我使用的操作系统是FreeBSD最新版本6.1,如果是别的操作系统安装方法有少许不一样,请作适当处理.<br/>说明：本文档系alone原创，经过辛勤实验，努力编辑而成，转载无妨，请不要修改任何内容。参考不少前辈文章，不一一列举，谨表感谢！如有错误，敬请好手斧正！费话少说,进入正题.<br/><br/>首先安装整合的工具必不可少.我整个过程用的到工具如下:<br/>Freebsd6.1<br/>下载地址:http://www.freebsd.org<br/>Apache2.2.3<br/>下载地址: http://www.apache.org<br/>Mysql5.0.26 for freebsd<br/>下载地址: http://dev.mysql.com/downloads/<br/>Php5.1.6<br/>下载地址: http://www.php.net/downloads.php<br/>libxml2-2.6.19<br/>下载地址:<br/>http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.19.tar.gz<br/>libiconv-1.9.1<br/>下载地址: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.1.tar.gz<br/>Phpmyadmin2.9.0.2 for nix<br/>下载地址: http://www.mycodes.net/soft/6369.htm<br/><br/><br/>一、&nbsp;&nbsp; Freebsd的安装<br/>安装FreeBSD就不讲了,熟悉linux的很容易上手,只要稍微定制一下就可以了,过程我就不说了。建议新手选择ALL安装方式。<br/><br/>二、&nbsp;&nbsp; 安装Apache<br/><br/>安装Apache要简单点,我这里安装的Apache版本是 httpd-2.2.3,下载回来的包叫做 httpd-2.2.3.tar.gz 我们放在 /usr/local/src目录下。如果没有该目录,就自己建一个。<br/>首先进入目录后解压缩:<br/># cd /usr/local/src<br/># tar -zxvf httpd-2.0.50.tar.gz<br/>然后就会得到 httpd-2.0.50目录,我们进入目录<br/># cd httpd-2.0.50<br/>首先配置:<br/># ./configure --prefix=/usr/local/apache &#92;--enable-module=so<br/>&#92;*--prefix指定我们要把Apache安装在那个目录,我们这里装在 /usr/local/apache下*&#92;<br/>&#92;*--enable-module=so必设，不然后面配置php时要出问题*&#92;<br/>执行上面的命令,如果没有错误信息,证明配置成功,然后进行编译:<br/># make<br/>一两分钟就编译完了,然后进行安装:<br/># make install<br/>安装完成后,Apache就存放在 /usr/local/apache目录下了, bin是执行文件的目录,conf是配置文件目录,htdocs是网页的主目录,logs是日志目录.<br/>Apache通过 bin/apachectl或者bin/httpd来控制启动或者停止.<br/><br/># /usr/local/apache/bin/httpd -k start #启动apache<br/># /usr/local/apache/bin/httpd -k stop #停止apache<br/># /usr/local/apache/bin/httpd -k restart #重启apache<br/><br/>然后你可以通过 http://IP来测试apache是否安装成功,如果出现apache的页面则安装成功,否则请检查上面的步骤.<br/><br/>三、&nbsp;&nbsp; 安装MySQL<br/><br/>我使用的的Mysql是5.0.26二进制版，不需要编译。<br/>把它下到/usr/local/src目录下，下载回来的包名字叫 mysql-5.0.26.tar.gz,然后我们把它解压出来:<br/><br/># tar -zxvf mysql-5.0.26.tar.gz<br/><br/>解压后生成/usr/local/mysql目录,我们进入该目录:<br/><br/># cd mysql<br/><br/>#pw groupadd mysql&nbsp;&nbsp; #建立mysql组<br/>#pw useradd –g mysql mysql&nbsp;&nbsp; #建立mysql用户并且加入到mysql组中<br/>#scripts/mysql_install_db --user=mysql&nbsp;&nbsp; #初试化表并且规定用mysql用户来访问<br/>#chown -R root .&nbsp;&nbsp; #然后设置权限<br/>#chown -R mysql data<br/>#chgrp -R mysql .<br/>设置完成后,基本上就装好了,好了,我们运行一下我们的mysql:<br/><br/>&nbsp;&nbsp;# /usr/local/mysql/bin/mysqld_safe --user=mysql &<br/><br/>&nbsp;&nbsp;如果没有问题的话,应该会出现类似这样的提示:<br/>[1] 42264 # Starting mysqld daemon with databases from /usr/local/mysql/var<br/>这就证明你安装成功了,如果出现:<br/><br/>[1] 42264<br/># Starting mysqld daemon with databases from /usr/local/mysql/var<br/>062110 01:53:45 mysqld ended<br/><br/>则证明你的mysql运行不来,请查看错误日志: /usr/local/mysql/var/*.err 然后确定安装是否成功,如果没有成功,请检查上面的步骤是否正确<br/><br/>.<br/>安装完成后,能够通过 /usr/local/mysql/bin/mysql 来连接mysql进行管理,如果你装了apache并且能够解析php的话,也能使用phpMyadmin来管<br/><br/>理你的mysql,记得装完后使用mysql或者mysqladmin来修改root的密码,这里我们就不说了,请参考相关的文章.<br/><br/>四、&nbsp;&nbsp; 安装php5脚本支持<br/>去以下地址下载源代码包到/usr/local/src/下，<br/>接着，安装libxml2 (安装php5必须,我们先不装，测试一下效果)：<br/>#cd /usr/local/src<br/>#tar –zxvf php-5.1.6.tar.gz<br/>#cd php-5.1.6<br/>#./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2 --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte<br/>有关于zend 的参数 --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte<br/>可见php内建对php加速软件zend的支持<br/>checking whether to enable LIBXML support... yes<br/>checking libxml2 install dir... no<br/>configure: error: xml2-config not found. Please check your libxml2 installation.<br/>出错啦<br/>现在来装libxml2<br/>#tar –zxvf libxml2-sources-2.6.19.tar.gz<br/># cd libxml2-2.6.19<br/># ./configure<br/>#make;make install<br/>再来配置:<br/># cd /usr/local/src/php-5.1.6<br/>#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte<br/>显示:<br/><br/>configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>;<br/><br/>--with-iconv-dir=DIR&nbsp;&nbsp; XMLRPC-EPI: iconv dir for XMLRPC-EPI.<br/>xmlrpc-epi is an implementation of the xmlrpc protocol in C. It provides an easy to use API for developers to serialize RPC requests to and from XML.<br/><br/># cd /usr/ports/converters/iconv<br/># make all<br/># make install<br/>===>; Installing for iconv-2.0_3<br/>===>;&nbsp;&nbsp; iconv-2.0_3 depends on file: /usr/local/bin/perl5.8.5 - found<br/>===>;&nbsp;&nbsp; Generating temporary packing list<br/>===>; Checking if converters/iconv already installed<br/>pkg_info: package bsdpan-DBD-mysql-2.9007 has no origin recorded<br/>pkg_info: package bsdpan-DBI-1.48 has no origin recorded<br/>===>; lib<br/>install -C -o root -g wheel -m 444&nbsp;&nbsp; libbiconv.a /usr/local/lib<br/>install -C -o root -g wheel -m 444&nbsp;&nbsp; libbiconv_p.a /usr/local/lib<br/>install -s -o root -g wheel -m 444&nbsp;&nbsp; libbiconv.so.2 /usr/local/lib<br/>ln -fs libbiconv.so.2 /usr/local/lib/libbiconv.so<br/>install -C -o root -g wheel -m 444 biconv.h /usr/local/include<br/>install -o root -g wheel -m 444 biconv.3.gz /usr/local/man/man3<br/>install -o root -g wheel -m 444 biconv_open.3.gz /usr/local/man/man3<br/>install -o root -g wheel -m 444 biconv_close.3.gz /usr/local/man/man3<br/>===>; ccs<br/>cd /usr/ports/converters/iconv/work/iconv-2.0/ccs; install -o root -g wheel -m 444&nbsp;&nbsp; big5.cct cns11643-plane1.cct cns11643-plane2.cct cns11643-plane14.cct cp775.cct cp850.cct cp852.cct cp855.cct cp866.cct gb_2312-80.cct iso-8859-1.cct iso-8859-2.cct iso-8859-4.cct iso-8859-5.cct iso-8859-15.cct jis_x0201.cct jis_x0208-1983.cct jis_x0212-1990.cct koi8-r.cct koi8-u.cct ksx1001.cct shift_jis.cct /usr/local/share/iconv; install -o root -g wheel -m 555 iconv_mktbl /usr/local/bin<br/>===>; ces<br/>cd /usr/ports/converters/iconv/work/iconv-2.0/ces && install -o root -g wheel -m 444&nbsp;&nbsp; euc-jp.so euc-kr.so euc-tw.so gb2312.so iso-10646-ucs-2.so iso-10646-ucs-4.so ucs-2-internal.so utf-16.so /usr/local/libexec/iconv<br/>===>; util<br/>install -s -o root -g wheel -m 555&nbsp;&nbsp; biconv /usr/local/bin<br/>install -o root -g wheel -m 444 biconv.1.gz /usr/local/man/man1<br/>&#123; echo "# BEGIN iconv"; cat /usr/ports/converters/iconv/work/iconv-2.0/ccs/charset.aliases /usr/ports/converters/iconv/work/iconv-2.0/ces/charset.aliases &#124; /usr/ports/converters/iconv/work/iconv-2.0/iconv_builtin -n us-ascii utf-8 ucs-4-internal; echo "# END iconv"; &#125; >; /usr/local/share/iconv/charset.aliases<br/>===>;&nbsp;&nbsp; Running ldconfig<br/>/sbin/ldconfig -m /usr/local/lib<br/>===>;&nbsp;&nbsp; Registering installation for iconv-2.0_3<br/><br/>&nbsp;&nbsp;再装libiconv-1.9.1.tar.gz,把libiconv-1.9.1.tar.gz放到/usr/local/src/下<br/># tar -zvxf libiconv-1.9.1.tar.gz<br/># cd libiconv-1.9.1<br/># ./configure<br/>#make;make install<br/># cd /php-5.0.4<br/>#./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --enable-maintainer-zts --enable-memory-limit --enable-zend-multibyte<br/>+--------------------------------------------------------------------+<br/>&#124; License:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>&#124; This software is subject to the PHP License, available in this&nbsp;&nbsp; &#124;<br/>&#124; distribution in the file LICENSE. By continuing this installation &#124;<br/>&#124; process, you are bound by the terms of this license agreement.&nbsp;&nbsp; &#124;<br/>&#124; If you do not agree with the terms of this license, you must abort &#124;<br/>&#124; the installation process at this point.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#124;<br/>+--------------------------------------------------------------------+<br/><br/>到此php5成功配置完成. Thanks : )<br/>#make<br/>#make test<br/>#make install<br/># cp /usr/local/src/php-5.0.4/php.ini-dist /usr/local/lib/php.ini<br/><br/>配置php.ini请参考手册<br/><br/>五、&nbsp;&nbsp; phpMyAdmin的安装<br/>phpMyAdmin是比较好的通过web访问方式来管理数据库的免费程序。<br/>下载该程序后，通过flashfxp上传到/usr/local/apache/htdocs/目录下，执行如下命令：<br/>#cd /usr/local/apache/htdocs<br/>#tar –zvxf phpMyAdmin-2.9.0.2.tar.gz<br/>mv –fi phpMyAdmin-2.9.0.2 phpmyadmin<br/>www# cd phpmyadmin<br/>www#cp config..simple.inc.php config.inc.php<br/>修改config.inc.php文件如下：<br/>（1）查找$cfg['PmaAbsoluteUri'] = ''; ，将该行内容更改为$cfg['PmaAbsoluteUri'] = 'http://IP/phpmyadmin/';<br/>执行:wq!命令保存退出，在IE浏览器里输入http://IP/phpmyadmin/就可以访问了。<br/>请注意其中的红色文字，默认的mysql数据库用户名root是没有密码的，这是一个安全漏洞，所以我们要修改数据库的密码，请执行如下步骤：<br/>首先点“权限”，进入另一个页面<br/>在新页面中，勾选三个用户，只剩下一个用户名为root、主机为localhost的用户，然后点“执行”来删除那三个勾选的用户，<br/>只剩下一个root用户了，勾选它，点“编辑”，再点击“更改密码”下面的“密码”前的圆圈，选择它，然后敲入你的mysql数据库密码（比如789），再点“执行”。这样mysql的数据库密码就改变了。当然了，我们也可以通过phpmyadmin来创建新的mysql数据库名，用户名等等，这些功能就要你自己去探索了。我们再点IE浏览器里的“刷新”来刷新该页面，就会出现无法访问的情况。<br/>出现上面的情况后，也不要着急，我们可以修改phpmyadmin的配置文件config.inc.php来解决这个问题，执行如下命令：<br/>www#vi config.inc.php<br/>更改内容如下：<br/>（2）查找$cfg['Servers'][$i]['auth_type'] = 'config';<br/>更改为$cfg['Servers'][$i]['auth_type'] = 'http';<br/>$cfg['Servers'][$i]['controluser'] = '你的用户名';<br/>$cfg['Servers'][$i]['controlpass'] = '你的密码';<br/>然后重新在IE浏览器里输入http://IP/phpmyadmin/ 访问，敲入用户名“root”和密码后，点“确定”，就可以重新进入到phpmyadmin管理页面，至此，phpmyadmin安装完毕。<br/><br/><br/>到些，整个过程完毕.你可以上传php网站程序、修改apache的httpd.conf文件配置一台高性能的web服务器，当然也不要忘了mysql数据库对数据库、用户相应的增减。在这里我就不说了。现在已经是凌晨3点，累就一个字。呼呼去咯……<br/><br/><br/><br/>后话:当然你也可以直接选择ports安装,更方便快捷。<br/>附过程:<br/># cd /usr/ports/www/apache2<br/># make install clean<br/><br/># cd /usr/ports/databases/mysql5X-server<br/># make install clean<br/># source ~/.cshrc<br/># mysql_install_db --user=mysql<br/><br/># cd /usr/ports/lang/php5<br/># make install clean<br/>在出现的界面中选中apache2， 如果要用zend，不要选debug<br/><br/>cp /usr/local/etc/php.ini-dist php.ini<br/>vi /usr/local/etc/apache2/httpd.conf<br/>添加<br/>AddType application/x-http-php .php<br/>AddType application/x-http-php-source .phps<br/>在 DirectoryIndex 后加一个 index.php<br/><br/># cd /usr/ports/lang/php5-extensions<br/># make config<br/>在出现的界面中选种想要的<br/># make install clean<br/><br/>如果要装zend，去www.zend.com 下载相应的包，解压缩<br/># ./install.sh<br/><br/>就这么简单。<br/>如果php要装GD libxml2 libxslt 等支持，源码都要自己装，用ports只要选一下就ok了~而且以后方便升级和维护。<br/><br/>由于改版，把资料弄得有点混乱，现在重发下。
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [转帖文章]Freebsd6.1+Apache2.2.3+Mysql5.0.26+PHP5.1.6+phpMyAdmin2.9.0.2手工整合指南]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>