日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

freetds mysql_apache+mysql+php+gd+freetds

發(fā)布時間:2024/9/27 数据库 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 freetds mysql_apache+mysql+php+gd+freetds 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1. apache安裝:

#yum –y install *gcc*//安裝gcc環(huán)境

#tar –zxvf http-*.tar.gz

#cd http-*

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

#make && make install

設(shè)置開機自動啟動

從/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添加到系統(tǒng)的啟動服務(wù)組里面:

# /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自定義安裝目錄,否則可能會影響后面安裝,可能出現(xiàn)的錯誤:

configure: error: zlib not installed

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

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

如果你的機器是64位,并且在安裝png時候出現(xiàn)下面錯誤:

/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

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

先建立目錄,否則可能會出現(xiàn)類型下面錯誤:

/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時候出現(xiàn)下面錯誤:

/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

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

特別注意,要不下面會出現(xiàn)錯誤:

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

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

如果出現(xiàn)下面錯誤:

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

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

如果出現(xiàn)下面錯誤:

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

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

修復(fù)方法:

找到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檢測其安裝目錄的時候有些問題,檢查依據(jù)是兩個已經(jīng)不用的文件,創(chuàng)建兩個空文件就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的時候,執(zhí)行了make install,應(yīng)該執(zhí)行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

總結(jié)

以上是生活随笔為你收集整理的freetds mysql_apache+mysql+php+gd+freetds的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。