1.MySQL安装
@
版本:
mysql-5.0.41.tar.gz
安装过程:
……………………………安装开始………………………………………………
# groupadd mysql
# useradd -g mysql mysql
#./configure --prefix=/usr/local/mysql --with-extra-charsets=gb2312,gbk
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
--sysconfdir=/etc --enable-assembler
# make && make install
# scripts/mysql_install_db --user=mysql //
数据库安装
# bin/mysqld_safe --user=mysql & //
起动
mysqld
…………………………安装结束……………………………………………
echo "/usr/local/mysql/lib/mysql">> /etc/ld.so.conf
//postfix
编译里会用到
基本操作:
1.
起动/关闭MySQL
/usr/local/mysql/bin/mysqld_safe &
/usr/local/mysql/bin/mysqladmin -u root
�Cp shutdown
2.
设置密码
mysqladmin -u root password 'new-password'
3.
添加
/usr/local/webserver/mysql5/bin
到环境变量
v
i /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
2. GD相关安装
1. @版本libpng-1.2.29.tar.gz
###################################################
shell> tar zxvf libpng-1.2.29.tar.gz
shell> cd libpng-1.2.29
shell> ./configure
shell> make
shell> make install
###################################################
2.
版本jpegsrc.v6b.tar.gz
#############################################################
shell> tar zxvf jpegsrc.v6b.tar.gz
shell> cd jpeg-6b
/***
**
由于
jpeg
的安装脚本中
,
没有创建文件夹
,
因此我们得手动给他创建好文件夹
**/
Shell> mkdir �Cp /usr/local/jpeg/bin
Shell> mkdir /usr/local/jpeg/lib
Shell> mkdir /usr/local/jpeg/include
Shell> mkdir /usr/local/jpeg/man
Shell> mkdir /usr/local/jpeg/man1
Shell> mkdir /usr/local/jpeg/man/man1
/*
生成共享
*/
Shell> ./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
Shell> make && make install
#################################################
3.
@
版本
freetype-2.3.7.tar.gz
#############################################
shell> tar zxvf freetype-2.3.7.tar.gz
shell> cd freetype-2.3.7
shell> ./configure
//
不指定目录,方便以下
RRDTool
安装
shell> make && make install
##############################################
4
.
@
版本
fontconfig-2.6.0.tar.gz
#################################################
Shell> tar zxvf fontconfig-2.6.0.tar.gz && cd font*
Shell> ./configure --prefix=/usr/local/fontconfig --with-freetype-config=/usr/local/bin/freetype-config
Shell> make && make install
##################################################
5.
@
版本
gd-2.0.35.tar.gz
GD
库安装以前先把以上几个安装上,这个安装是有一定顺序的。
###############################################
Shell> tar zxvf gd-2.0.35.tar.gz
Shell> cd gd-2.0.35
Shell> ./configure --prefix=/usr/local/gd
--with-png
--with-jpeg=/usr/local/jpeg
--with-freetype
--with-fontconfig=/usr/local/fontconfig
Shell> make && make install
###############################################
** Configuration summary for gd 2.0.34:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: no
Support for pthreads: yes
faq:
1>
cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing --run aclocal-1.9 -I config
aclocal:configure.ac:64: warning: macro `AM_ICONV' not found in library
cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing --run automake-1.9 --foreign
cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing --run autoconf
configure.ac:64: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
make: *** [configure] Error 1
解决
:
重新
make
一下,如果不行,可以安装下边的包
安装
gettext
包
安装方式
: shell> yum install gettext
或通过手动下载
gettext
包
3.PHP(FastCGI)模式安装
@php版本:5.2.6
#gzip -cd php-5.2.9-fpm-0.5.10.diff.gz | patch -d php- 5.2.9 -p1
步骤:
###########################################################
#./configure --prefix=/usr/local/phpcgi --with-config-file-path=/usr/local/phpcgi/etc --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --enable-mbstring --enable-mbregex --enable-bcmath --enable-sockets --with-xsl --with-curl --with-curlwrappers --enable-fastcgi --enable-force-cgi-redirect --enable-discard-path --with-openssl
--enable-fpm
# make && make install
#cp php.ini-recommended /usr/local/phpcgi/etc/php.ini
######################################################
# /usr/local/phpcgi/etc/php-fpm.conf
<?xml version="1.0" ?>
<configuration>
<section name="global_options">
<value name="pid_file">/usr/local/phpcgi/logs/php-fpm.pid</value>
<value name="error_log">/usr/local/phpcgi/logs/php-fpm.log</value>
<value name="log_level">notice</value>
<value name="emergency_restart_threshold">10</value>
<value name="emergency_restart_interval">1m</value>
<value name="process_control_timeout">5s</value>
<value name="daemonize">yes</value>
</section>
<workers>
<section name="pool">
<value name="name">default</value>
<value name="listen_address">127.0.0.1:9000</value>
<value name="listen_options">
<value name="backlog">-1</value>
<value name="owner"></value>
<value name="group"></value>
<value name="mode">0666</value>
</value>
<value name="php_defines">
<value name="sendmail_path">/usr/sbin/sendmail -t -i</value>
<value name="display_errors">1</value>
</value>
<value name="user">vmail</value>
<value name="group">vmail</value>
<value name="pm">
<value name="style">static</value>
<value name="max_children">25</value>
<value name="apache_like">
<value name="StartServers">10</value>
<value name="MinSpareServers">5</value>
<value name="MaxSpareServers">25</value>
</value>
</value>
<value name="request_terminate_timeout">0s</value>
<value name="request_slowlog_timeout">0s</value>
<value name="slowlog">logs/slow.log</value>
<value name="rlimit_files">51200</value>
<value name="rlimit_core">0</value>
<value name="chroot"></value>
<value name="chdir"></value>
<value name="catch_workers_output">yes</value>
<value name="max_requests">500</value>
<value name="allowed_clients">127.0.0.1</value>
<value name="environment">
<value name="HOSTNAME">$HOSTNAME</value>
<value name="PATH">/usr/local/bin:/usr/bin:/bin</value>
<value name="TMP">/tmp</value>
<value name="TMPDIR">/tmp</value>
<value name="TEMP">/tmp</value>
<value name="OSTYPE">$OSTYPE</value>
<value name="MACHTYPE">$MACHTYPE</value>
<value name="MALLOC_CHECK_">2</value>
</value>
</section>
</workers>
</configuration>