CentOS 4.532位服务器默认安装GCC 和sedmail软件

系统 Linux
CentOS 4.5查看确认L.A.M.P环境信息在网站根目录放置 phpinfo.php 脚本。 #vi phpinfo.php<?php phpinfo();?>通过检查phpinfo中的各项信息是否正确http://ip地址/phpinfo.php

CentOS 4.5对于电脑使用的玩家的常用软件,然后我就学习及深入的研究CentOS 4.5,在这里和大家一起探讨CentOS 4.5的使用方法,希望对大家有用。CentOS 4.5(32位服务器)+php+apache+zend+mysql环境架构Linux的版本是CentOS 4.5 32位服务器默认安装CentOS GCC 和sedmail软件(可选)

一、CentOS 4.5软件准备

  1. Apache-2.2.8   
  2. php-5.2.6   
  3. mysql-5.0.45.tar.gz  
  4. ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz 

安装的推荐顺序是mysql->gd->apache->php->zend

二、CentOS 4.5安装MySQL

  1. wget http://download.softagency.net/MySQL/Downloads/MySQL-5.0/mysql-5.0.45.tar.gz  
  2. tar zxvf mysql-5.0.45.tar.gz  
  3. cd mysql-5.0.45  
  4. ./configure --prefix=/usr/local/mysql --without-innodb  
  5.  --without-debug --with-mysqld-ldflags=-all-static   
  6. --with-client-ldflags=-all-static --with-linuxthreads   
  7. --enable-thread-safe-client --with-charset=gbk 
  8. --without-debug \去除debug模式   
  9. --without-innodb \去掉innodb表支持 innodb是一种支持事务处理的表,适合企业级应用   
  10. --enable-thread-safe-client \以线程方式编译客户端   
  11. --with-client-ldflags=-all-static \   
  12. --with-mysqld-ldflags=-all-static \以纯静态方式编译服务端和客户端  
  13. make  
  14. make install  
  15. cp support-files/my-medium.cnf /etc/my.cnf  
  16. groupadd mysql  
  17. useradd -g mysql -s /sbin/nologin mysql  
  18. cd /usr/local/mysql  
  19. bin/mysql_install_db --user=mysql 
  20. chown -R root .  
  21. chown -R mysql var  
  22. chgrp -R mysql .  
  23. mysql的启动和关闭命令  
  24. /usr/local/mysql/share/mysql/mysql.server start  
  25. /usr/local/mysql/share/mysql/mysql.server stop 

三、CentOS 4.5安装gd库

  1. libpng   
  2. http://prdownloads.sourceforge.net/libpng/libpng-1.2.8-config.tar.gz?download  
  3. tar zxvf libpng-1.2.8-config.tar.gz  
  4. cd libpng-1.2.8  
  5. ./configure --prefix=/usr/local/libpng2  
  6. Make  
  7. Make install  
  8. Jpeg v6b   
  9. http://www.ijg.org/files/jpegsrc.v6b.tar.gz  
  10. tar zxvf jpegsrc.v6b.tar.gz  
  11. cd jpeg-6b  
  12. ./configure --prefix=/usr/local/jpeg6  
  13. make  
  14. mkdir /usr/local/jpeg6  
  15. mkdir /usr/local/jpeg6/include  
  16. mkdir /usr/local/jpeg6/lib  
  17. make install-lib  
  18. mkdir /usr/local/jpeg6/bin  
  19. mkdir /usr/local/jpeg6/man  
  20. mkdir /usr/local/jpeg6/man/man1  
  21. make install 
  1. FreeType2   
  2. http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.10.tar.gz  
  3. tar zxvf freetype-2.1.10.tar.gz  
  4. ./configure --prefix=/usr/local/freetype2  
  5. make  
  6. make install 
  1. GD Library gd-2.0.18  
  2. http://www.boutell.com/gd/http/gd-2.0.18.tar.gz  
  3. tar zxvf gd-2.0.18.tar.gz  
  4. ./configure --prefix=/usr/local/gd2 --with-png=/usr/local/libpng2   
  5. --with-jpeg=/usr/local/jpeg6 --with-freetype=/usr/local/freetype2  
  6. make  
  7. make install 

四、apache的源码编译

  1. wget http://apache.mirror.phpchina.com/httpd/httpd-2.2.8.tar.gz  
  2. ./configure --prefix=/usr/local/apache2 --enable-so  --enable-rewrite=shared   
  3. --enable-deflate=shared --enable-expires=shared  --with-mpm=worker 
  4. make   
  5. make install 


说明

  1. #--enable-so apache2 支持模块动态加载  
  2. #--enable-rewrite=shared 支持 URL 重写  
  3. #--enable-deflate=shared 支持网页压缩   
  4. #--with-mpm=worker 采用worker的mpm方式运行  
  5. #--prefix=/usr/local/apache2 安装目录 

五、源码编译php

  1. zlib-1.2.3  
  2. http://www.zlib.net/zlib-1.2.3.tar.gz  
  3. tar zxvf zlib-1.2.3.tar.gz  
  4. # ./configure --prefix=/usr/local/zlib2   
  5. # make   
  6. # make install  
  7. libxml  
  8. http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.19.tar.gz  
  9. # cd libxml2-2.6.19  
  10. # ./configure --prefix=/usr/local/libxml2(PHP5只支持libxml2-2.5.10以上版本)  
  11. # make   
  12. # make install  
  13. wget http://cn2.php.net/distributions/php-5.2.6.tar.gz  
  14. tar zxvf php-5.2.6.tar.gz  
  15. cd php-5.2.6  
  16. #./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs   
  17. --with-jpeg-dir=/usr/local/jpeg6 --with-png-dir=/usr/local/libpng2   
  18. --with-gd=/usr/local/gd2 --with-freetype-dir=/usr/local/freetype2   
  19. --with-zlib-dir=/usr/local/zlib2 -with-mysql=/usr/local/mysql  --with-libxml-dir=/usr/local/libxml2   
  20. --enable-ftp --enable-mbstring --enable-exif --disable-ipv6   
  21. # make   
  22. # make install   
  23. # cp php.ini-dist /usr/local/php/lib/php.ini 


六、CentOS 4.5安装Zend

  1. wget http://downloads.phpchina.com/zend/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz  
  2. # tar xzvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz  
  3. # ./ZendOptimizer-3.3.3-linux-glibc21-i386/install.sh  
  4. 安装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>
找到:

  1. #Include conf/extra/httpd-mpm.conf  
  2. #Include conf/extra/httpd-info.conf  
  3. #Include conf/extra/httpd-vhosts.conf  
  4. #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<?php phpinfo();?>通过检查phpinfo中的各项信息是否正确http://ip地址/phpinfo.php

【编辑推荐】

  1. CentOS 4.5环境构架安装各个相关LINUX系统文件
  2. CentOS yum安装和卸载软件的使用方法
  3. CentOS VSFTP采用RPM包安装方式
  4. CentOS vsftpd虚拟用户的配置
  5. CentOS vsftpd安装系统帐户设置
责任编辑:佚名 来源: CSDN
相关推荐

2010-01-13 17:00:54

CentOS MySQ

2010-02-06 14:47:18

CentOS inst

2010-01-15 17:35:09

2010-02-23 14:35:48

CentOS vsft

2010-03-01 09:38:09

Linux服务器

2010-01-14 09:13:40

CentOS gcc安

2019-11-21 08:50:54

CentOS 8Postfix邮件服务器

2015-12-11 13:16:10

CentOS 7Redis服务器

2010-02-03 16:53:58

CentOS yum

2009-03-04 09:48:52

安装配置桌面虚拟化Xendesktop

2009-09-24 14:06:24

打印服务器

2019-10-14 15:00:12

Centos 8 RHEL 8VNC

2010-08-26 09:33:10

DHCP服务器

2009-07-02 13:46:17

JSP引擎Web服务器

2015-02-03 03:00:51

CentOSJetty

2010-08-27 09:04:28

DHCP服务器

2017-12-18 14:27:26

LinuxDNS服务器安装、配置和维护

2010-09-14 11:09:36

Linux TFTP服

2021-11-24 08:00:00

服务器Web系统

2010-08-03 15:53:07

CentOSNFS服务器
点赞
收藏

51CTO技术栈公众号