linux下安裝lamp

來源:互聯網
上載者:User

參照lampbrother重新編譯了下lamp環境。

 

這裡上下編譯的shell指令碼

cd /lamp/libxml2-2.6.30./configure --prefix=/usr/local/libxml2/make make install cd /lamp/libmcrypt-2.5.8./configure --prefix=/usr/local/libmcrypt/make make installcd /lamp/libmcrypt-2.5.8/libltdl./configure --enable-ltdl-installmakemake installcd /lamp/zlib-1.2.3./configuremakemake install cd /lamp/libpng-1.2.31./configure --prefix=/usr/local/libpng/makemake installmkdir /usr/local/jpeg6mkdir /usr/local/jpeg6/binmkdir /usr/local/jpeg6/libmkdir /usr/local/jpeg6/includemkdir -p /usr/local/jpeg6/man/man1cd /lamp/jpeg-6b./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-staticmakemake installcd /lamp/freetype-2.3.5./configure --prefix=/usr/local/freetype/makemake installcd /lamp/autoconf-2.61./configuremake make install cd /lamp/gd-2.0.35./configure --prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg6/ --with-freetype=/usr/local/freetype/makemake installcd /lamp/httpd-2.2.9./configure --prefix=/usr/local/apache2/ --sysconfdir=/etc/httpd/ --with-included-apr --disable-userdir --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-supportmakemake install /usr/local/apache2/bin/apachectl startecho "/usr/local/apache2/bin/apachectl start" >> /etc/rc.d/rc.sysinitcd /lamp/ncurses-5.6./configure --with-shared --without-debug --without-ada --enable-overwritemake make installgroupadd mysqluseradd -g mysql mysqlcd /lamp/mysql-5.0.41./configure --prefix=/usr/local/mysql/ --with-extra-charsets=allmakemake installcp support-files/my-medium.cnf /etc/my.cnf/usr/local/mysql/bin/mysql_install_db --user=mysqlchown -R root /usr/local/mysqlchown -R mysql /usr/local/mysql/varchgrp -R mysql /usr/local/mysql/usr/local/mysql/bin/mysqld_safe  --user=mysql &cp /lamp/mysql-5.0.41/support-files/mysql.server /etc/rc.d/init.d/mysqldchown root.root /etc/rc.d/init.d/mysqldchmod 755 /etc/rc.d/init.d/mysqldchkconfig --add mysqldchkconfig --list mysqldchkconfig --levels 245 mysqld off cd /lamp/php-5.2.6./configure --prefix=/usr/local/php/ --with-config-file-path=/usr/local/php/etc/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-libxml-dir=/usr/local/libxml2/ --with-jpeg-dir=/usr/local/jpeg6/ --with-freetype-dir=/usr/local/freetype/ --with-gd=/usr/local/gd2/ --with-mcrypt=/usr/local/libmcrypt/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --enable-mbstring=all --enable-sockets makemake installcp php.ini-dist /usr/local/php/etc/php.iniecho "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf/usr/local/apache2/bin/apachectl restart

 

大家可以按照這裡面出現的軟體版本去下載,然後進行編譯。(可以參考我的http://www.cnblogs.com/yimiao/archive/2012/05/06/2485679.html)

 

【其他】

如果需要開啟php的其他擴充,例如curl

1.首先進入php源碼curl的目錄 

cd /usr/local/webdev/tools/php-5.2.6/ext/curl//usr/local/webdev/php/bin/phpize #執行完這句就會生存config指令碼了./configure --prefix=/usr/local/curl/ --with-php-config=/usr/local/webdev/php/bin/php-config

編譯安裝完畢會在(如果中間出現了錯誤 執行這個 yum install curl-devel)

/usr/local/webdev/php//lib/php/extensions/no-debug-non-zts-20060613/

目錄下面產生curl.so

 

然後修改php.ini就可以了(extensions_dir = 你存放擴充的目錄,加入extension=curl.so)

相關文章

聯繫我們

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

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

Tags Index: