看看想想记记
« »
March 27, 2007Tech

419 views

真是个麻烦事(lamp)

一堆的报错。。。
下载所有的包:
Apache2:http://apache.seekmeup.com/httpd/httpd-2.2.4.tar.gz
PHP:http://cn2.php.net/distributions/php-4.4.6.tar.gz
Mysql:http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.37-linux-i686-glibc23.tar.gz/from/http://ftp.stu.edu.tw/pub/Unix/Database/Mysql
—-解压–
tar zxvf *.tar.gz—–安装–
Apache2:
cd httpd-2.2.8
make clean
./configure --with-mpm=worker --enable-so --enable-mods-shared=all

#以上为加载所有模块。。这个urlrewrite SSL 什么都加上了

<!--more-->
2:make
3:make install

MySQL:
258 mv mysql-5.0.37-linux-i686-glibc23 /usr/local/
259 cd /usr/local/
260 ls
261 ll
262 ln -s mysql-5.0.37-linux-i686-glibc23/ mysql
263 ll
264 cd mysql
groupadd mysql
useradd -g mysql mysql
chown -R root.mysql .
chown -R mysql.mysql data
scripts/mysql_install_db --user=mysql
#bin/safe_mysqld &

将/etc/my.cnf改成

#socket=/var/lib/mysql/mysql.sock
socket=/tmp/mysql.sock
最后启动mysql :/usr/local/mysql/bin/mysqld_safe –user=mysql –socket=/tmp/mysql.sock &


272 netstat -ntl
273 mysql -uroot //启动测试

加用户名:
GRANT ALL PRIVILEGES ON *.* TO 'jet'@'%' IDENTIFIED BY 'j.etwong.com' WITH GRANT OPTION;支持旧密码:
set password for 'mm'@'%'=old_password('j.etwong.com' );
PHP:
./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-gd2 \
--with-iconv \
--with-apxs2=/usr/local/apache2/bin/apxs

make
make install
支持PHP:
/usr/local/apache2/conf/httpd.conf :
AddType application/x-httpd-php .php
启动测试:
/usr/local/apache2/bin/apachectl start
加入虚拟主机:
/usr/local/apache2/conf/httpd.conf :
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

/usr/local/apache2/conf/extra/httpd-vhosts.conf
#注意第一个虚拟主机是默认主机地址,如直接IP直接访问结果
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /usr/local/apache2/htdocs
ServerName www.zhi6.com
ServerAlias www.zhi6.com
ErrorLog logs/dummy-www.zhi6.com-error_log
CustomLog logs/dummy-www.zhi6.com-access_log common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /usr/local/apache2/htdocs/j.etwong.com
ServerName j.etwong.com
ServerAlias j.etwong.com
ErrorLog logs/dummy-j.etwong.com-error_log
CustomLog logs/dummy-j.etwong.com-access_log common
</VirtualHost>

——————————-新加:

装上支持GD,支持JPG

来自:http://cckk.tw/wordpress/archives/2005/06/16/27/

GD 2.0.33
jpeg-6b
libpng 1.2.8
zlib 1.2.3
freetype-2.1.10.tar.gz

安裝 zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install

安裝 freetype
tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure –-prefix=/usr/local/modules/freetype
make
make install

安裝 libpng
tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure
make
make install

安裝 jpeg-6b
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure -–prefix=/usr/local/modules/jpeg6 –-enable-shared –-enable-static
make
make install
安裝 GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure –-prefix=/usr/local/modules/gd –-with-jpeg=/usr/local/modules/jpeg6 –-with-png –-with-zlib –-with-freetype=/usr/local/modules/freetype
make
make install

最后去编译PHP
./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –with-iconv –with-apxs2=/usr/local/apache2/bin/apxs –with-gd=/usr/local/modules/gd –with-jpeg-dir=/usr/local/modules/jpeg6 –with-zlib –with-png –with-freetype-dir=/usr/local/modules/freetype

最后大功完成:phpinfo中可以看到

gd

GD Support enabled
GD Version 2.0 or higher
FreeType Support enabled
FreeType Linkage with freetype
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled

日志信息 »

该日志于2007-03-27 23:57由 J.et wong 发表在Tech分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

相关日志 »

  • No Related Post

1条评论

发表评论 »

返回顶部

Switch to our mobile site