本博客之內所有文章保證全由本人親手調試。
首先要和說明一下,覆盤實驗是在我十分不情願的情況下進行的。
在對之前企鵝服務器調整OPENSSL的時候。突然出了undefined symbol: FIPS_mode錯誤。SSH無法連接,在我想辦法修復的時候,斷電了。這下只有重裝系統,覆盤重來了。
OK舊照。
hostname
[root@VM_196_175_redhat tool]# vi /etc/sysconfig/network
[root@VM_196_175_redhat ~]# hostname Only-test.org
[root@Only-test ~]# export PS1='[\u@\h \W]\>'
最後這成這樣了,紀念好久不見的DOS。
Selinux狀態的查詢:
[root@Only-test ~]\>sestatus
先配好yum,有些不打算動的直接裝了。
Yum的配置
RADHAT的升級是增值服務。但好在包和centos通用。只需要把yum源修改即可
此部分來自網絡http://hxl2009.blog.51cto.com/779549/197359/
[root@Only-test ~]\>mv /etc/yum.conf /etc/yum.conf.old yum的配置文件
[root@Only-test ~]\>mv /etc/yum.repos.d/ /etc/yum.repos.d.old yum源的記錄信息
[root@Only-test ~]\>vim /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[base]
name=centos-5 - Base
baseurl=http://centos.ustc.edu.cn/centos/5/os/i386/
# the other site: http://centos.candishosting.com.cn/centos/5/os/i386/
# you can find more site in: http://www.centos.org/modules/tinycontent/index.php?id=13
enabled=1
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#released updates
[update]
name=CentOS-5 - Updates
baseurl=http://mirror.centos.org/centos/5/updates/i386/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
baseurl=http://mirror.centos.org/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
baseurl=http://mirror.centos.org/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
baseurl=http://mirror.centos.org/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
baseurl=http://mirror.centos.org/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirror.centos.org/centos/5/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/5/os/i386/RPM-GPG-KEY-CentOS-5
LAMP環境
一、OpenSSL
[root@AS5 tool]# rpm -aq | grep openssl
這次打算不動。而且本身也比我準備的0.9.8a版本要高
[root@Only-test ~]\>rpm -ql openssl-0.9.8e-33.el5_11
反正動態鏈接文件和執行文件都有了。暫時不裝devel
二、Apahce
[root@Only-test ~]\>rpm -qa | grep httpd
好吧。系統盤是被格空了。這次裝在自己買的數據盤裏。
從體積上來說,系統盤是夠用的。不過還是建議可能的話買幾個G的數據盤1G一個月才3毛錢。重裝系統之後最多再做一個鏈接。
[root@Only-test Ddisk]\> mkdir program 恩,爲了紀念windows,以後就全裝這裏面了。
[root@Only-test tool]\> tar zxvf httpd-2.2.24.tar.gz
[root@Only-test tool]\> cd httpd-2.2.24
[root@Only-test httpd-2.2.24]\> ./configure --prefix=/Ddisk/program/apache
--enable-modules=so --enable-rewrite
--enable-ssl=static --with-ssl
--with-mpm=prefork --enable-status
好吧。還是要指定位置。好像是要頭文件。這下要裝openssl-devel了
[root@Only-test httpd-2.2.24]\>./configure --help | grep ssl
[root@Only-test httpd-2.2.24]\> yum list openssl-devel
爲了一個openssl-devel,這下嚇死人。
[root@Only-test httpd-2.2.24]\> ./configure --prefix=/Ddisk/program/apache
--enable-modules=so
--enable-rewrite
--enable-ssl=static
--with-ssl=/usr/include/openssl/
--with-mpm=prefork
--enable-status
此步驟把
--prefix=/Ddisk/program/apache apache安裝到/Ddisk/program/apache
--with-mpm=prefork 主要是爲了適應新的Zend 版本把線程模式改成了這個。
--enable-status 爲了CACTI能監控apche
--enable-ssl=static 用於將mod_ssl靜態的編譯到httpd服務中。
--with-ssl 後面指定的是OpenSSL的頭文件路徑。
--enable-rewrite 打開重定向
--enable-modules=so 允許動態模塊的加載
[root@Only-test httpd-2.2.24]\> make
[root@Only-test httpd-2.2.24]\> make install
[root@Only-test httpd-2.2.24]\> vim /Ddisk/program/apache/conf/httpd.conf
[root@Only-test httpd-2.2.24]\> /Ddisk/program/apache/bin/apachectl start
查看一下是否已經加載 status模塊
[root@Only-test httpd-2.2.24]\> /Ddisk/program/apache/bin/httpd -M
OK用httpd -M可以很清楚看到。ssl 和 status 已經加載。
Apache一共有55個靜態模塊。自動加載的除了上面的兩個,如圖可視。全部模塊如下:
如果要加載。現在在編譯的時候。用 --enable-[module]=static。不過我這裏後面沒有加static好像也被靜態加載了。
APACHE暫時結束
三、MySQL
這個可以確定沒有多餘包。我就直接安裝了。
[root@Only-test tar]\> rpm -ivh MySQL-devel-community-5.0.45-0.rhel4.i386.rpm
[root@Only-test tar]\> rpm -ivh MySQL-shared-community-5.0.45-0.rhel4.i386.rpm
[root@Only-test tar]\> rpm -ihv MySQL-client-community-5.0.45-0.rhel4.i386.rpm
還是老問題。
[root@Only-test tar]\> yum install perl-DBI
[root@Only-test tar]\> rpm -ivh MySQL-client-community-5.0.45-0.rhel4.i386.rpm
[root@Only-test tar]\> rpm -ivh MySQL-server-community-5.0.45-0.rhel4.i386.rpm
[root@Only-test tar]\> service mysql start
[root@Only-test tar]\> mysql
OK.完成。
Mysql改密碼
[root@Only-test tar]\> mysql
mysql> use mysql
mysql> update user set password=password('123456789') where user='root';
mysql> flush privileges;
//這步不打,密碼不會即時生效
四、PHP
GD庫(讓PHP支持GIF,PNG,JPEG)
這次應該會不需要裝兩次了。
a. 安裝 jpeg7
[root@Only-test jpeg-7]\> rpm -qa | grep jpeg
很好什麼都沒有
[root@Only-test jpeg-7]\> ./configure --prefix=/Ddisk/program/jpeg7
[root@Only-test jpeg-7]\> make && make install
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/bin/* /usr/bin/
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/include/* /usr/include/
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/include/* /usr/include/jpeg7
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/lib/* /usr/lib/
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/share/man/man1/* /usr/share/man/man1/
要注意一下。這裏是沒有pc文件的。所以採取自己生成
[root@Only-test jpeg-7]\> cp /usr/lib/pkgconfig/libssl.pc /Ddisk/program/jpeg7/lib/jpeg7.pc
vi jpeg7.pc
最後大體修改成這樣
[root@Only-test jpeg-7]\> ln -s /Ddisk/program/jpeg7/lib/jpeg7.pc /usr/lib/pkgconfig/
[root@Only-test jpeg-7]\> yum install pkgconfig
[root@Only-test jpeg-7]\> pkg-config --modversion jpeg7
OK成功
b. 安裝libpng
[root@Only-test libpng-1.4.3]\> rpm -aq | grep png
[root@Only-test libpng-1.4.3]\> ./configure --prefix=/Ddisk/program/libpng/
[root@Only-test libpng-1.4.3]\> make && make install
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/bin/* /usr/bin/
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/include/* /usr/include/
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/lib/pkgconfig/libpng
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/lib/pkgconfig/* /usr/lib/pkgconfig/
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/share/man/man3/* /usr/share/man/man3/
[root@Only-test libpng-1.4.3]\> ln -s /Ddisk/program/libpng/share/man/man5/* /usr/share/man/man5/
[root@Only-test libpng-1.4.3]\> pkg-config --modversion libpng
完事
c. 安裝 freetype
[root@Only-test freetype-2.4.8]\> rpm -aq | grep freetype
[root@Only-test freetype-2.4.8]\> ./configure --prefix=/Ddisk/program/freetype
[root@Only-test freetype-2.4.8]\> make && make install
[root@Only-test freetype-2.4.8]\> ln -s /Ddisk/program/freetype/bin/* /usr/bin/
[root@Only-test freetype-2.4.8]\> ln -s /Ddisk/program/freetype/include/* /usr/include/
[root@Only-test freetype-2.4.8]\> ln -s /Ddisk/program/freetype/lib/*so* /usr/lib
[root@Only-test freetype-2.4.8]\> ln -s /Ddisk/program/freetype/lib/pkgconfig/freetype2.pc /usr/lib/pkgconfig/
[root@Only-test freetype-2.4.8]\> ln -s /Ddisk/program/freetype/share/aclocal/freetype2.m4 /usr/share/aclocal/
[root@Only-test freetype-2.4.8]\> pkg-config --modversion freetype2
OK
PS:這裏直接查freetype還沒結果。估計等下會有問題,不過CP一下應該也沒問題。
d. 安裝 libXpm
[root@Only-test libXpm-3.5.5]\> rpm -aq | grep Xpm
[root@Only-test libXpm-3.5.5]\> ./configure --prefix=/Ddisk/program/libXpm
果然還是這兩個包。
[root@Only-test libXpm-3.5.5]\> yum install Xorg-x11-proto-devel
[root@Only-test libXpm-3.5.5]\> ./configure --prefix=/Ddisk/program/libXpm
[root@Only-test libXpm-3.5.5]\> make && make install
[root@Only-test libXpm-3.5.5]\> ln -s /Ddisk/program/libXpm/bin/* /usr/bin/
[root@Only-test libXpm-3.5.5]\> ln -s /Ddisk/program/libXpm/include/X11/xpm.h /usr/include/X11/
[root@Only-test libXpm-3.5.5]\> ln -s /Ddisk/program/libXpm/lib/*so* /usr/lib
[root@Only-test libXpm-3.5.5]\> ln -s /Ddisk/program/libXpm/lib/pkgconfig/xpm.pc /usr/lib/pkgconfig/
[root@Only-test libXpm-3.5.5]\> ln -s /Ddisk/program/libXpm/man/man1/cxpm.1x /usr/share/man/man1/
[root@Only-test libXpm-3.5.5]\> pkg-config --modversion xpm
完成
現在本來應該是選編譯GD庫有關組件的,但是fontconfig需要freetype和libxml2的支持。先編譯libxml2
e. libxml2
[root@Only-test libxml2-2.6.32]\> rpm -aq | grep libxml2
[root@Only-test libxml2-2.6.32]\> rpm -e --nodeps libxml2-2.6.26-2.1.2.7
[root@Only-test libxml2-2.6.32]\> ./configure --prefix=/Ddisk/program/libxml2 --with-zlib
[root@Only-test libxml2-2.6.32]\> vim Makefile
找到CFLAGS參數,在它後面添加 -fPIC 參數
[root@Only-test libxml2-2.6.32]\> make && make install
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/bin/* /usr/bin/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/include/libxml2/ /usr/include/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/lib/*so* /usr/lib
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/lib/pkgconfig/libxml-2.0.pc /usr/lib/pkgconfig/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/share/aclocal/* /usr/share/aclocal/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/share/doc/libxml2-2.6.32/ /usr/share/doc/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/share/gtk-doc/ /usr/share/
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/share/man/man1/* /usr/share/man/man1
[root@Only-test libxml2-2.6.32]\> ln -s /Ddisk/program/libxml2/share/man/man3/libxml.3 /usr/share/man/man3/
[root@Only-test libxml2-2.6.32]\> pkg-config --modversion libxml-2.0
這個名字太操蛋了,實在不行,等下CP
f. fontconfig
[root@Only-test fontconfig-2.4.2]\> rpm -aq | grep fontconfig
[root@Only-test fontconfig-2.4.2]\> ./configure --prefix=/Ddisk/program/fontconfig
OK 一次過
[root@Only-test fontconfig-2.4.2]\> make && make install
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/bin/* /usr/bin/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/include/fontconfig/* /usr/include/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/include/fontconfig/ /usr/include/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/lib/*so* /usr/lib
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/lib/pkgconfig/fontconfig.pc /usr/lib/pkgconfig/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/share/man/man3/* /usr/share/man/man3/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/share/man/man5/fonts-conf.5 /usr/share/man/man5/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/var/cache/fontconfig/ /var/cache/
[root@Only-test fontconfig-2.4.2]\> ln -s /Ddisk/program/fontconfig/etc/fonts/ /etc/
[root@Only-test fontconfig-2.4.2]\> pkg-config --modversion fontconfig
完成
g. 安裝 GD
[root@Only-test gd-2.0.34]\> rpm -qa | grep gd
[root@Only-test gd-2.0.34]\> ./configure --prefix=/Ddisk/program/gd2
--with-jpeg=/Ddisk/program/jpeg7/
--with-png=/Ddisk/program/libpng/
--with-freetype=/Ddisk/program/freetype/
OK
[root@Only-test gd-2.0.34]\> vim gd_png.c
改爲
[root@Only-test gd-2.0.34]\> include "/usr/local/libpng/include/png.h"
兩個""不能有空格
這裏必須要改,否則會提示找不到png.h
make && make install
[root@Only-test gd-2.0.34]\> ln -s /Ddisk/program/gd2/bin/* /usr/bin/
[root@Only-test gd-2.0.34]\> ln -s /Ddisk/program/gd2/include/* /usr/include/
[root@Only-test gd-2.0.34]\> ln -s /Ddisk/program/gd2/lib/libgd.so* /usr/lib
這裏沒有.pc文件。如前面jpeg一樣如法炮製
[root@Only-test gd-2.0.34]\> cp /Ddisk/program/freetype/lib/pkgconfig/freetype2.pc /Ddisk/program/gd2/lib/gd2.pc
[root@Only-test gd-2.0.34]\> vim /Ddisk/program/gd2/lib/gd2.pc
大體改成如下
[root@Only-test gd-2.0.34]\> ln -s /Ddisk/program/gd2/lib/gd2.pc /usr/lib/pkgconfig/
[root@Only-test gd-2.0.34]\> pkg-config --modversion gd2
完成
h. 安裝 curl
[root@Only-test curl-7.24.0]\> rpm -qa | grep curl
[root@Only-test curl-7.24.0]\> rpm -e --nodeps curl-7.15.5-2.el5
[root@Only-test curl-7.24.0]\> ./configure --prefix=/Ddisk/program/curl
[root@Only-test curl-7.24.0]\> make && make install
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/bin/* /usr/bin/
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/include/curl/ /usr/include/
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/include/curl/* /usr/include/
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/lib/*so* /usr/lib
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/lib/pkgconfig/libcurl.pc /usr/lib/pkgconfig/
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/share/man/man1/* /usr/share/man/man1/
[root@Only-test curl-7.24.0]\> ln -s /Ddisk/program/curl/share/man/man3/* /usr/share/man/man3/
[root@Only-test curl-7.24.0]\> pkg-config --modversion libcurl
完成
i. 安裝 libxslt
[root@Only-test libxslt-1.1.24]\> rpm -aq | grep libxslt
[root@Only-test libxslt-1.1.24]\> ./configure --prefix=/Ddisk/program/libxslt
--with-libxml-prefix=/Ddisk/program/libxml2/
[root@Only-test libxslt-1.1.24]\> make && make install
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/bin/* /usr/bin/
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/include/libexslt/ /usr/include/
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/include/libxslt/ /usr/include/
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/lib/*so* /usr/lib/
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/lib/libxslt-plugins/ /usr/lib/
[root@Only-test libxslt-1.1.24]\> ln -s /Ddisk/program/libxslt/lib/pkgconfig/* /usr/lib/pkgconfig/
[root@Only-test libxslt-1.1.24]\> pkg-config --modversion libxslt
[root@Only-test libxslt-1.1.24]\> pkg-config --modversion libexslt
完成
j. Sockets函數支持
涉及到三個包。一個個裝過來。
安裝libmcrypt
[root@Only-test libmcrypt]\> ./configure --prefix=/Ddisk/program/mcrypt
還是 gcc-c++的老錯誤
[root@Only-test libmcrypt]\> yum install gcc-c++
[root@Only-test libmcrypt]\> ./configure --prefix=/Ddisk/program/mcrypt
[root@Only-test libmcrypt]\> make && make install
安裝mhash
[root@Only-test mhash]\> ./configure --prefix=/Ddisk/program/mcrypt
[root@Only-test mhash]\> make && make install
安裝mcrypt
在安裝mcrypt前,需先導入環境變量,不然在安裝的時候會提示找不到libmcrypt和mhash
export LD_LIBRARY_PATH=/usr/local/mcrypt/lib:$LD_LIBRARY_PATH
export LDFLAGS="-L/usr/local/mcrypt/lib/ -I/usr/local/mcrypt/include/"
export CFLAGS="-I/usr/local/mcrypt/include/"
原本是這樣做。我換個方式
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/bin/libmcrypt-config /usr/bin/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/include/* /usr/include/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/lib/*so* /usr/lib
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/lib/libmcrypt/ /usr/lib
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/man/man3/mcrypt.3 /usr/share/man/man3/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/share/aclocal/libmcrypt.m4 /usr/share/aclocal/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/share/man/man3/mhash.3 /usr/share/man/man3/
好了。試試看
[root@Only-test mcrypt]\> ./configure --prefix=/Ddisk/program/mcrypt --with-libmcrypt-prefix=/Ddisk/program/mcrypt/
過了。果然如此
[root@Only-test mcrypt]\> make && make install
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/bin/libmcrypt-config /usr/bin/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/include/* /usr/include/
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/lib/*so* /usr/lib
還有一個 /Ddisk/program/mcrypt/share/locale/ 太過麻煩沒有鏈接
不過依舊沒有pc文件
[root@Only-test mcrypt]\> cp /Ddisk/program/freetype/lib/pkgconfig/freetype2.pc /Ddisk/program/mcrypt/lib/mcrypt.pc
大體如此
[root@Only-test mcrypt]\> ln -s /Ddisk/program/mcrypt/lib/mcrypt.pc /usr/lib/pkgconfig/
[root@Only-test mcrypt]\> pkg-config --modversion mcrypt
完成
k. 安裝php5
[root@Only-test php-5.3.24]\> rpm -aq | grep php
[root@Only-test php-5.3.24]\> ./configure --prefix=/Ddisk/program/php
--with-apxs2=/Ddisk//program/apache/bin/apxs
--with-mysql --with-mysqli=/usr/bin/mysql_config
--with-curl=/Ddisk/program/curl --enable-ftp
--with-libxml-dir=/Ddisk/program/libxml2 --enable-soap
--with-xsl=/Ddisk/program/libxslt
--with-gd=/Ddisk/program/gd2/
--with-jpeg-dir=/Ddisk/program/jpeg7/ --with-zlib
--with-png-dir=/Ddisk/program/libpng/
--with-freetype-dir=/Ddisk/program/freetype/
--with-xpm-dir=/Ddisk/program/libXpm/
--with-mcrypt=/Ddisk/program/mcrypt
--enable-mbstring --enable-sockets
--with-openssl
[root@Only-test php-5.3.24]\> make && make install
[root@Only-test php-5.3.24]\> cp php.ini-development /Ddisk/program/php/lib/php.ini
配置 httpd.conf 讓apache支持PHP
[root@Only-test php-5.3.24]\> vim /Ddisk/program/apache/conf/httpd.conf
找到 AddType application/x-gzip .gz .tgz 在其下添加如下內容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
重啓apache
[root@Only-test php-5.3.24]\> /Ddisk/program/apache/bin/apachectl restart
在htdocs目錄裏建一內容爲 <?php phpinfo(); ?> PHP文件, 輸入URL地址查看PHP配置是否正確。
Phpmyadmin
[root@Only-test tool]\> unzip phpMyAdmin-3.4.10.2-all-languages.zip
[root@Only-test tool]\> mv phpMyAdmin-3.4.10.2-all-languages /Ddisk/program/apache/htdocs/phpmyadmin