Installing PostgreSQL from source on my Mac

In order to build PostgreSQL from source on my MacBook Pro running El Capitan, I first downloaded the git repo:

git clone git://git.postgresql.org/git/postgresql.git

I then built it:


cd postgresql
./configure
gmake
sudo make install

This will install the binaries to the default location of “/usr/local/pgsql”.

I already had a user called “_postgres” in my /etc/passwd file, so I configured to run PostgreSQL as this user:
Continue reading “Installing PostgreSQL from source on my Mac”

Hacked!

It looks like my blog got hacked. I noticed that there were some weird posts related to an essay writing service, which I’ve now deleted. I’m not sure of the attack vector. I had a relatively weak password for my WordPress user, which could have been the entry point. I’ll have a look at the server this weekend and see what I find. At least it’s prompted me to do some work on improving the security on the server and to do some software upgrades. I need to set up the letsencrypt certificates as well.

dhclient and resolv.conf

For some reason, when I get onto a client’s network and run /sbin/dhclient on my hacked-together-linux notebook, dhclient gets an IP address via DHCP, but doesn’t update my /etc/resolv.conf with the local name servers, so names don’t get resolved using DNS.

I haven’t figured out a fix for this yet, but a temporary work-around is to have a look at the lease in the /var/state/dhcp/dhclient.leases file. You should see a line like “option domain-name-servers 192.168.94.49;”. Just put that IP address in the /etc/resolv.conf file (ie “nameserver 192.168.94.49”).