<?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>ls /proc &#187; debian</title>
	<atom:link href="http://www.lsproc.com/blog/tag/debian/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lsproc.com/blog</link>
	<description>lsproc.com</description>
	<lastBuildDate>Fri, 18 Nov 2011 09:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>lamp 相关配置 [Debian]</title>
		<link>http://www.lsproc.com/blog/configure_lamp/</link>
		<comments>http://www.lsproc.com/blog/configure_lamp/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 08:35:41 +0000</pubDate>
		<dc:creator>lostsnow</dc:creator>
				<category><![CDATA[Linux&Webserver]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.lostk.com/blog/configure_lamp/</guid>
		<description><![CDATA[转载时请标明文章原始出处和作者信息, 作者: lostsnow.http://www.lsproc.com/blog/configure_lamp/ 编译环境 Debian (Ubuntu) apt-get install build-essential apt-get install libncurses5-dev sudo apt-get install libxml2-dev libcurl3-dev libpng-dev libmhash-dev libmcrypt-dev libxslt-dev libpspell-dev Mysql编译安装参数 CHOST=&#34;i686-pc-linux-gnu&#34; CFLAGS=&#34;-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer&#34; CXXFLAGS=&#34;-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe &#8230; <a href="http://www.lsproc.com/blog/configure_lamp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>转载时请标明文章原始出处和作者信息, 作者: <a href="http://www.lsproc.com/blog/">lostsnow</a>.<br /><a href="http://www.lsproc.com/blog/configure_lamp/">http://www.lsproc.com/blog/configure_lamp/</a></p>
<p>编译环境</p>
<p>Debian (Ubuntu)</p>
<pre class="brush: bash">
apt-get install build-essential
apt-get install libncurses5-dev
sudo apt-get install libxml2-dev libcurl3-dev libpng-dev libmhash-dev libmcrypt-dev libxslt-dev libpspell-dev
</pre>
<p><strong>Mysql编译安装参数</strong></p>
<pre class="brush: bash">CHOST=&quot;i686-pc-linux-gnu&quot; CFLAGS=&quot;-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer&quot; CXXFLAGS=&quot;-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer&quot; ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Community-Server --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-ndb-debug --without-isam --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock</pre>
<p>配置成功会提示：</p>
<p>MySQL has a Web site athttp://www.mysql.com/which carries details on the<br />
latest release, upcoming features, and other information to make your<br />
work or play with MySQL more productive. There you can also find<br />
information about mailing lists for MySQL discussion.</p>
<p>Remember to check the platform. specific part of the reference manual for<br />
hints about installing MySQL on your platform. Also have a look at the<br />
files in the Docs directory.</p>
<p>Thank you for choosing MySQL!</p>
<pre class="brush: bash">
make
make install

groupadd mysql                     //增加mysql组
useradd -g mysql mysql         //增加mysql用户，这个用户属于mysql组
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root:mysql . //设置权限，注意后面有一个 &quot;.&quot;
chown -R mysql /var/lib/mysql //设置 mysql 目录权限
chgrp -R mysql . //注意后面有一个 &quot;.&quot;
cp share/mysql/my-medium.cnf /etc/my.cnf
cp share/mysql/mysql.server /etc/init.d/mysqld //开机自动启动 mysql。
chmod 755 /etc/init.d/mysqld
rcconf    //开启启动服务设置
/etc/init.d/mysqld start //启动 MySQL
bin/mysqladmin -u root password &quot;password_for_root&quot;
</pre>
<p><strong>查看mysql编译参数</strong><br />
cat /usr/local/mysql/bin/mysqlbug |grep ./configure</p>
<p>把 mysql 加入环境变量<br />
export PATH="$PATH:/usr/local/mysql/bin"</p>
<p>apache 编译</p>
<pre class="brush: bash">
./configure   //配置源代码树
--prefix=/usr/local/apache2  //体系无关文件的顶级安装目录PREFIX ，也就Apache的安装目录。
--enable-module=so   //打开 so 模块，so 模块是用来提 DSO 支持的 apache 核心模块
--enable-deflate=shared   //支持网页压缩
--enable-expires=shared   //支持 HTTP 控制
--enable-rewrite=shared   //支持 URL 重写
--enable-cache  //支持缓存
--enable-file-cache  //支持文件缓存
--enable-mem-cache  //支持记忆缓存
--enable-disk-cache //支持磁盘缓存
--enable-static-support   //支持静态连接(默认为动态连接)
--enable-static-htpasswd   //使用静态连接编译 htpasswd - 管理用于基本认证的用户文件
--enable-static-htdigest  //使用静态连接编译 htdigest - 管理用于摘要认证的用户文件
--enable-static-rotatelogs  //使用静态连接编译 rotatelogs - 滚动 Apache 日志的管道日志程序
--enable-static-logresolve   //使用静态连接编译 logresolve - 解析 Apache 日志中的IP地址为主机名
--enable-static-htdbm   //使用静态连接编译 htdbm - 操作 DBM 密码数据库
--enable-static-ab  //使用静态连接编译 ab - Apache HTTP 服务器性能测试工具
--enable-static-checkgid   //使用静态连接编译 checkgid
--disable-cgid  //禁止用一个外部 CGI 守护进程执行CGI脚本
--disable-cgi   //禁止编译 CGI 版本的 PHP
--disable-userdir  //禁止用户从自己的主目录中提供页面
--with-mpm=worker // 让apache以worker方式运行
--enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要。

make
make install
</pre>
<p>建立一个符号连接：</p>
<pre class="brush: bash">
ln -s /usr/local/apache2/bin/apachectl /etc/init.d/httpd
rcconf    //加入自动启动
</pre>
<p>php 编译</p>
<pre class="brush: bash">
CHOST=&quot;i686-pc-linux-gnu&quot; CFLAGS=&quot;-O3 -msse2 -mmmx -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer&quot; CXXFLAGS=&quot;-O3 -msse2 -mmmx -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer&quot; ./configure --prefix=/usr/local/php5 --with-mysql=/usr/local/mysql --with-gd --enable-calendar --with-zlib --with-curl --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl --enable-zend-multibyte --with-gettext --with-mcrypt --enable-exif --with-png-dir=/usr/local/lib --enable-ftp --with-mhash --with-libxml-dir=/usr/local/lib --with-xsl --with-pspell
</pre>
<p>配置完成提示<br />
+--------------------------------------------------------------------+<br />
| License:                                                           |<br />
| This software is subject to the PHP License, available in this     |<br />
| distribution in the file LICENSE.  By continuing this installation |<br />
| process, you are bound by the terms of this license agreement.     |<br />
| If you do not agree with the terms of this license, you must abort |<br />
| the installation process at this point.                            |<br />
+--------------------------------------------------------------------+</p>
<p>Thank you for using PHP.</p>
<pre class="brush: bash">
make
make install
</pre>
<p>修改/usr/local/apache2/conf/httpd.conf，在AddType部分加入如下内容<br />
AddType application/x-httpd-php .php
<p>-- EOF --</p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li>2006-08-22 -- <a href="http://www.lsproc.com/blog/trouble-with-rebuild-system/" title="重装系统是件麻烦的事">重装系统是件麻烦的事</a> (0)</li><li>2008-03-01 -- <a href="http://www.lsproc.com/blog/close_timewait_connection/" title="如何关闭time_wait连接">如何关闭time_wait连接</a> (4)</li><li>2007-09-07 -- <a href="http://www.lsproc.com/blog/php_mysql_study_4/" title="PHP 和 Mysql 学习笔记（四）">PHP 和 Mysql 学习笔记（四）</a> (0)</li><li>2007-06-22 -- <a href="http://www.lsproc.com/blog/php_mysql_study_2/" title="PHP 和 Mysql 学习笔记（二）">PHP 和 Mysql 学习笔记（二）</a> (0)</li><li>2010-05-21 -- <a href="http://www.lsproc.com/blog/nginx_php_pathinfo_securit/" title="Nginx/PHP 文件类型错误解析漏洞：fix_pathinfo">Nginx/PHP 文件类型错误解析漏洞：fix_pathinfo</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.lsproc.com/blog/configure_lamp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

