V
V
Vyacheslav Barsukov2015-07-14 14:04:13
Apache HTTP Server
Vyacheslav Barsukov, 2015-07-14 14:04:13

How to prevent pkg from updating a package?

Good afternoon, I'm updating php and I need to install mod_php. But pkg pulls apache24, which I do not need, because. has its own fine-tuning.
It was possible to set the version of apache in ports, how to do it in pkg?
New packages to be INSTALLED:
mod_php56: 5.6.11
apache24: 2.4.12

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis Ilinykh, 2015-07-14
@greyhard

From the documentation for pkg
Try to make Lock on an already installed apache

K
kelevra, 2015-07-23
@kelevra

the native repository contains precompiled packages with default options. these options for mod_php specifically tell it to compile for apache 2.4. therefore, even if you install mod_php from the native repository, it will most likely not work with apache 2.2.
in order to install mod_php from the repository, which will be compiled for apache 2.2, you need to make your own repository and register it in the pkg configuration. if the update is needed in a single copy, then it is easier to install from the ports.
ps. mpm_itk is a buggy and leaky crutch. with different owners, it is best to run multiple copies of Apache through profiles in /etc/rc.conf:

apache22limits_enable="YES"
apache22_profiles="mnx torrent forum retracker"

apache22_mnx_enable="YES"
apache22_mnx_configfile="/usr/local/etc/apache22/profiles/mnx.conf"

apache22_torrent_enable="YES"
apache22_torrent_configfile="/usr/local/etc/apache22/profiles/torrent.conf"

apache22_forum_enable="YES"
apache22_forum_configfile="/usr/local/etc/apache22/profiles/forum.conf"

apache22_retracker_enable="YES"
apache22_retracker_configfile="/usr/local/etc/apache22/profiles/retracker.conf"

while service apache22 start will start 4 copies of httpd with different configs. of course, they must all be on different ports.

V
Vyacheslav Barsukov, 2015-08-08
@slavabars

Because it was not possible to solve my question using pkg tools, I did it differently.
Downloaded ports from git, changed the line from APACHE_DEFAULT?= 2.4 in /usr/ports/Mk/bsd.default-versions.mk file
Installed bmake, relinked make to bmake and built mod_php56

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question