1. apache安装:

#yum –y install *gcc*//安装gcc环境

#tar –zxvf http-*.tar.gz

#cd http-*

#./configure –prefix=/usr/local/apache2 –enable-so –enable-rewrite

#make && make install

设置开机自动启动

从/usr/local/apache/bin/apachectl 到 /etc/rc.d/init.d/httpd 建立一个符号连接:

# ln -s /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd

然后在此文件总添加以下几行(大概在文件顶部,约第二行的地方):

# chkconfig: 2345 10 90

# description: Activates/Deactivates Apache Web Server

最后,运行chkconfig把Apache添加到系统的启动服务组里面:

# /sbin/chkconfig --del httpd

# /sbin/chkconfig --add httpd

编辑/etc/rc.d/rc.local

把/usr/local/apache2/bin/apachectl start 加入进去

2. mysq安装:

#tar –zxvf mysql-*.tar.gz

#cd msyql-*

#useradd –M –s /sbin/nologin mysql

#yum –y install libtermcap-devel

#./configure –prefix=/usr/local/mysql –with-mysqlduser=mysql

#make

#make install

#cp support-files/my-memdium.cnf /etc/my.cnf

# /usr/local/mysql/bin/mysql_install_db --user=mysql

# chown -R root:mysql /usr/local/mysql/

#chown –R mysql /usr/local/mysql/var/

#echo “/usr/local/mysql/lib/mysql” >>/etc/ld.so.conf

#ldconfig

#/usr/local/mysql/bin/mysqld_safe –user=mysql &  //启动mysql

开机启动

#cd mysql-*

# cp support-files/mysql.server /etc/init.d/mysqld

#chmod +x /etc/init.d/mysqld

#chkconfig –add mysqld

#chkconfig mysql on

# export PATH=$PATH:/usr/local/mysql/bin/

# echo "PATH=$PATH:/usr/local/mysql/bin/" >> /etc/profile

3. gd安装:

安装ZLIB2

tar -zxvf zlib-1.2.3.tar.gz

cd zlib-1.2.3

./configure –prefix=/usr/local/zlib

#################################################

不要用--prefix自定义安装目录,否则可能会影响后面安装,可能出现的错误:

configure: error: zlib not installed

#################################################

#################################################

如果你的机器是64位,并且在安装png时候出现下面错误:

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libz.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

修补办法(接上面步骤):

vi Makefile

找到 CFLAGS=-O3 -DUSE_MMAP

在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC

接下面步骤

#################################################

make

make install

安装JPEG6

#################################################

先建立目录,否则可能会出现类型下面错误:

/usr/bin/install -c cjpeg /usr/local/ /jpeg6

/usr/bin/install: cannot create regular file `/usr/local /jpeg6/bin/cjpeg’: No such file or directory

make: *** [install] Error 1

解决办法:

mkdir /usr/local /jpeg6

mkdir /usr/local /jpeg6/bin

mkdir /usr/local /jpeg6/lib

mkdir /usr/local /jpeg6/include

mkdir /usr/local /jpeg6/man

mkdir /usr/local/ jpeg6/man/man1

#################################################

cd /home/biaoest

tar -zxvf jpegsrc.v6b.tar.gz

cd jpegsrc.v6b.

./configure --prefix=/usr/local/ jpeg6

#################################################

如果你的机器是64位,并且在安装gd时候出现下面错误:

/usr/bin/ld: /usr/local/jpeg6/lib/libjpeg.a(compress.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC

/usr/local/jpeg6/lib/libjpeg.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[2]: *** [libgd.la] Error 1

修补办法(接上面步骤):

vi Makefile

找到 CFLAGS= -O2 -I$(srcdir)

在后面加入-fPIC,即变成CFLAGS= -O2 -I$(srcdir) -fPIC

接下面步骤

#################################################

make

make install-lib

#################################################

特别注意,要不下面会出现错误:

configure: error: libjpeg.(a|so) not found.

#################################################

make install

安装PNG

tar -zxvf libpng-1.2.10.tar.gz

cd libpng-1.2.10

./configure --prefix=/usr/local/libpng

make

################################################

如果出现下面错误:

configure: error: zlib not installed

请回到zlib,重新安装一次,最佳先 make clean

################################################

make install

安装freetype

tar -zxvf freetype-2.2.1.tar.gz

cd freetype-2.2.1

./configure --prefix=/usr/local/freetype

make

make install

安装GD

tar -zxvf gd-2.0.33.tar.gz

cd gd-2.0.33

./configure--prefix=/usr/local/gd

--with-jpeg=/usr/local/jpeg6/

--with-png=/usr/local/libpng/

--with-zlib=/usr/local/zlib

--with-freetype=/usr/local/ freetype/

make

#################################################

如果出现下面错误:

gd_png.c:825: warning: data definition has no type or storage class

make[2]: *** [gd_png.lo] Error 1

修复方法:

找到CPPFLAGS=-I/usr/local /freetype/include/freetype2 -I/usr/local/apache2/modlib/freetyp

e/include -I/usr/local/ /freetype/include -I/usr/local /jpeg6/include

原来是少了png的支持了,把他改为

CPPFLAGS=-I/usr/local /freetype/include/freetype2-I/usr/local /freetyp

e/include -I/usr/local/libpng /include -I/usr/local /jpeg6/include

#################################################

make install

安装LIBXML2

tar -zxvf libxml2-2.6.26.tar.gz

cd libxml2-2.6.26

./configure --prefix=/usr/local/xml2

make

make install

安装freetds

#tar –zxvf freetds-*.tar.gz

#cd freetds-*

#./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib  --enable-static

#make && makeinstall

4. php安装

#tar –zxvf php-*.tar.gz

#cd php-*

#./configure

--prefix=/usr/local/php

--with-apxs2=/usr/local/apache2/bin/apxs

--with-mysql=/usr/local/mysql

--with-libxml-dir=/usr/local/xml2

--with-png-dir=/usr/local/libpnng

--with-jpeg-dir=/usr/local/jpeg6

--with-zlib

--with-freetype-dir=/usr/local/freetype

--enable-pdo

--with-pdo-sqlite

--with-pdo-mysql=/usr/local/mysql/bin/mysql_config

--with-pdo-dblib=/usr/local/freetds/

--with-gd=/usr/local/gd

--with-curl

--with-mssql=/usr/local/freetds/

--disable-debug

--enable-sockets

--enable-force-cgi-redirect

--enable-calendar

--enable-magic-quotes

--enable-ftp

--enable-gd-native-ttf

--with-ttf --with-gdbm

--with-iconv --enable-mbstring=all

报错1

checking if we should use cURL for url streams... no

checking for cURL in default path... not found

configure: error: Please reinstall the libcurl distribution -

easy.h should be in /include/curl/

需要安装:yum -y install curl*

报错2

checking for strftime... (cached) yes

checking for QDBM support... no

configure: error: DBA: Could not find necessary header file(s).

需要安装:yum -y install php-dba.i386 php-dbase.i386 gdbm-devel

报错3

checking for MSSQL support via FreeTDS... yes

configure: error: Directory /usr/local/freetds/ is not a FreeTDS installation directory

解决办法:

就是php找不到freetds的安装路径

其实是

PHP检测其安装目录的时候有些问题,检查依据是两个已经不用的文件,创建两个空文件就OK

touch /usr/local/freetds/include/tds.h

touch /usr/local/freetds/lib/libtds.a

报错4

checking lex output file root... ./configure: line 3246: lex: command not found

configure: error: cannot find output from lex; giving up

修补方法,安装FLEX:

rpm -Uvh flex-2.5.4a-33.x86_64.rpm

报错5

configure: error: libjpeg.(a|so) not found.

修补方法:

原来在安装jpeg的时候,执行了make install,应该执行make install-lib才能生成libjpeg.a文件

#make

#make install

#cp php.ini-dict /usr/local/php/lib/php.ini

#vim /usr/local/apache2/conf/httpd.conf

LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php

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

DirectoryIndex index.php index.html

//红色的字是增加的

5. 测试php

#vim /usr/local/apache2/htdocs/index.php

phpinfo();

?>

#serveric apache stop

#serveric apache start

freetds mysql_apache+mysql+php+gd+freetds相关推荐

  1. yum安装php mysql扩展,yum安装php_centos6使用yum安装php mysql与gd扩展库的方法

    摘要 腾兴网为您分享:centos6使用yum安装php mysql与gd扩展库的方法,鱼乐贝贝,一路捞,悟空识字,无限绘画等软件知识,以及手机调音器,人人商城app,映美630k打印机驱动,hp打印 ...

  2. Docker安装PHP-FPM5.6 (自带redis扩展,Mysql扩展,GD库扩展(支持JEPG))

    打包一个安装好reids扩展,GD库扩展,mysql扩展的PHP-FPM(php 5.6)版本,镜像地址及安装步骤如下 1,下载镜像: docker pull zlilizh/phpfpm5.6:la ...

  3. 2012 php mysql_Apache+Mysql+PHP(win sercer2012)

    说明 亲测原稿.以 D:\wamp 目录为例(实际目录可自行更改) 准备 软件包下载地址 本教程使用软件 httpd-2.4.25-x64-vc11-r1.zip mysql-5.7.16-winx6 ...

  4. niva mysql_Apache+Mysql+Nivacat+windows

    哈哈,好久没有写笔记了 今天写下关于在Windows下搭建Apache+Mysql+Nivacat 1.首先贴一下资源文件,这是我整理好的百度云链接:http://pan.baidu.com/s/1j ...

  5. gd mysql_简单的图形计数器需要MYSQL,GD的支持_MySQL

    /*** hit_count表只一个字段hit_count page_visit_record表是用来控制一个IP一天内只产生一个计数器跳动 CREATE TABLE page_visit_recor ...

  6. 在linux上配置unixODBC和FreeTDS访问MS SQL Server.

    一, 安装 unixODBC 下载安装包. 在 RedHat 安装光盘上就有 unixODBC-2.2.11-1.RHEL4.1.i386.rpm unixODBC-devel-2.2.11-1.RH ...

  7. gdbm mysql函数库_linux4AS下的php+apache+mysql+gd库安装修订版

    经过多次安装,将linux4AS下的php+apache+mysql+gd库安装过程多次修订,整理如下: 一. 系统及软件版本问题: 1. 操作系统:Linux AS U2 (advanced ser ...

  8. mysql编译gcov_Mysql 编译参数详解

    --disable-allDisable all extensions which are enabled by default关闭默认为启用的所有扩展功能 --disable-libxmlDisab ...

  9. linux mysql编译参数,Mysql 编译参数详解

    --disable-allDisable all extensions which are enabled by default关闭默认为启用的所有扩展功能 --disable-libxmlDisab ...

最新文章

  1. B树、B-树、B+树、B*树
  2. bootsrap Glyphicons 字体图标
  3. 幂运算 数组_Super Pow:如何高效进行模幂运算
  4. 杰森·保罗:使VR与人眼相匹配还需20年!
  5. 8086汇编-实验7-制表
  6. SQL Server 数据库所有者
  7. 深度学习(六十二)SqueezeNet网络设计思想笔记
  8. 百度2021年Q2净利润54亿元,智能云收入同比增71%
  9. Android开发之设置铃声
  10. Eclipse SVN 创建分支
  11. HTML——HTML中的特殊符号
  12. 计算机cpu占用率高,CPU占用率高怎么解决?Win10系统电脑CPU占用率100%的解决方法...
  13. No symbols loaded
  14. CentOS 7.2设置中英文环境
  15. 0203逻辑卷管理、RAID磁盘阵列、VD0、管理运行级别
  16. 单片机程序烧录方式有几种?
  17. 如何用Navicat连接mongoDB
  18. vue vant 通讯录组件
  19. 从语音角度看湖南泸溪方言的归属
  20. 一个老果粉的华为Mate20 Pro深度体验

热门文章

  1. java循环停止_什么时候java无限循环停止?
  2. python黑客攻防入门下载-Python键盘钩取的自我理解(来源于《Python黑客攻防入门》)...
  3. Git的简单使用以及在Django中有关日志文件的忽略
  4. python各种读取图像方法
  5. JavaScript实现rabin-karp算法(附完整源码)
  6. boost::ratio_less相关的测试程序
  7. boost::unique_copy相关的测试程序
  8. boost::nowide模块相关的测试程序
  9. boost::mpl模块实现single_view相关的测试程序
  10. boost::mp11::mp_back相关用法的测试程序