Linux下原始碼安裝apache+mysql+php

來源:互聯網
上載者:User

Linux下原始碼安裝apache+mysql+php

/*******************************
 * I am pefocus,pefocus is me !*
 *******************************/

編譯環境:RedHat Enterprise AS 5,開啟SELlinux

所需要的軟體:apache,php,phpmyadmin,mysql,GD及庫相關        
libpng-1.2.24.tar.bz2  
zlib-1.2.3.tar.gz
freetype-2.3.5.tar.gz 
libxslt-1.1.22.tar.gz  
jpegsrc.v6b.tar.gz
gd-2.0.36RC1.tar.bz2  
libxml2-2.6.30.tar.gz  

下載地址:
http://www.apache.org
http://www.php.net
http://www.mysql.com
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
http://www.zlib.net/zlib-1.2.3.tar.gz
http://prdownloads.sourceforge.net/libpng/libpng-1.2.8-config.tar.gz?download
http://easynews.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.3.tar.bz2
http://telia.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.3.tar.bz2

1.安裝apache
tar -xvf httpd-2.2.0.tar.gz
cd httpd-2.2.0
./configure --prefix=/usr/local/apache2 --enable-module=so
make
make install

設定apache自啟動:
cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
然後vi /etc/init.d/httpd
在第3行加入
# chkconfig: 2345 70 30
# processname: httpd
注意:#號不能去掉!
最後chkconfig --add httpd

2.freetype
tar vjf freetype-2.1.3.tar.bz2
cd freetype-2.1.3
./configure
make
make install

3.jpeg
tar xvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared --enable-static
make
mkdir -v /usr/local/man
mkdir -v /usr/local/man/man1
make install

4.zlib
tar xvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
make
make install

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.