Date: Fri, 18 Jul 2014 14:14:17 +0200 From: Lars Engels <lars.engels@0x20.net> To: Adrian Chadd <adrian@freebsd.org>, Andreas Nilsson <andrnils@gmail.com>, Craig Rodrigues <rodrigc@freebsd.org>, freebsd-doc@freebsd.org, freebsd-current Current <freebsd-current@freebsd.org>, ports <freebsd-ports@freebsd.org> Subject: Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg? Message-ID: <20140718121417.GE96250@e-new.0x20.net> In-Reply-To: <20140718121025.GD96250@e-new.0x20.net> References: <CAG=rPVcyqq2072%2BgF_X91BocxykJB6%2BU0cMhaNexxfVFpVqUbA@mail.gmail.com> <CAJ-Vmo=p6-7KCL8C09O4dPq04pitW5wDbtsDAyz-u4Qtr7rpRA@mail.gmail.com> <CAPS9%2BSt%2BFF2_-FbrCTXF-D3Vb7DhnOEHDti%2B5WXeO=BYu=QeGA@mail.gmail.com> <CAJ-VmonjWkm=A40-4sF_yjUm=djPyvM5KHnDsevDq63u-Yo6mA@mail.gmail.com> <20140718121025.GD96250@e-new.0x20.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--X3gaHHMYHkYqP6yf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 18, 2014 at 02:10:25PM +0200, Lars Engels wrote: > On Thu, Jul 17, 2014 at 01:00:03PM -0700, Adrian Chadd wrote: > > On 17 July 2014 12:57, Andreas Nilsson <andrnils@gmail.com> wrote: > > > > > > > > > > > > On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd <adrian@freebsd.org> wr= ote: > > >> > > >> Hi! > > >> > > >> 3) The binary packages need to work out of the box > > >> 4) .. which means, when you do things like pkg install apache, it > > >> can't just be installed and not be enabled, because that's a bit of a > > >> problem; > > > > > > I disagree on this. For network services on linux ( apart from ssh ),= I want > > > that started very seldom. But I do want the package installed so that= when I > > > need it, it is there. Having it autostart as part of being installed = is > > > breaking KISS and in some way unix philosophy: I asked for something = to be > > > installed, not installed and autostarted. > >=20 > > That's cool. We can disagree on that. But the fact that you have to > > edit a file to enable things and hope you get the right start entry in > > /etc/rc.conf or /usr/local/etc/rc.conf, or wherever you put it is, is > > a pain. >=20 > No, Sir! No need to edit anything: >=20 > root@testjail: # pkg install apache24 > Updating repository catalogue > The following 5 packages will be installed: >=20 > Installing pcre: 8.33 > Installing gdbm: 1.10 > Installing db42: 4.2.52_5 > Installing apr: 1.4.8.1.5.3 > Installing apache24: 2.4.6_1 >=20 > The installation will require 47 MB more space >=20 > 5 MB to be downloaded >=20 > Proceed with installing packages [y/N]: y > gdbm-1.10.txz 100% 83KB 83.2KB/s 83.2KB/s 00:00 > db42-4.2.52_5.txz 100% 1457KB 1.4MB/s 1.4MB/s 00:00 > apr-1.4.8.1.5.3.txz 100% 390KB 389.5KB/s 389.5KB/s 00:00 > apache24-2.4.6_1.txz 100% 3649KB 3.6MB/s 3.6MB/s 00:00 > Checking integrity... done > [1/5] Installing pcre-8.33... done > [2/5] Installing gdbm-1.10... done > [3/5] Installing db42-4.2.52_5... done > [4/5] Installing apr-1.4.8.1.5.3... done > [5/5] Installing apache24-2.4.6_1...=3D=3D=3D> Creating users and/or grou= ps. > Using existing group 'www'. > Using existing user 'www'. > /usr/local/share/examples/apache24/httpd.conf -> > /usr/local/etc/apache24/httpd.conf > done > To run apache www server from startup, add apache24_enable=3D"yes" > in your /etc/rc.conf. Extra options can be found in startup script. >=20 > Your hostname must be resolvable using at least 1 mechanism in > /etc/nsswitch.conf typically DNS or /etc/hosts or apache might > have issues starting depending on the modules you are using. >=20 > root@testjail: # sysrc apache24_enable=3Dyes > apache24_enable: -> yes >=20 > root@testjail: # service apache24 start > Performing sanity check on apache24 configuration: > AH00557: httpd: apr_sockaddr_info_get() failed for testjail > AH00558: httpd: Could not reliably determine the server's fully > qualified domain name, using 127.0.0.1. Set the 'ServerName' directive > globally to suppress this message > Syntax OK > Starting apache24. > AH00557: httpd: apr_sockaddr_info_get() failed for testjail > AH00558: httpd: Could not reliably determine the server's fully > qualified domain name, using 127.0.0.1. Set the 'ServerName' directive > globally to suppress this message > root@testjail: # >=20 >=20 > That's 3 commands to enter. Admittedly 2 more than on some OS that > blindly starts any service you install, but 2 steps more logical and > even a newbie can do this. >=20 > What could be done is that pkg looks for rc scripts in a package, > extracts the enable line and prints a message how to enable the script / > daemon permanently. >=20 > Like:=20 > - To start the script "apache24" once run "service apache24 onestart". > - To start the script "apache24" at boot time run "sysrc apache24_enable= =3Dyes" > - The script "apache24" has the following optional settings for /etc/rc.c= onf: > apache24_profiles (str): Set to "" by default. > Define your profiles here. > apache24limits_enable (bool):Set to "NO" by default. > Set it to yes to run `limits $limits_args` > just before apache starts. > apache24_flags (str): Set to "" by default. > Extra flags passed to start command. > apache24limits_args (str): Default to "-e -C daemon" > Arguments of pre-start limits run. > apache24_http_accept_enable (bool): Set to "NO" by default. > Set to yes to check for accf_http kernel > module on start up and load if not loaded. > apache24_fib (str): Set an altered default network view for a= pache >=20 >=20 >=20 Sorry for no reading the whole thread first. This was already suggested in another part of the thread. --X3gaHHMYHkYqP6yf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF7BAEBCgBmBQJTyQ+ZXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tYnQH92Fryi0AK/TnLdIfoYHluYJl TSDKYXMsq/DNhWQdTwDOLwU1GyUFnjvLm5RVvyODo6RIT4EnqH3hnOBJ9O/J5DFV T8/EiV863j+j6rKmwG/pzygM7JYy9T7cZEZBBj6tm8CSYZSOdbaCtSLeyof7z0EW NhNVISs5mqfGETTtnfLdRyRvYCqadpd691v2sgzus6ziCAo6f1DgA/PbM4sG7HRW 8DJW5xdSzV6kqZ24DbbvSiZVFzz1efpGbFKOgH27lpJglgqDzyK0gkxa6Dfg1xCd fkTc125cWCBdzI1dAeApfAhXsw3AL2RuY/KqdZLbsh+cXYmmT8JG7Ta+C/giLA== =UaRC -----END PGP SIGNATURE----- --X3gaHHMYHkYqP6yf--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140718121417.GE96250>