mysql+apache+GD库+php
Mysql配置
# groupadd mysql
# useradd -g mysql mysql
# tar -zxvf mysql-VERSION.tar.gz
# cd mysql-VERSION
# ./configure --prefix=/usr/local/mysql
# make
# make install
# cp support-files/my-large.cnf /etc/my.cnf
# cd /usr/local/mysql(要注意的一行)
**# vi bin/mysql_install_db
ldata=/opt/mysql/var (901行)
# bin/mysql_install_db --user=mysql
**# vi /usr/local/mysql/share/mysql/mysql.server
更改datadir=/opt/mysql/var(数据库保存路径) (47行)
建立目录mkdir /opt/mysql/var
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
# vi /etc/rc.d/rc.local (自动启动)
在最后加上“/usr/local/mysql/bin/mysqld_safe --user=root &”就完成了安装
# vi /etc/profile
pathmunge /usr/X11R6/bin after下加
pathmunge /usr/local/mysql/bin
测试
# /usr/local/mysql/bin/mysql -uroot –p
apache安装配置
3、apache安装 下列(--)前为一个空格
./configure --prefix=/usr/local/apache --enable-so --enable-rewrite --enable-ssl --with-ssl --enable-ext-filter --enable-cache --enable-mem-cache --enable-deflate --enable-usertrack --with-mpm=worker
make ;make install
在httpd.conf(395行和840行)
添加
AddType application/x-httpd-php .php .php3
AddType application/x-httpd-php-source .phps
更改
DirectoryIndex index.html
改为:
DirectoryIndex index.html index.php index.php3 index.htm
在/etc/rc.d/rc.local文件中加入:每次系统重启时自动启动。
/usr/loca/apache/bin/apachectl start (根据实际的安装路径)
以下为GD库的(必须在安装php之前安装)
A先安装支持包(严格安装顺序安装)安装过程中请注意自己的路径,以免出错!
建立初始目录:
mkdir /usr/local/modules
#jpeg目录
mkdir /usr/local/modules/jpeg6
mkdir /usr/local/modules/jpeg6/bin
mkdir /usr/local/modules/jpeg6/lib
mkdir /usr/local/modules/jpeg6/include
mkdir /usr/local/modules/jpeg6/man
mkdir /usr/local/modules/jpeg6/man/man1
A1、安装zlib
tar xzvf zlib-1.2.2.tar.gz
cd zlib-1.2.2
#不要用--prefix自定义安装目录,影响gd的安装
./configure
make
make install
A2、安装freetype
tar xzvf freetype-2.1.5.tar.gz
cd freetype-2.1.5
./configure --prefix=/usr/local/modules/freetype
make
make install
A3、安装libpng
tar xzvf libpng-1.2.5.tar.gz
#不要用--prefix自定义安装目录,影响gd的安装
cd libpng-1.2.5
cp scripts/makefile.std makefile
make test
make install
A3、安装jpeg
tar xzvf jpegsrc.v6b.tar.gz
./configure --prefix=/usr/local/modules/jpeg6 --enable-shared --enable-static
make
make install
A4、安装GD
tar xzvf gd-2.0.33.tar.gz
./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
libmcrypt
tar ...
./configure
make
make install
安装cronolog
Tar zvxf cronolog-1.6.2.tar.gz
./configure
make
make install
修改httpd.conf配置文件
CustomLog"|/usr/local/sbin/cronolog /opt/logs/access_log.%Y-%m-%d" combined 下面两行不用配置
1、CustomLog "|/usr/local/sbin/cronolog /opt/logs/referer_log.%Y-%m-%d" referer
2、CustomLog "|/usr/local/sbin/cronolog /opt/logs/agent_log.%Y-%m-%d" agent
php安装
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-gettext --enable-mbstring --with-gd=/usr/local/lib --enable-gd-native-ttf --with-ttf=/usr/lib --with-tiff-dir=/usr/lib --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/lib --with-xml --with-gdbm-dir=/usr/lib --enable-wddx --with
-freetype-dir=/usr/lib --with-zlib --with-iconv --with-imagick=/usr/local/ImageMagick
Make
Make install
将php.ini-recommended配置文件copy到/usr/local/php/lib/php.ini
修改其中的内容,将include_path = ".:/usr/local/php/lib/php"
PHP.ini的修改默认设为中文:找到以下行:
default_charset = "iso-8859-1"
5.下载文件Smarty-2.6.10.tar.gz
Tar zxvf Smarty-2.6.10.tar.gz
把libs下所有文件cp到/usr/local/php/lib/php/smarty/中
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
申请加精