Debian Lighttpd PHP MySQL

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
第1行: 第1行:
 +
==安装包==
 +
/etc/apt/sources.list file.
 +
deb http://packages.dotdeb.org stable all
 +
deb-src http://packages.dotdeb.org stable all
 +
# apt-get update
 +
install MySQL4
 +
# apt-get install mysql-server-4.1 mysql-client-4.1 libmysqlclient14-dev
 +
install MySQL5
 +
# apt-get install mysql-server-5.0 mysql-client-5.0 libmysqlclient15-dev
 +
Set a root MySQL password like this:
 +
# mysqladmin -u root password yourrootsqlpassword
 +
Debian provides a fastcgi enabled version of PHP.
 +
# apt-get install php4-cgi
 +
# apt-get install php5-cgi
 +
Other php5 package
 +
php5-curl php5-gd php5-imap php5-mhash
 +
php5-pear php5-dev php5-ming php5-common
 +
php5-cli php5-pspell php5-odbc php5-mcrypt
 +
php5-tidy php5-ldap php5-gmp php5-snmp
 +
php5-sybase php5-mysql php5-mysqli php5-pgsql
 +
 +
# apt-get install php5-cgi libgdmg1 php5-curl php5-gd
 +
php.ini
 +
Add cgi.fix_pathinfo = 1
 +
[http://trac.lighttpd.net/trac/wiki/TutorialLighttpdAndPHP#SettingupPHPwithLighttpd Setting up PHP with Lighttpd]
 +
 +
==安装二进版==
 
安装 MySQl 二进版本
 
安装 MySQl 二进版本
  
第26行: 第53行:
 
  make
 
  make
 
  make install
 
  make install
 +
 +
==编译源码==

2007年2月1日 (四) 22:41的版本

安装包

/etc/apt/sources.list file.

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
# apt-get update

install MySQL4

# apt-get install mysql-server-4.1 mysql-client-4.1 libmysqlclient14-dev

install MySQL5

# apt-get install mysql-server-5.0 mysql-client-5.0 libmysqlclient15-dev

Set a root MySQL password like this:

# mysqladmin -u root password yourrootsqlpassword

Debian provides a fastcgi enabled version of PHP.

# apt-get install php4-cgi
# apt-get install php5-cgi

Other php5 package

php5-curl php5-gd php5-imap php5-mhash
php5-pear php5-dev php5-ming php5-common
php5-cli php5-pspell php5-odbc php5-mcrypt
php5-tidy php5-ldap php5-gmp php5-snmp
php5-sybase php5-mysql php5-mysqli php5-pgsql
# apt-get install php5-cgi libgdmg1 php5-curl php5-gd

php.ini

Add cgi.fix_pathinfo = 1 

Setting up PHP with Lighttpd

安装二进版

安装 MySQl 二进版本

下载解压后执行以下命令:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &

编译 Lighttpd

./configure --prefix=/usr/local/lighttpd-1.4.10
make 
make install

编译 PHP, 因为 PHP 5.2.0 提供了很多对XML的支持,但这里不需要,就先disable 这些 XML 支持

./configure --prefix=/usr/local/php-5.1.2 --enable-fastcgi --enable-foce-cgi-redirect
 --with-mysql=/usr/local/mysql-5.2.0 --disable-libxml --disable-dom --disable-simplexml --disable-xml 
--disable-xmlreader --disable-xmlwriter --without-pear
make
make install

编译源码

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱