3、php的安裝
安裝gd庫(讓php支援gif,png,jpeg)
wget
wget
wget
wget
安裝 jpeg6
建立目錄
# 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 /tmp
# tar -zxf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure
--prefix
=/usr/local/jpeg6/ --enable-shared --enable-static
# make; make install
安裝libpng
# cd /tmp
# tar -zxf libpng-1.2.8.tar.gz
# cd libpng-1.2.8
# cp scrīpts/makefile.std makefile
# make; make install
安裝 freetype
# cd /root/soft
# tar -zxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# ./configure
--prefix
=/usr/local/freetype
# make;make install
安裝最新的gd庫
# cd /tmp
# tar -zxf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure
--prefix
=/usr/local/gd2
--with-jpeg
=/usr/local/jpeg6/ --with-png --with-zlib
--with-freetype
=/usr/local/freetype/
# make; make install
# cd /tmp
# wget
# tar -zxf libxml2-2.6.19.tar.gz
# cd libxml2-2.6.19
# ./configure
--prefix
=/usr/local/libxml2
# make; make install
安裝 libxslt
# cd /tmp
# wget
# tar -zxf libxslt-1.1.22.tar.gz
# cd libxslt-1.1.22
# ./configure
--prefix
=/usr/local/libxslt
--with-libxml-prefix
=/usr/local/libxml2
# make; make install
終於要安裝php了:
# tar -zxf php-5.2.3.tar.gz
# cd php-5.2.3
# ./configure
--prefix
=/usr/local/php5
--with-apxs2
=/usr/local/apache/bin/apxs
--with-mysql
=/usr/local/mysql/ --enable-ftp
--with-libxml-dir
=/usr/local/libxml2
--with-expat-dir
=/usr/lib
--with-xsl
=/usr/local/libxslt --enable-xslt
--with-gd
=/usr/local/gd2/
--with-jpeg-dir
=/usr/local/jpeg6/
--with-zlib-dir
=/usr/lib --with-png
--with-freetype-dir
=/usr/local/freetype --enable-mbstring
# make
# make install
其中./configure 後的
--prefix=/usr/local/php5
--with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql/
--with-libxml-dir=/usr/local/libxml2
是必要的選項
--with-gd=/usr/local/gd2/
--with-jpeg-dir=/usr/local/jpeg6/
--with-png
--with-zlib-dir=/usr/lib
--with-freetype-dir=/usr/local/freetype
這是讓php支援gd庫的配置選項
配置 httpd.conf 讓apache支援php
安裝 phpmyadmin
安裝zend:
# tar zxvf zendoptimizer-3.2.2-linux-glibc21-i386.tar.gz
# cd zendoptimizer-3.2.2-linux-glibc21
# ./install.sh
ok,centos下lamp安裝成功~!
Centos下搭建php環境,安裝lamp環境
首先使用yum命令安裝或者公升級所需的程式庫 copy以下命令到命令列回車即可。yum y install gcc gcc c autoconf libjpeg libjpeg devel libpng libpng devel freetype freetype devel libxml2 lib...
CentOS7下PHP環境搭建
1 安裝 2 修改配置檔案,開放訪問 安裝成功後,預設情況下,是禁止外部ip訪問的,需要進行設定 找到 allowoverride none require all denied 修改為 allowoverride none require all granted 3 開放80埠 firewall ...
centos 7下php環境搭建
系統 centos 7.3 php 5.4.16 apache 2.4.6 mysql 5.6 1.開啟阿里雲例項網路和安全的安全組,選擇配置規則對埠進行配置,開放80,3306等埠 2.安裝apache php mysql 連線mysql的資料報 yum y install mysql serve...