Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-10-2001, 03:40 PM   #1
LQ Newbie
Registered: Jun 2001
Posts: 7

Rep: Reputation: 0
Angry Apache and Tomcat

I wanted to build a jsp page that uses a jdbc database. So i thought i'd use tomcat and postgresql. I want a local db for testing.
However here's my problem:
- i can't run postgresql as root (security issues)
- i can't run apache as user (httpd not found)
I have to run both at the same time!
How do i adjust this?
Old 07-10-2001, 04:08 PM   #2
LQ Newbie
Registered: Jul 2001
Posts: 16

Rep: Reputation: 0
I am new toi linux too, and I just went through some of this. Drove me nuts.

For postgres yo uneed to create a new user pretty much expressly for the use of starting postgres.

adduser postgres
passwd postgres

That will get you your user. The default data directory for postgres if you installed to /usr/local/pgsql will be /usr/local/pgsql/data so we need to setup the new postgres user for that

chown /usr/local/pgsql/data postgres

Finally go into the bin dir and start postgres

su postgres
(enter password for user postgres)
cd /usr/local/pgsql/bin
./postmaster -D /usr/local/pgsql/data &

That will take care of that.

As for Apache, find the httpd file

find / -name httpd

It is probably located in /usr/local/apache. If it is

cd /usr/local/apache/bin
./apachectl start

would be best to get it up and running.

Any mistakes, I apologize in advance. I am new, trying to help, and going off of memory, heh.

Old 07-11-2001, 08:24 AM   #3
LQ Newbie
Registered: Jun 2001
Posts: 14

Rep: Reputation: 0
solution for starting Postgres


I don't know about apache but i do have an idea as to how to start postgres.

As root type ntsysv & scroll down & enable postgres (could see some options).Once it is enabled it starts automatically everytime you start the machine.

Now type su - postgres
It doesn't ask for a password as you are root. Then say createuser followed by the username. There you can give rights whether that user can be allowed to use create databases. That's It. and now that particular user can access postgres.

Last edited by arraman; 07-11-2001 at 09:01 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat 5.5.1 and Apache 2 kpmaddenuk Linux - Software 2 10-30-2004 05:55 AM
Tomcat 5 with Apache twantrd Linux - Software 3 10-18-2004 10:53 PM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM
Apache with Tomcat 4.0.3 chuck77 Linux - General 7 09-22-2002 03:57 PM
Apache,Tomcat prowzen Linux - Software 0 05-09-2001 06:23 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration