postgresql.guncellendi

This commit is contained in:
milisarge 2017-06-09 07:01:38 +03:00
parent eaa669d33c
commit 2032211022
2 changed files with 39 additions and 24 deletions

View File

@ -0,0 +1,24 @@
install -v -dm700 /srv/pgsql/data &&
install -v -dm755 /run/postgresql &&
groupadd -g 41 postgres &&
useradd -c "PostgreSQL Server" -g postgres -d /srv/pgsql/data \
-u 41 postgres &&
chown -Rv postgres:postgres /srv/pgsql /run/postgresql
su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'
su - postgres -c '/usr/bin/postgres -D /srv/pgsql/data > \
/srv/pgsql/data/logfile 2>&1 &'
su - postgres -c '/usr/bin/createdb test' &&
echo "create table t1 ( name varchar(20), state_province varchar(20) );" \
| (su - postgres -c '/usr/bin/psql test ') &&
echo "insert into t1 values ('Billy', 'NewYork');" \
| (su - postgres -c '/usr/bin/psql test ') &&
echo "insert into t1 values ('Evanidus', 'Quebec');" \
| (su - postgres -c '/usr/bin/psql test ') &&
echo "insert into t1 values ('Jesse', 'Ontario');" \
| (su - postgres -c '/usr/bin/psql test ') &&
echo "select * from t1;" | (su - postgres -c '/usr/bin/psql test')

View File

@ -1,34 +1,25 @@
# Description: Gelişmiş nesne-ilişkisel veritabanı yönetim sistemi (ORDBMS).
# URL: http://www.postgresql.org/docs
# Packagers: milisarge
# Depends on: python libxml2 libxslt openldap
# Depends on:
name=postgresql
version=9.5.0
version=9.6.3
release=1
source=(https://ftp.postgresql.org/pub/source/v$version/postgresql-$version.tar.bz2)
source=( http://ftp.postgresql.org/pub/source/v$version/$name-$version.tar.bz2)
build() {
cd $name-$version
sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h &&
./configure --prefix=/usr \
--enable-thread-safety \
--with-openssl
cd $name-$version
# Hazırlama
sed -i '/DEFAULT_PGSOCKET_DIR/s@/tmp@/run/postgresql@' src/include/pg_config_manual.h
# Yapılandırma
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-docdir=/usr/share/doc/$name-$version \
--enable-thread-safety
# inşa etme
make
# kurulum
make DESTDIR=$PKG install
make DESTDIR=$PKG install-docs
# servis kur
cd $SRC/$scripts-$scriptsversion
make DESTDIR=$PKG install-$name
make
make DESTDIR=$PKG install
cd doc/src/sgml
make DESTDIR=$PKG install-man
rm -rf $PKG/usr/share/doc
cd /sources/milis.git/ayarlar/servisler
make DESTDIR=$PKG kur-$name
}