国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > WEB服務 > 正文

在Mac OS上自行編譯安裝Apache服務器和PHP解釋器

2020-03-22 20:16:52
字體:
來源:轉載
供稿:網友
Apache 2.2.27和PHP 5.5.12在Mac OS X 10.8.5編譯安裝過程:
在開始之前首先升級Xcode的組件: preferences = Downloads = 下載Command Line Tools包然后進入Apache的源碼包,對于大部分的源碼包都可以使用下面這個指令來查看編譯選項:./configure --help配置編譯選項:./configure --prefix=/Users/levin/dev/apache2.2.27 --enable-modules=most --enable-mods-shared=all報錯:checking for APR-util... yeschecking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/ccchecking whether the C compiler works... noconfigure: error: in `/Users/levin/Downloads/httpd-2.2.27':configure: error: C compiler cannot create executablesSee `config.log' for more details上面的報錯是指路徑:/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc不存在解決方法:cd /Applications/Xcode.app/Contents/Developer/Toolchainssudo ln -s XcodeDefault.xctoolchain OSX10.8.xctoolchain接著編譯并安裝:make install編輯配置文件httpd.conf,一般修改監聽端口、運行Apache的用戶和組、服務器名稱、開啟gzip等配置。進入安裝好的目錄啟動Apache:./bin/apachectl start安裝PHP關于PHP編譯選項可以參考: PHP: List of core configure options - Manual./configure --prefix=/Users/levin/dev/php5.5.12 --with-apxs2=/Users/levin/dev/apache2.2.27/bin/apxs --with-config-file-path=/Users/levin/dev/php5.5.12/etc --with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd --enable-gd-native-ttf --with-mhash --enable-mbstring --enable-soap --enable-zip --enable-sockets --with-mysql=/usr/local/mysql-5.6.12-osx10.7-x86_64 --with-mysqli=/usr/local/mysql-5.6.12-osx10.7-x86_64/bin/mysql_config --with-iconv --with-pear --enable-opcache整個編譯過程需要5-10分鐘,視硬件配置而定,可以先去弄杯牛奶喝發生錯誤:Undefined symbols for architecture x86_64: "_res_9_init", referenced from: _zif_dns_get_mx in dns.o _zif_dns_get_record in dns.o _zif_dns_check_record in dns.o "_res_9_search", referenced from: _zif_dns_get_mx in dns.o _zif_dns_get_record in dns.o _zif_dns_check_record in dns.o "_res_9_dn_skipname", referenced from: _zif_dns_get_mx in dns.o _zif_dns_get_record in dns.o "_res_9_dn_expand", referenced from: _zif_dns_get_mx in dns.o _php_parserr in dns.old: symbol(s) not found for architecture x86_64collect2: ld returned 1 exit statusmake: *** [libs/libphp5.bundle] Error 1解決:export LDFLAGS=-lresolv錯誤:dyld: Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/levin/Downloads/php-5.5.12/sapi/cli/php Reason: image not foundmake: *** [ext/phar/phar.php] Error 133解決:cd /usr/libln -s /usr/local/mysql-5.6.12-osx10.7-x86_64/lib/libmysqlclient.18.dylib libmysqlclient.18.dylib重新編譯并安裝:make clean && makemake install安裝完成,此時需要從PHP的源碼目錄copy一份配置文件到安裝目錄的etc文件夾下面并改名為php.ini,需要更改PHP的配置時就使用該文件即可。PHP教程

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 和平县| 南通市| 伊宁市| 隆化县| 叙永县| 封开县| 龙游县| 盐津县| 寿阳县| 永春县| 潮安县| 普宁市| 沅江市| 石城县| 鱼台县| 彭阳县| 特克斯县| 萝北县| 蒙自县| 诸暨市| 泰来县| 武功县| 额敏县| 永清县| 治多县| 浦东新区| 错那县| 台北市| 启东市| 舟山市| 伊金霍洛旗| 抚远县| 搜索| 尉犁县| 高陵县| 长宁区| 安宁市| 泊头市| 中阳县| 宁远县| 余干县|