Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: gmoney on February 18, 2006, 08:34:57 PM
-
Hi, I just worked through getting PostGres working on 7.0pre3. I am sharing the process I went through for people who want to do the same, and also to get some comments in case I did anything incorrectly or unnecessarily.
This is based on the script by cydonia and a few other threads in this forum.
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-docs-7.4.8-1.RHEL4.1.i386.rpm
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-7.4.8-1.RHEL4.1.i386.rpm
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-server-7.4.8-1.RHEL4.1.i386.rpm
wget ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/4.2/updates/i386/RPMS/php-pgsql-4.3.9-3.9.i386.rpm
rpm -i postgresql-7.4.8-1.RHEL4.1.i386.rpm
rpm -i postgresql-server-7.4.8-1.RHEL4.1.i386.rpm
rpm -i postgresql-docs-7.4.8-1.RHEL4.1.i386.rpm
rpm -i php-pgsql-4.3.9-3.9.i386.rpm
mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data/postgresql.conf
touch /etc/e-smith/templates-custom/var/lib/pgsql/data/postgresql.conf/20Socket
echo 'tcpip_socket='true'' > /etc/e-smith/templates-custom/var/lib/pgsql/data/postgresql.conf/20Socket
mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf
touch /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf/50AllowHost
echo 'local all all trust' > /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf/50AllowHost
echo 'host all all '127.0.0.1' '255.255.255.255' trust' > /etc/e-smith/templates-custom/var/lib/pgsql/data/pg_hba.conf/50AllowHost
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
touch /etc/e-smith/templates-custom/etc/php.ini/70DynamicExtension90pgsql
echo 'extensions=pgsql.so' > /etc/e-smith/templates-custom/etc/php.ini/70DynamicExtension90pgsql
/etc/init.d/postgresql start
/etc/init.d/postgresql stop
/sbin/e-smith/expand-template /etc/php.ini
/sbin/e-smith/expand-template /var/lib/pgsql/data/postgresql.conf
/sbin/e-smith/expand-template /var/lib/pgsql/data/pg_hba.conf
/etc/init.d/postgresql start
/etc/rc7.d/S86httpd-e-smith sigusr1
/etc/rc7.d/S86httpd-admin sigusr1
/sbin/e-smith/config set postgresql service status enabled
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S64postgresql
signal-event post-upgrade
signal-event reboot
-
Thanks for sharing.
You could replace this:
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-docs-7.4.8-1.RHEL4.1.i386.rpm
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-7.4.8-1.RHEL4.1.i386.rpm
wget http://mirrors.kernel.org/centos/4.2/os/i386/CentOS/RPMS/postgresql-server-7.4.8-1.RHEL4.1.i386.rpm
wget ftp://ftp.nluug.nl/pub/os/Linux/distr/CentOS/4.2/updates/i386/RPMS/php-pgsql-4.3.9-3.9.i386.rpm
rpm -i postgresql-7.4.8-1.RHEL4.1.i386.rpm
rpm -i postgresql-server-7.4.8-1.RHEL4.1.i386.rpm
rpm -i postgresql-docs-7.4.8-1.RHEL4.1.i386.rpm
rpm -i php-pgsql-4.3.9-3.9.i386.rpm
with:
yum --enablerepo=base --enablerepo=updates install postgresql postgresql-server postgresql-docs php-pgsql
That is the safest/best way to install any rpms from CentOS, and will work in your howto even if the version changes.
-
Hi !
I did all ...
Can't even createuser !
did you add the postgres user after the install of the rpm's and before doing the rest of this process to install postgresql ?
Thanks for answer
-
Charlie Brady made a smeserver-postgresql rpm. It is likely still in development, I haven't noticed any discussion about it - http://mirror.contribs.org/smeserver/releases/7/builds/rpms/RPMS/noarch/smeserver-postgresql-0.0.1-20.noarch.rpm
(With this rpm you won't need to make all the symlinks and template stuff yourself)
You can try it if it is a test server and if you have any suggestions or patches for that rpm then discuss them on the devinfo mailing list.
-
You can try it if it is a test server and if you have any suggestions or patches for that rpm then discuss them on the devinfo mailing list.
Or maybe to the bug tracker under this bug...
http://bugs.contribs.org/show_bug.cgi?id=1667
-
> Or maybe to the bug tracker under this bug...
Yup - even better. I added a note on the bug report that there is a later version.
-
Excuse me but I'm very new with sme. I use it for two years but never used yum to install soft.
Could you write the line I need to type in place of :
yum --enablerepo=base --enablerepo=updates install postgresql postgresql-server postgresql-docs php-pgsql
??
Thanks for anwer !!!!
(we always forget to thanks ...)
-
Open a terminal to your server and log in as root and issue this command
yum --enablerepo=base --enablerepo=updates install postgresql postgresql-server postgresql-docs php-pgsql
which is the code you have been shown. which gregswallow indicated
To get a understanding of yum in the terminal issue this command man yum
Here are a couple of commands to help
yum check-update
checks what updates are available
yum -y upgrade
updates your server dont forget to follow the instruction after the update completes
-
Would it be possible to install postgres8 from the RH el4 rpm's from the postgresql site on SME7 and use the described howto at the top of this topic?!
postgres7 is missing some really important features (vacuuming) i have been told by the developers of Ledger-smb that i'm trying to install.
regards,
jester.
-
If I well understand you, Stiperstones, I 'only' have to use
yum --enablerepo=base --enablerepo=updates install postgresql postgresql-server postgresql-docs php-pgsql
and nothing else which was written at the beginning of this topic ?
Thanks for answers !
tetrao
Jester : vacuum was already in the 7.x versions ...
-
@Tetrao: Hmm.... there must be a difference between vacuum and autovacuum then: http://sourceforge.net/forum/forum.php?thread_id=1597692&forum_id=606441
regards,
jester.
-
Jester,
Did you already installed postgres 7.x on a sme ?
Does it support perl / tcl (compiled with options -perl -tcl ) ?
Tetrao
-
I followed this howto: http://no.longer.valid/phpwiki/index.php/How%20to%20install%20SQL-Ledger%20on%20SME%207.0
Sql-ledger is based on Perl so that works, don't know about the tcl option.
regards,
jester.