[英]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.