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? |
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. HTH! |
solution for starting Postgres
Hi,
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. |
All times are GMT -5. The time now is 09:21 AM. |