Chinaunix首页 | 论坛 | 博客
  • 博客访问: 508032
  • 博文数量: 62
  • 博客积分: 2566
  • 博客等级: 少校
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2006-02-10 12:52
文章分类

全部博文(62)

文章存档

2008年(2)

2007年(22)

2006年(38)

我的朋友

分类:

2007-02-22 01:59:57

#Install freetype

#

 

cd ~software

tar zxvf freetype-2.2.1.tar.gz

cd ~software/freetype-2.2.1

 

./configure

 

#命令完成后该目录下多了个Makefile文件。

#Makefile文件是许多软件编译、安装的配置和过程控制文件,十分重要,

#应该学会看懂它的内容。开始编译:

 

make && make install

 

#默认安装在/usr/local/include /usr/local/lib 里面。如下文件:

#drwxr-xr-x 3 root root 4096 Sep 28 14:52 freetype2

#-rw-r--r-- 1 root root 3890 Sep 28 14:52 ft2build.h

#-rw-r--r-- 1 root root 2179442 Sep 28 14:52 libfreetype.a

#-rwxr-xr-x 1 root root 826 Sep 28 14:52 libfreetype.la

#lrwxrwxrwx 1 root root 21 Sep 28 14:52 libfreetype.so -> libfreetype.so.6.3.10

#lrwxrwxrwx 1 root root 21 Sep 28 14:52 libfreetype.so.6 -> libfreetype.so.6.3.10

#-rwxr-xr-x 1 root root 1534594 Sep 28 14:52 libfreetype.so.6.3.10

#drwxr-xr-x 2 root root 4096 Sep 28 14:52 pkgconfig

 

 

#编译gd 的时候有error don't found the freetype.h 所以

#cp /usr/local/include/freetype_/* /usr/local/include/

#这个问题在当前版本下面不出现。所以可以不做这一步。

 

 

 

#Install zlib

#

#Before installing libpng, you must first install zlib. 

#zlib can usually be found wherever you got libpng. 

#zlib can be placed in another directory, at the same level as libpng.

#Note that your system might already have a preinstalled

#zlib, but you will still need to have access to the

#zlib.h and zconf.h include files that correspond to the

#version of zlib that's installed.

# 默认也是安装在/usr/local/include /usr/local/lib 里面。

  

cd ~software

tar zxvf zlib-1.2.3.tar.gz

cd ~software/zlib-1.2.3

 

./configure

 

make && make install

 

 

#Install libpng

#

 

#Read INSTALL First

 

cd ~software

tar -zxvf libpng-1.2.12-no-config.tar.gz

cd ~software/libpng-1.2.12

 

cp scripts/makefile.std makefile

 

make && make install 

 

 

#Install GD

#

#Does gd support GIF images?

#Yes. Support for GIF was restored in gd 2.0.28 on July 21st, 2004. 

#Support for creating GIF animations is also available. 

#Note that gdlib-config --features can be used to list the image formats 

#supported by gd. Versions of gdlib-config prior to recent updates do not 

#support the --features option, which can be understood to mean that GIF is not available. 

 

#新版本的GD已经又加入了GIF支持,也支持JPEG,可以用如下命令检查。

#gdlib-config --features

#GD_XPM GD_JPEG GD_FONTCONFIG GD_FREETYPE GD_PNG GD_GIF

 

cd ~software

tar -zxvf gd-2.0.33.tar.gz

cd ~software/gd-2.0.33

 

./configure

 

#在configure的时候也可以看到GD支持的库

 

#** Configuration summary for gd 2.0.33:

 

# 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: yes

# Support for pthreads: yes

 

 

 

make && make install

 

 

#gd.h被拷到/usr/local/include目录下,libgd.a被拷到/usr/local/lib目录下。
作者:   2006-10-13 10:30    

3 回复:[转贴]在RedHat Enterprise Linux 4.0 Update 4 下面安装MyS
#-------------------------------------------------------------------------------

#Install Apache 2.0.x

 

#重要提示:apache 2.0.x的worker模式和MySQL的pconnect模式兼容性不好,不要使用worker模式。

如果必须使用worker模式,那么php连接MySQL DB请使用connect()模式。手工管理MySQL连接。

 

cd ~software

tar zxvf httpd-2.0.59.tar.gz

cd ~software/httpd-2.0.59

 

 

./configure --prefix=/data/apache --with-mpm=prefork --enable-so --enable-mods-shared=most

 

make && make install

 

 

#启动Apache

 

/data/apache/bin/apachectl restart

 

 

#-------------------------------------------------------------------------------

#Install PHP 5.1.x

 

cd ~software

tar zxvf php-5.1.6.tar.gz 

cd ~software/php-5.1.6

 

#最重要的环节

./configure --prefix=/data/php --with-gd=/usr/local --with-jpeg --with-zlib --with-png --enable-magic-quotes --with-mysql=/data/mysql --with-apxs2=/data/apache/bin/apxs --enable-track-vars --enable-force-cgi-redirect --enable-ftp --enable-sockets --enable-calendar --with-ttf --with-freetype-dir=/usr/local/lib --enable-gd-native-ttf

 

make && make install

 

#拷贝配置文件到相关目录

cp ~software/php-5.1.6/php.ini-dist /data/php/lib/php.ini -vf

 

#配置 php.ini

 

vi /data/php/lib/php.ini

 

#; Initialize session on request startup.

#session.auto_start = 1

 

#; You should do your best to write your scripts so that they do not require

#; register_globals to be on; Using form variables as globals can easily lead

#; to possible security problems, if the code is not very well thought of.

#register_globals = Off

 

 

#---------------------------------------------------------------------------------

#Configure Apache

 

cd /data/apache/conf/

 

cp httpd.conf httpd.conf_orig

 

vi httpd.conf

 

 

1. 去掉ServerName前面的”#”符号:

#ServerName 

ServerName 

 

2. 修改DocumentRoot:

 

# DocumentRoot "/usr/local/apache/htdocs"

DocumentRoot "/data/vhost"

 

修改:

#

# This should be changed to whatever you set DocumentRoot to.

#

#



 

3. 去掉Indexes支持:

# This may also be "None", "All", or any combination of "Indexes",

# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".

#

# Note that "MultiViews" must be named *explicitly* --- "Options All"

# doesn't give it to you.

#

# Options Indexes FollowSymLinks MultiViews

 

Options FollowSymLinks MultiViews 

 

#

# This controls which options the .htaccess files in directories can

# override. Can also be "All", or any combination of "Options", "FileInfo", 

# "AuthConfig", and "Limit"

#

AllowOverride None

 

4. 增加默认主页的php支持:

#

# DirectoryIndex: sets the file that Apache will serve if a directory

# is requested.

#

# The index.html.var file (a type-map) is used to deliver content-

# negotiated documents. The MultiViews Option can be used for the
作者:   2006-10-13 10:30    

4 回复:[转贴]在RedHat Enterprise Linux 4.0 Update 4 下面安装MyS

# same purpose, but it is much slower.

#

#DirectoryIndex index.html index.html.var

DirectoryIndex index.php index.html index.html.var

 

5. 增加php后缀支持:

 #

 # AddType allows you to tweak mime.types without actually editing it, or to

 # make certain files to be certain types.

 #

 AddType application/x-tar .tgz

 AddType image/x-icon .ico

 AddType application/x-httpd-php .php .phtml .php3 .inc

 AddType application/x-httpd-php-source .phps

 

6. 增加MaxClients值:

 

#在Apache 2.0中新加入了ServerLimit指令,使得无须重编译Apache就可以加大MaxClients。下面是笔者的prefork配置段:

#

#StartServers 10 

#MinSpareServers 10 

#MaxSpareServers 15 

#ServerLimit 2000 

#MaxClients 1000 

#MaxRequestsPerChild 10000 

#; 

 

#上述配置中,ServerLimit的最大值是20000,对于大多数站点已经足够。

#如果一定要再加大这个数值,对位于源代码树下server/mpm/prefork/prefork.c中以下两行做相应修改即可: 

#define DEFAULT_SERVER_LIMIT 256 

#define MAX_SERVER_LIMIT 20000 

 

##

## Server-Pool Size Regulation (MPM specific)

##

# prefork MPM

# StartServers: number of server processes to start

# MinSpareServers: minimum number of server processes which are kept spare

# MaxSpareServers: maximum number of server processes which are kept spare

# MaxClients: maximum number of server processes allowed to start

# MaxRequestsPerChild: maximum number of requests a server process serves

 



StartServers 5

MinSpareServers 5

MaxSpareServers 10

MaxClients 150

MaxRequestsPerChild 0



 

改为:

 

 

StartServers 10

MinSpareServers 10

MaxSpareServers 15

ServerLimit 3000

MaxClients 2048

MaxRequestsPerChild 10000



 

 

#创建Apache虚拟主机目录

mkdir /data/vhost

 

#重新启动apache

/data/apache/bin/apachectl restart

 

#---------------------------------------------------------------------------------

#Configure /etc/rc.d/rc.local

 

ulimit -HSn 8192

 

# Auto Start MySQL at System Reboot!

/data/mysql/bin/mysqld_safe --user=mysql &


# Auto Start Apache/PHP at System Reboot!

/data/apache/bin/apachectl start >/dev/null
阅读(2094) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~