心有多大舞台便有多大

Embrace changes, pursue excellence, share niceness.

ubuntu下安装php及phpMyAdmin

apache的安装就不说了^_^
1.下载php
wget http://cn2.php.net/get/php-5.2.5.tar.gz/from/cn.php.net/mirror
2.下载libxml
wget ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.30.tar.gz
3.下载gd
wget http://www.libgd.org/releases/gd-2.0.35.tar.gz
4.下载phpMyAdmin
wget http://prdownloads.sourceforge.net/phpmyadmin/phpMyAdmin-2.11.5.1-all-languages.tar.gz?download
5.安装libxml
    tar -zxvf libxml2-2.6.30.tar.gz
    cd libxml2-2.6.30/
    ./configure --prefix=/usr/local/libxml-2.6.30
    make
    sudo make install
6.安装gd
    tar -zxvf gd-2.0.35.tar.gz
    cd gd-2.0.35/
    ./configure --prefix=/usr/local/gd-2.0.35
    make
    sudo make install
7.安装php
    tar -zxvf php-5.2.5.tar.gz
    cd php-5.2.5/  
    ./configure --prefix=/usr/local/php-5.2.5 --with-apxs2=/usr/local/apache-2.2.8/bin/apxs --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml-2.6.30/ --with-gd=/usr/local/gd-2.0.35/
    make
    make test
    sudo make install
8.配置apache及php
    cp php.ini-dist /usr/local/lib/php.ini
    在httpd.conf中:
    #安装完php后一般安装程序会自动修改httpd.conf文件加入以下配置:
    LoadModule php5_module modules/libphp5.so
    AddType application/x-httpd-php .php .phtml
   AddType application/x-httpd-php-source .phps
9.安装phpMyAdmin
    tar -zxvf phpMyAdmin-2.11.5.1-all-languages.tar.gz
    sudo mv phpMyAdmin-2.11.5.1-all-languages /usr/local/apache-2.2.8/htdocs/phpMyAdmin
访问一下看看可以没:
    http://host/phpMyAdmin/index.php
配置页面应该出来了!恭喜,安装成功!

posted on 2008-04-19 15:24 pony 阅读(3501) 评论(1)  编辑  收藏 所属分类: linux

评论

# re: ubuntu下安装php及phpMyAdmin 2008-05-07 12:54 pony

更正php的编译选项:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml-2.6.30/ --with-gd=/usr/local/gd-2.0.35/ --with-curl=/usr/local/curl/ --with-openssl --with-zlib --with-pear=/usr/local/php_pear  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航: