Forum OpenACS Q&A: Installing postgrsql - stuck

Collapse
Posted by Aash SH on
I'm absolutely beginner in linux. I tried to install postgresql 7.4.5 in Red Hat 9, and i followed step by step instruction in the documentation. I've managed to came until these line:

--------
[root src]# mkdir -p /usr/local/pgsql
[root src]# pw groupadd -n web
[root src]# pw useradd -n postgres -g web -d /usr/local/pgsql -s /bin/bash
[root src]# chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.5
[root src]# chmod -R 750 /usr/local/pgsql
--------

then the next steps should be these, in the documentation:

--------
Set up postgres's environment variables. They are necessary for the executable to find its supporting libraries. Put the following lines into the postgres user's environment.

[root src]# su - postgres
[postgres ~] emacs ~postgres/.bashrc

Paste this line into .bash_profile:

source $HOME/.bashrc

Paste these lines into .bashrc:

export PATH=/usr/local/bin/:$PATH:/usr/local/pgsql/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
--------

but after i've type in su - postgres,
these what i got:

-bash-2.05b$

and when i tried to type the next commands in the instruction, don't work. What should I do next?

Collapse
Posted by Aash SH on
I've manage to get through after add another user - postgres2 coz looks like postgres was already exist. But when I type

[root@localhost src]# su - postgres2

the this just appear; means I've logged to postgres2 account

[postgres2@localhost pqsql]$

.
.

but how could I continue with these line?

--------

[root src]# su - postgres
[postgres ~] emacs ~postgres/.bashrc

source $HOME/.bashrc

export PATH=/usr/local/bin/:$PATH:/usr/local/pgsql/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
--------

because when I typed:

[postgres2@localhost pqsql]$ emacs ~postgres/.bashrc

the error is:

-bash: emacs: command not found

should I just continue to the next step, ignoring the step to set up postgres's environment variables?

Collapse
Posted by Nick Carroll on
Aash, you don't need to create postgres2. When you did su - postgres from root, you were actually logging in as the postgres user. You can confirm this by executing the command "whoami" from the command line.

Emacs is a text editor. The error you are getting means that emacs is not installed, or it is not added to your PATH environment variable. You can add directories to your PATH with:

-bash-2.05b$ export PATH=$PATH:/bin:/usr/bin:/usr/local/bin

It is most likely that Emacs isn't installed though. You could try another text editor such as vi or kate.