1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
I have TrueOS on my laptop, and I'm learning TrueOS and FreeBSD. I gather that TrueOS is based on FreeBSD, and has some extra packages over FreeBSD and maybe some slightly different configuration of some items. [edited: TrueOS version "stable repository" (it would be nice if TrueOS gave the version number in SysAdm Update Manager) (ah got something from uname -a: trueos-stable-17.12) FreeBSD version 12.0-CURRENT postgresql 9.4] I have a fair amount of experience from Linux, and I can use the command line .... I'm trying to learn FreeBSD and it is not going that well. I have found the handbooks in /usr/local/share/doc/freebsd, which is somewhat helpful. But they don't always answer the questions I have, which are more like "I know postgresql has config files that specify where the data files are, where is that config file?" than "how do I start a service". (I will come back to a more specific set of questions later.) Also, those ports and the pkg system ... So I understand that on FreeBSD, the software is split into two tiers - the base system and the ports. Ok, so ports can be installed with portsnap or cvs ... or make. I understand that if some software is installed with pkg, it should not also be installed with ports. The zeroth question: Can you install some packages with ports and some with pkg? At this stage of my learning, I'm aiming to avoid any customization of the source before installing. I just want to familiarize with how to use the package and ports systems. My first question is: if I build and install with ports, and make no changes to the configuration in any package, then is it ok to mix ports and pkg commands on the same software (eg, install with pkg, uninstall with ports) Second question: I installed several postgresql packages using pkg. Then I did a portsnap update fetch, and then a make extract. The goal was to examine the source code, not build or install it. Although I might build, but I'm not going to install from ports (at this stage). Is it ok to mix portsnap and make commands like that, as long as I don't try to install from ports when I have already installed with pkg? Third question. I was in directory /usr/ports/databases/postgresql94-server when I gave the portsnap update fetch command. When it finished, the cwd was invalid. Did I do something wrong? Fourth question. To make the cwd valid again, I issued: cd /usr/ports/databases/postgresql94-server. Then I ran make extract. The purpose of getting the postgresql source was to find out how postgres figures out where the data directory is. Because the config files for postgresql that I can find don't seem to say. In /usr/local/pgsql/data/xxx.conf, all the items which might indicate where the database data files are, are commented out. I guess the default is hardcoded in the postgresql makefiles which had been customized for FreeBSD builds? ... Eeeeh, automake. Getting past my comfort level. Fifth question: working with source code in ports (or in base system) as root ... as far as I can tell, you have to be root to work with the source code (to build, even to extract). Is that right? If so, is there a plan to change that so you can generally work as a regular user and only when you need root (eg, to install to system directories) then you run the minimum number of commands as root? If there is no general will by the community to do that, does anyone do that on their own? Can they give some guidance, maybe in a segment on BSDNow? Sixth question: I think pkg wants to use "pgsql" as the postgres user and ports defaults to "postgres" ... is that right? How can I tell what other differences there might be between the pkg version of a software and the ports version? Seventh question, on the TrueOS overlay on FreeBSD and how it interacts with the package systems: There is also this gui thing SysAdm, is it ok to install packages with pkg and SysAdm, or should I avoid that and only use SysAdm when using TrueOS? I think SysAdm doesn't interact with the ports system, is that true? Is SysAdm a layer over the pkg system or am I misunderstanding how SysAdm works? I've tried starting postgresql-server with that and: 7a) the list of "services" does not show "start on boot=true" for postgresql, even though I added postgresql_enable="YES" to /etc/rc.conf. So I clicked the button to "enable" postgres and it now says true for start on boot, but I don't see a difference in /etc/rc.conf ... what did it do to make it visible to SysAdm? 7b) But when I click the "start now" button, postgres doesn't change to "started" state. So clearly, something is preventing it from starting ... but what? Ah, in /var/log/messages it says /usr/home/pgsql/data/postgresql.conf not found. Aha, so the data was not in /var/lib/pgsql/data. See, it would have been nice to find out where the database and postgresql conf files were, before getting to this stage. Holy %$%^@, there is no /usr/home/pgsql. So where is postgres configured to look there? Oh man, this is so weird. There is a user whose home directory is /usr/local/pgsql (as per /etc/passwd), but postgres looks for its files in /usr/home/pgsql. Really? Also /usr/home/pgsql does not exist, but /usr/local/pgsql does exist. This is driving me nuts. Well I'm only getting started, I want to really get my hands dirty with FreeBSD. I have various things I've been doing on Linux that I want to try to do on FreeBSD. And to make it harder, I'm also going to try to change from apache to lighttpd. Supposedly it should make my life easier, but we'll see. But those are next steps, after I get postgresql to run. Might be nice also to study the source code in the base and ports systems ... but I need to get comfortable with all these code management systems first. And now a question about your podcast. First off, thanks for the podcast! 1) There are a few segments on the podcast: the news, beastie bits, community questions, interviews, roundup. What other segments are there, and what are the goals of each segment? It's obvious what the "news", "interviews", and "community questions" segments are, but what is the goal of "beastie bits", "roundup" and any other segments there might be? How is that different from the other segments? I looked on the bsdnow.tv web site to see if there was such a list/explanation and didn't find it. (eg, on the "about" page) Thanks! One last point, I have asked one or two questions on irc. The answers were "That's TrueOS, go ask them" and "read the handbooks". Also "try our other forum where you have to register and log in". And crickets. So, I am working my way through the handbooks, but I'm not able to do anything useful on FreeBSD yet and maybe I'm slow but it would be nice to have a bit of a helping hand occasionally, even if it is just "see this section of this handbook".
Pasted 5 months, 2 weeks ago — Expires in 198 days