CentOS 4.5环境构架安装各个相关LINUX系统文件

系统 Linux
CentOS 4.5环境构架中编译apache的源码wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.8.tar.gz

CentOS 4.5环境构架还是比较常用的,于是我研究了一下CentOS 4.5环境构架中安装各种系统,在这里拿出来CentOS 4.5环境构架和大家分享一下,希望对大家有用。CentOS社区的Linux发行版本被称为CentOS Linux,由于使用了由RHEL的源代码重新编译生成新的发行版本,CentOS Linux具有与RHEL产品非常好的兼容性,并且与生俱来地拥有RHEL的诸多优秀特性。

CentOS 4.5环境构架中安装gd库

libpng
http://prdownloads.sourceforge.net/libpng/libpng-1.2.8-config.tar.gz?download
tar zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8
./configure --prefix=/usr/local/libpng2
Make
Make install
Jpeg v6b
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/jpeg6
make
mkdir /usr/local/jpeg6
mkdir /usr/local/jpeg6/include
mkdir /usr/local/jpeg6/lib
make install-lib
mkdir /usr/local/jpeg6/bin
mkdir /usr/local/jpeg6/man
mkdir /usr/local/jpeg6/man/man1
make install

FreeType2
http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.10.tar.gz
tar zxvf freetype-2.1.10.tar.gz
./configure --prefix=/usr/local/freetype2
make
make install

GD Library gd-2.0.18
http://www.boutell.com/gd/http/gd-2.0.18.tar.gz
tar zxvf gd-2.0.18.tar.gz
./configure --prefix=/usr/local/gd2 --with-png=/usr/local/libpng2 --with-jpeg=/usr/local/jpeg6 --with-freetype=/usr/local/freetype2
make
make install

CentOS 4.5环境构架中编译apache的源码

wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.8.tar.gz
./configure --prefix=/usr/local/apache2 --enable-so  --enable-rewrite=shared --enable-deflate=shared --enable-expires=shared  --with-mpm=worker
make
make install
说明
#--enable-so apache2 支持模块动态加载
#--enable-rewrite=shared 支持 URL 重写
#--enable-deflate=shared 支持网页压缩
#--with-mpm=worker 采用worker的mpm方式运行
#--prefix=/usr/local/apache2 安装目录

CentOS 4.5环境构架中源码编译php

zlib-1.2.3
http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxvf zlib-1.2.3.tar.gz
# ./configure --prefix=/usr/local/zlib2
# make
# make install
libxml
http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.19.tar.gz
# cd libxml2-2.6.19
# ./configure --prefix=/usr/local/libxml2(PHP5只支持libxml2-2.5.10以上版本)
# make
# make install
wget http://cn2.php.net/distributions/php-5.2.6.tar.gz
tar zxvf php-5.2.6.tar.gz
cd php-5.2.6
#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local/jpeg6 --with-png-dir=/usr/local/libpng2 --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype2 --with-zlib-dir=/usr/local/zlib2 -with-mysql=/usr/local/mysql  --with-libxml-dir=/usr/local/libxml2 --enable-ftp --enable-mbstring --enable-exif --disable-ipv6
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini

CentOS 4.5环境构架中安装Zend

wget http://downloads.phpchina.com/zend/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
# tar xzvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
# ./ZendOptimizer-3.3.3-linux-glibc21-i386/install.sh
安装Zend Optimizer过程的最后不要选择重启Apache。
七整合Apache与PHP
# vi /usr/local/apache2/conf/httpd.conf
找到:
AddType application/x-gzip .gz .tgz
在该行下面添加
AddType application/x-httpd-php .php
找到:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
将该行改为
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule>
找到:
#Include conf/extra/httpd-mpm.conf
#Include conf/extra/httpd-info.conf
#Include conf/extra/httpd-vhosts.conf
#Include conf/extra/httpd-default.conf
去掉前面的“#”号,取消注释。
注意:以上 4 个扩展配置文件中的设置请按照相关原则进行合理配置!
修改完成后保存退出。
# /usr/local/apache2/bin/apachectl restart

CentOS 4.5环境构架查看确认L.A.M.P环境信息

在网站根目录放置 phpinfo.php 脚本。
#vi phpinfo.php
<?phpphpinfo();?>
通过检查phpinfo中的各项信息是否正确
http://ip地址/phpinfo.php

【编辑推荐】

  1. CentOS MySQL软件安装与启动和关闭命令
  2. 深入讲解CentOS PHP安装编译
  3. CentOS Apache安装设置编译器及编译参数
  4. CentOS Mysql安装与系统建立用户组
  5. CentOS4.4系统基本安全设置
责任编辑:佚名 来源: CSDN
相关推荐

2020-10-12 18:21:22

LinuxPython命令

2010-01-13 18:03:32

CentOS编译安装

2017-06-26 18:30:01

PythonLinuxCentos

2009-12-16 13:46:24

VS 2005环境

2009-07-24 18:03:44

2009-12-18 11:14:52

VS 2010环境

2009-12-15 18:00:54

.NET 4.0

2011-08-04 18:09:15

PHP

2021-02-14 10:03:41

网络攻击零日漏洞SolarWinds

2009-12-15 10:41:06

Visual Stud

2010-01-13 17:46:31

CentOS 5.4安

2009-12-03 14:37:02

Visual Stud

2011-06-17 17:32:25

Qt Visual C++

2009-12-15 17:25:09

2012-09-19 20:40:53

2023-05-09 15:17:42

Hi3861鸿蒙

2011-06-13 15:33:24

Qt Qt 4.5

2011-09-01 14:58:05

Ubuntuwin7

2010-01-13 10:14:45

2011-06-28 09:20:41

Qt Qt 4.3.2 Visual Stu
点赞
收藏

51CTO技术栈公众号