简体   繁体   English

将PHP编译到自定义目录

[英]Compile PHP into custom directory

I am compiling an old version of PHP (5.6.6 legacy reasons, we will be later moving to recent system package version, and just looking to create a package). 我正在编译旧版本的PHP(5.6.6遗留的原因,我们稍后将移至最新的系统软件包版本,而只是想创建一个软件包)。

This will go into a custom RPM, so I am looking to install it all into a temporary folder, which I will make extract into correct directory on install of the rpm (this is all fine). 这将进入自定义RPM中,因此我希望将其全部安装到一个临时文件夹中,在安装rpm时,将其提取到正确的目录中(一切都很好)。

In most other source compiles, I can do something like... 在大多数其他源代码编译中,我可以做类似...

make DESTINSTALL=/tmp/mytempfolder install

Then I would have the full install structure in a temporary folder. 然后,我将在一个临时文件夹中拥有完整的安装结构。

This doesn't seem to work for PHP though. 不过,这似乎不适用于PHP。 I have seen 'prefix' parameter, which works for some of the install, but not for the lib, man and build folders. 我已经看到“前缀”参数,该参数适用于某些安装,但不适用于lib,man和build文件夹。

Is there any way to set a root folder for the whole of the build install, when doing a 'make install' ? 执行“ make install”时,是否有任何方法可以为整个构建安装设置根文件夹?

For anyone else trying to do the same, my end solution was to use INSTALL_ROOT eg 对于其他尝试这样做的人,我的最终解决方案是使用INSTALL_ROOT例如

make -C /usr/src/somedir INSTALL_ROOT=/tmp/php -f /usr/src/somedir/Makefile install

I did also have to copy cp /usr/local/apache2/modules/libphp5.so into there, as this seemed to avoid it. 我还必须将cp /usr/local/apache2/modules/libphp5.so复制到那里,因为这样做似乎可以避免这种情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 自定义目录查看器(php) - Custom directory viewer (php) 使用共享选项和目录位置编译 PHP - Compile PHP using shared option and directory location Laravel PHP:自定义中间件目录问题 - Laravel PHP : Issue with Custom Middleware Directory PHP以自定义顺序订购目录中的文件夹和文件 - PHP Order folders & files in directory in custom order 自定义 php 文件目录在 Wordpress 与木材 Twig - Custom php file directory in Wordpress with Timber Twig 如何使php include_path在自定义目录“ / var / custom_directory”上工作? - How to get php include_path to work on a custom directory '/var/custom_directory'? 如何在wordpress插件目录中包含自定义php文件? - How to include custom php file inside wordpress plugin directory? 从不在标准目录中的规则集引用自定义php codeniffer进行嗅探 - Reference custom php codesniffer sniffs from a ruleset that is not in the standards directory html / php使用自定义文件名创建文本文件并将其保存到根目录 - html/php create and save text file to root directory with custom filename 如何在drupal目录中添加php文件的自定义文件夹? - How to add custom folder of php files in drupal directory?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM