当前位置: 首页 > 后端技术 > PHP

在MacOSX10.12.6上编译安装Tengine+PHP7.1

时间:2023-03-29 18:02:29 PHP

先贴一下电脑配置。电脑版如下图所示:PHP安装步骤如下:请确保电脑已关闭SIP(系统完整性保护)。关闭SIP的方法就是问谷歌!下载PHP7.1.1并解压。wgethttp://mirrors.sohu.com/php/php-7.1.1.tar.gztar-zcvfphp-7.1.1.tar.gz安装PHP前前依赖安装brewinstallgccbrewinstalllibxml2brewinstallopensslbrewinstallautoconfbrewinstalllibjpegbrewinstalllibpngbrewinstallfreetypebrewinstallgettextbrewinstallmcryptlibmcrypt4.编译安装参数如下:./configure--prefix=/usr/local/php71--with-config-file-path=/usr/local/php71/etc--with-mcrypt=/usr/include--with-mysqli=mysqlnd--with-pdo-mysql=mysqlnd--with-gd--with-iconv--with-zlib--enable-xml--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--enable-mbregex--enable-fpm--enable-mbstring--enable-ftp--enable-gd-native-ttf--enable-pcntl--enable-sockets--with-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext--enable-session--with-curl--with-jpeg-dir--with-freetype-dir--enable-opcache--with-libxml-dir=/usr/local/Cellar/libxml2/2.9.7--with-openssl-dir=/usr/local/Cellar/openssl/1.0.2m/sudomake&&sudomakeinstall安装Tengine(nginx)步骤如下:像PHP一样先下载Tengine!http://tengine.taobao.otg下载依赖包:jemalloc、zlib、openssl、pcre.3。编译安装参数:./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-http_gzip_static_module\\n--with-pcre=/Users/guoyexuan/Downloads/pcre-8.38\\n--with-zlib=/Users/guoyexuan/Downloads/zlib-1.2.11\\n--with-jemalloc=/Users/guoyexuan/Downloads/jemalloc-3.6.0\\n--with-openssl=/Users/guoyexuan/Downloads/openssl-1.0.2m4.修改MakeFiles.&&./config--prefix=/Users/xxx/Downloads/tengine-2.2.1/../openssl-1.0.2m/.opensslno-shared\Modifyconfig为Configuredarwin64-x86_64-cc,--prefix后无需修改,修改如:&&./Configuredarwin64-x86_64-cc--prefix=/Users/xxx/Downloads/tengine-2.2.1/../openssl-1.0.2m/.openssl不共享\5。sudomake&&sudomake安装。