自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

深度解析 Qt 數(shù)據(jù)庫環(huán)境配置 下篇

移動開發(fā)
深度解析 Qt 數(shù)據(jù)庫環(huán)境配置是本文要講解的內(nèi)容,分為上下篇,不多說了,先來看內(nèi)容。

繼續(xù)為大家介紹,接著 深度解析 Qt 數(shù)據(jù)庫環(huán)境配置 上篇 ,同樣看以下代碼。

一、安裝XPM支持

  1. #rpm -ivh xpm-3.4k-2.i386.rpm 

安裝libxml2 (記得PHP5.2.1只支持libxml2-2.6.11以上版本)

  1. #tar zxvf libxml2-2.6.11.tar.gz  
  2. #cd libxml2-2.6.11  
  3. #./configure  
  4. #make  
  5. #make install 

二、裝GD庫支持

(1)安裝ZLIB

  1. #tar zxvf zlib-1.2.1.tar.gz  
  2. #cd zlib-1.2.1  
  3. #./configure  
  4. #make  
  5. #make install 

(2)安裝JPEGSRC

  1. #tar zxvf jpegsrc.v6b.tar.gz  
  2. #cd jpegsrc-6b  
  3. #./configure  
  4. #make  
  5. #make install-lib  
  6. #make install 

(3)安裝LIBPNG

  1. #tar zxvf libpng-1.2.5.tar.gz  
  2. #cd libpng-1.2.5  
  3. #cp scripts/makefile.std Makefile  
  4. #make  
  5. #make install 

(4)***是安裝GD2.*

  1. gd-2.0.28  
  2. #tar zxvf gd-2.0.28.tar.gz  
  3. #cd gd-2.0.28  
  4. #./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr  
  5. #make  
  6. #make install 

上面一切都很順利的話,GD就算成功的安裝上了. 如果有問題,應(yīng)該是缺少支持包,總之是少什么就下載什么來安裝上.

三、安裝mcrypt

  1. #tar xzvf libmcrypt-2.5.7.tar.gz  
  2. #cd libmcrypt-2.5.7  
  3. #./configure  
  4. #make  
  5. #make install 

四、安裝APAHCHE2

  1. #tar zxvf httpd-2.2.4.tar.gz  
  2. #cd httpd-2.2.4  
  3. #./configure --prefix=/usr/local/apache2 --enable-module=so 
  4. #make  
  5. #make install 

五、安裝PHP5

  1. #tar zxvf php-5.2.1.tar.gz  
  2. #cd php-5.2.1  
  3. #./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs 
  4. --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-gd=/usr/local 
  5. --enable-trace-vars --with-zlib-dir=/usr/local --with-mysql=/var/lib/mysql --with-mcrypt=/usr/local --enable-mbstring  
  6. #make  
  7. #make install 

我是把他們分別安裝在/usr/local/apache2 & PHP目錄下的所有的安裝工作做好了,接著我們來配置.

六、Apache2配置

(1)復(fù)制PHP.INI文件到正確位置

在PHP解壓的目錄下運行

  1. #cp php.ini-dist /usr/local/php/lib/php.ini 

(2)編輯apache配置文件httpd.conf

  1. #vi /usr/local/apache2/conf/httpd.conf 

要改的有如下幾處:,一般都在

  1. #AddType application/x-tar .tgz 

下加一行

  1. AddType application/x-httpd-php .php 

還有找到

  1. DirectoryIndex index.html index.html.var 

在后面加 index.php 讓它把index.php做為默認(rèn)頁,再找

  1. #ServerName 

把#去掉,后面的IP改成你的IP.,找到

  1. DocumentRoot "/usr/local/apache2/htdocs" 

把/usr/local/apache2/htdocs改為你存放網(wǎng)頁文件的路徑

比如我是放在/myweb目錄下,所以我以后上傳PHP文件就放在/myweb目錄下,然后用IP訪問,就能看到首頁了,差不多就這些了,至于apache2其它優(yōu)化,請看 http://www.phpv.net/ 里的apache配置那一分類.,保存httpd.conf文件.

(3)啟動Apache2

  1. # /usr/local/apache2/bin/apachectl start 

如果沒有出錯,寫一個測試頁放到你網(wǎng)頁目錄下, 我的就是上面所說的 /myweb

  1. #vi /home/easy/index.php 

保存.試試在測試器里打IP進去就可以看到PHPINFO頁了,好了.如無意外.你現(xiàn)在可以放心在你的機器上運行PHP腳本連接mysql了.

七、安裝ZendOptimizer-3.2.4加速PHP

  1. #tar zxvf ZendOptimizer-3.2.4-linux-glibc21-i386.tar.gz  
  2. #cd ZendOptimizer-3.2.4-linux-glibc21-i386  
  3. #./install.sh 

一路默認(rèn)下去應(yīng)該就好了.,再看看測試頁,,看看末尾是不是這樣的?

This program makes use of the Zend Scripting Language Engine:

Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.3, Copyright (c) 2003-2004, by Zend Technologies with Zend Optimizer v3.2.4, Copyright (c) 1998-2004, by Zend Technologies

八、安裝phpMyAdmin

  1. #unzip -d . phpMyAdmin-2.10.0.2-all-languages-utf-8-only.zip  
  2. #mv phpMyAdmin-2.10.0.2-all-languages-utf-8-only /usr/local/apache2/htdocs/phpMyAdmin  
  3. #cd /usr/local/apache2/htdocs/phpMyAdmin  
  4. #cp library/config.default.php config.inc.php  
  5. #vi config.inc.php 

找到cfg['PmaAbsoluteUri']等號后面改為'http://localhost/phpMyAdmin'

找到cfg['blowfish_secrect]等號后面改為'MySQL數(shù)據(jù)庫root用戶密碼'

找到cfg['Server'][$i]['auth_type']等號后面改為'cookie'

找到$cfg['Servers'][$i]['user']等號后面改為'root'

找到cfg['Server'][$i]['password']等號后面改為'MySQL數(shù)據(jù)庫root用戶密碼'

找到$cfg['DefaultLang']等號后面改為 zh-gb2312

找到$cfg['DefaultCharset']等號后面改為 gb2312

測試:

在瀏覽器中輸入

  1. http://localhost/phpMyAdmin 

輸入密碼后看看末尾mcrypt和mbstring擴展有沒有加載,如果沒有加載會有紅色警告提示。

九、安裝Qt4.2.3

  1. #tar xzvf qt-x11-opensource-src-4.2.3.tar.gz  
  2. #cd qt-x11-opensource-src  
  3. #./configure --qt-sql-mysql --qt-sql-sqlite --plugin-sql-mysql --plugin-sql-sqlite -I/usr/include/mysql -L/usr/lib/mysql  
  4. #gmake  
  5. #make install  
  6. #echo "export PATH=/usr/local/Trolltech/Qt-4.2.3/bin:$PATH" >> ~/.bashrc 

小結(jié):深度解析 Qt 數(shù)據(jù)庫環(huán)境配置的內(nèi)容為大家介紹完了,還是很希望本文會對你有幫助。

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-06-21 15:48:41

2011-06-23 18:37:02

Qt 數(shù)據(jù)庫

2011-06-27 13:49:43

Qt 數(shù)據(jù)庫 QSqlQueryM

2011-08-30 14:38:50

QT數(shù)據(jù)庫

2011-06-27 14:44:30

Qt 數(shù)據(jù)庫 QSqlQuery

2011-08-30 13:59:06

QTMysql數(shù)據(jù)庫

2011-06-17 17:16:01

Qt Eclipse Linux

2011-06-30 16:08:05

Qt 字庫 QPF

2011-06-09 10:28:54

QT 嵌入式

2011-06-21 14:01:07

QT 界面庫 Embedded

2011-06-21 18:02:14

Qt 動態(tài) 鏈接庫

2021-05-13 14:34:34

數(shù)據(jù)庫PolarDB

2021-05-07 09:25:34

數(shù)據(jù)庫工具技術(shù)

2011-03-30 09:23:29

2011-06-27 10:28:45

Qt 網(wǎng)絡(luò) TCP

2011-08-15 23:14:34

Oraclerman環(huán)境配置

2011-06-27 09:15:21

QT Creator

2011-07-01 14:39:08

Qt Quick

2011-07-01 10:55:25

Qt 登陸窗口 界面

2011-03-02 08:57:51

點贊
收藏

51CTO技術(shù)棧公眾號