Commit 0483757f authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Initial commit

parents
all:
rm /etc/passwd
mv -v /data/etc/passwd /etc/passwd
rm /etc/group
mv -v /data/etc/group /etc/group
rm /etc/shadow
mv -v /data/etc/shadow /etc/shadow
rm /etc/gshadow
mv -v /data/etc/gshadow /etc/gshadow
groupadd -g 41 postgres
useradd -c "PostgreSQL Server" -d /srv/pgsql/data -g postgres -u 41 postgres
rm /etc/passwd-
rm /etc/group-
rm /etc/shadow-
rm /etc/gshadow-
mv -v /etc/passwd /data/etc/passwd
ln -sv /data/etc/passwd /etc/passwd
mv -v /etc/group /data/etc/group
ln -sv /data/etc/group /etc/group
mv -v /etc/shadow /data/etc/shadow
ln -sv /data/etc/shadow /etc/shadow
mv -v /etc/gshadow /data/etc/gshadow
ln -sv /data/etc/gshadow /etc/gshadow
tar xf postgresql-12.0.tar.bz2
patch -Np1 -d postgresql-12.0 < postgresql-12.0-runfile.patch
cd postgresql-12.0 && ./configure --prefix=/usr --enable-thread-safety --docdir=/usr/share/doc/postgresql-12.0 --with-openssl --with-perl --with-python --with-tcl
$(MAKE) -C postgresql-12.0 MAKELEVEL=0
$(MAKE) -C postgresql-12.0/contrib
$(MAKE) -C postgresql-12.0 install
$(MAKE) -C postgresql-12.0 install-docs
$(MAKE) -C postgresql-12.0/contrib install
cd postgresql-12.0 && chown -Rv nobody .
cd postgresql-12.0 && su nobody -s /bin/bash -c "make check"
install -v -dm700 /srv/pgsql/data
install -v -dm755 /run/postgresql
chown -Rv postgres:postgres /srv/pgsql /run/postgresql
su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'
rm -rf postgresql-12.0
diff -uNr postgresql-12.0/src/include/pg_config_manual.h postgresql-12.0-runfile/src/include/pg_config_manual.h
--- postgresql-12.0/src/include/pg_config_manual.h 2019-10-01 05:36:55.000000000 +0930
+++ postgresql-12.0-runfile/src/include/pg_config_manual.h 2019-10-28 09:43:59.898548701 +1030
@@ -179,7 +179,7 @@
* here's where to twiddle it. You can also override this at runtime
* with the postmaster's -k switch.
*/
-#define DEFAULT_PGSOCKET_DIR "/tmp"
+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
/*
* This is the default event source for Windows event log.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment