apache2.2.4+mysql5.0.77+php5.2.8安裝精簡(jiǎn)
更新時(shí)間:2009年04月29日 18:27:04 作者:
linux下apache php環(huán)境的配置方法。
1.安裝Apache
將httpd-2.2.4.tar.gz拷貝至/usr/local/src目錄中
tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --enable-vhost-alias --enable-rewrite --enable-deflate --enable-mods-shared=all --with-mpm=worker
make && make install
2.安裝php
安裝freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure --prefix=/usr/local/phpsyslib/freetype-2.3.5
make && make install
mkdir /usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal(如果報(bào)錯(cuò)需要)
安裝jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/phpsyslib/jpeg-6b --enable-shared 必須加后面這個(gè)參數(shù),不然不能生成那個(gè)共享庫(kù)
根據(jù)報(bào)錯(cuò)信息自己創(chuàng)建相應(yīng)目錄
cp libjpeg.a /usr/local/lib(如果安裝gd不成功的話)
安裝zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/phpsyslib/zlib-1.2.3
安裝openssl-0.9.8e
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib
make
make test
make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
配置庫(kù)文件搜索路徑
#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig -v
安裝libpng
tar zxvf libpng-1.2.23.tar.gz
cd libpng-1.2.23
cp scripts/makefile.linux makefile
安裝GD庫(kù)(如果失敗先安裝libtool和gettext)
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/phpsyslib/gd-2.0.35 --with-jpeg=/usr/local/phpsyslib/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --with-freetype=/usr/local/phpsyslib/freetype-2.3.5/
make && make install
安裝gettext(如果失敗先安裝 libtool)
tar zxvf gettext-0.17.tar.gz
cd gettext-0.17
./configure --prefix=/usrmake && make install 安裝libtool
tar zxvf libtool-2.2.tar.gz
cd libtool-2.2
./configure --prefix=/usrmake && make installcp /usr/lib/libattr.la /lib/
安裝curl
tar zxvf curl-7.17.1.tar.gz
cd curl-7.17.1
./configure --prefix=/usr/local/phpsyslib/curl-7.17.1
make && make install
3.安裝mysql
# tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz
cp mysql-5.0.77-linux-i686-icc-glibc23 /usr/local/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql ---mysql自啟動(dòng)
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
groupadd mysql
useradd -g mysql mysql
chown -R root /usr/local/mysql
chgrp -R mysql /usr/local/mysql
上面兩句可用(chown -R root:mysql /usr/local/mysql)
chown -R mysql /usr/local/mysql/data
/usr/local/mysql/scripts/mysql_install_db --user=mysql&
/usr/local/mysql/bin/safe_mysqld --user=mysql&
安裝php
./configure --prefix=/usr/local/php5.2.8 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/share/doc/libxml2-2.6.16 --with-gd=/usr/local/phpsyslib/gd-2.0.35 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir --with-freetype-dir=/usr/local/phpsyslib/freetype-2.3.5 --with-iconv-dir --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --enable-mbstring --disable-ipv6 --with-openssl-dir=/usr/local/ssl --with-curl=/usr/local/phpsyslib/curl-7.17.1 --with-mime-magic=/usr/share/file/magic.mime
Mysql日常用法
mysqldump –uXXX –hXXX -p samp_db >/usr/archives/mysql/samp_db.1999-10-02 備份
mysql 數(shù)據(jù)庫(kù)名 <文件路徑 用戶名和密碼(如果有) 導(dǎo)入
建立用戶:
grant all on redflag.* to 用戶名@"%" identified by "密碼";
flush privileges;
將httpd-2.2.4.tar.gz拷貝至/usr/local/src目錄中
tar -zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --enable-vhost-alias --enable-rewrite --enable-deflate --enable-mods-shared=all --with-mpm=worker
make && make install
2.安裝php
安裝freetype-2.3.5.tar.gz
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure --prefix=/usr/local/phpsyslib/freetype-2.3.5
make && make install
mkdir /usr/local/phpsyslib/freetype-2.3.5/include/freetype2/freetype/internal(如果報(bào)錯(cuò)需要)
安裝jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/usr/local/phpsyslib/jpeg-6b --enable-shared 必須加后面這個(gè)參數(shù),不然不能生成那個(gè)共享庫(kù)
根據(jù)報(bào)錯(cuò)信息自己創(chuàng)建相應(yīng)目錄
cp libjpeg.a /usr/local/lib(如果安裝gd不成功的話)
安裝zlib
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/phpsyslib/zlib-1.2.3
安裝openssl-0.9.8e
tar zxvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config shared zlib
make
make test
make install
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl
配置庫(kù)文件搜索路徑
#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig -v
安裝libpng
tar zxvf libpng-1.2.23.tar.gz
cd libpng-1.2.23
cp scripts/makefile.linux makefile
安裝GD庫(kù)(如果失敗先安裝libtool和gettext)
tar zxvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/phpsyslib/gd-2.0.35 --with-jpeg=/usr/local/phpsyslib/jpeg-6b --with-png=/usr/local/ --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --with-freetype=/usr/local/phpsyslib/freetype-2.3.5/
make && make install
安裝gettext(如果失敗先安裝 libtool)
tar zxvf gettext-0.17.tar.gz
cd gettext-0.17
./configure --prefix=/usrmake && make install 安裝libtool
tar zxvf libtool-2.2.tar.gz
cd libtool-2.2
./configure --prefix=/usrmake && make installcp /usr/lib/libattr.la /lib/
安裝curl
tar zxvf curl-7.17.1.tar.gz
cd curl-7.17.1
./configure --prefix=/usr/local/phpsyslib/curl-7.17.1
make && make install
3.安裝mysql
# tar zxvf mysql-5.0.77-linux-i686-icc-glibc23.tar.gz
cp mysql-5.0.77-linux-i686-icc-glibc23 /usr/local/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql ---mysql自啟動(dòng)
cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf
groupadd mysql
useradd -g mysql mysql
chown -R root /usr/local/mysql
chgrp -R mysql /usr/local/mysql
上面兩句可用(chown -R root:mysql /usr/local/mysql)
chown -R mysql /usr/local/mysql/data
/usr/local/mysql/scripts/mysql_install_db --user=mysql&
/usr/local/mysql/bin/safe_mysqld --user=mysql&
安裝php
./configure --prefix=/usr/local/php5.2.8 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/share/doc/libxml2-2.6.16 --with-gd=/usr/local/phpsyslib/gd-2.0.35 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/jpeg-6b --with-png-dir --with-freetype-dir=/usr/local/phpsyslib/freetype-2.3.5 --with-iconv-dir --with-zlib=/usr/local/phpsyslib/zlib-1.2.3 --enable-mbstring --disable-ipv6 --with-openssl-dir=/usr/local/ssl --with-curl=/usr/local/phpsyslib/curl-7.17.1 --with-mime-magic=/usr/share/file/magic.mime
Mysql日常用法
mysqldump –uXXX –hXXX -p samp_db >/usr/archives/mysql/samp_db.1999-10-02 備份
mysql 數(shù)據(jù)庫(kù)名 <文件路徑 用戶名和密碼(如果有) 導(dǎo)入
建立用戶:
grant all on redflag.* to 用戶名@"%" identified by "密碼";
flush privileges;
相關(guān)文章
PHP項(xiàng)目在Docker(WSL2)中運(yùn)行緩慢的解決方法
最近在使用Docker容器運(yùn)行PHP項(xiàng)目的時(shí)候,發(fā)現(xiàn)特別緩慢,例如一個(gè)干凈的?ThinkPHP?5.1?框架,訪問首頁(yè)都需要1秒以上,如果再加上數(shù)據(jù)庫(kù)查詢、復(fù)雜的業(yè)務(wù)邏輯等代碼的話,那速度可想而知,所以本文就給大家介紹了解決方法,需要的朋友可以參考下2023-09-09php獲取從百度搜索進(jìn)入網(wǎng)站的關(guān)鍵詞的詳細(xì)代碼
以下是關(guān)于php該如何獲取從百度搜索進(jìn)入網(wǎng)站的關(guān)鍵詞的詳細(xì)代碼,希望本文對(duì)廣大php開發(fā)者有所幫助2014-01-01php使用標(biāo)簽替換的方式生成靜態(tài)頁(yè)面
php可以通過自帶函數(shù)preg_replace可以用數(shù)組批量替換,不過用正則表達(dá)式替換效率很低,用起來也不方便。具體參考php手冊(cè)。有需要的小伙伴可以參考下。2015-05-05PHP實(shí)現(xiàn)圖片防盜鏈破解操作示例【解決圖片防盜鏈問題/反向代理】
這篇文章主要介紹了PHP實(shí)現(xiàn)圖片防盜鏈破解操作,結(jié)合實(shí)例形式分析了PHP解決圖片防盜鏈問題的相關(guān)操作技巧,需要的朋友可以參考下2020-05-05php通過array_unshift函數(shù)添加多個(gè)變量到數(shù)組前端的方法
這篇文章主要介紹了php通過array_unshift函數(shù)添加多個(gè)變量到數(shù)組前端的方法,涉及php中array_unshift函數(shù)操作數(shù)組的使用技巧,需要的朋友可以參考下2015-03-03網(wǎng)站用php實(shí)現(xiàn)paypal整合方法
雖然在中國(guó)paypal不是很流行,但如果把范圍擴(kuò)大到世界的話,那paypal無疑就是老大了。2010-11-11