Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am a complete newbie at this and my questions could sound very stupid but anyway:
I have to change the data in this pg_hba.conf file in order to be able to remotely edit my postgre/php system. Unfortunately I am not familiar to any extend with *nix OS or DOS commands. This is a complete darkness to me.
I somehow found that if I type:
...and press enter, it gives me several possible locations of the file I searched for.
What do you mean by "what is the meaning of..."? locate tells you the locations of filenames matching what you've entered. Here, it tells you that there are files located in /usr/local/pgsql/data and /usr/local/pgsql/data1 named pg_hba.conf. You can enter those directories using cd, e.g. "cd /usr/local/pgsql/data1".
You can use any text editor to edit the files, it's up to you. You just need to follow the executable with the filename, e.g. "vi pg_hba.conf", "emacs pg_hba.conf", etc. You may find nano/pico easy to use and also you may need to become root to edit the files (which you can do with su).
One way to edit the file (there several different ways)
gedit pg_hba.conf &
Or, to combine the two together do this:
gedit /usr/local/pgsql/data/pg_hba.conf &
gedit opens a window with the file in it, availble for editing
The first argument is the file name.
The & runs the command in the background, as opposed to running it exclusively. One should always use the ampersand when running anything that is going to open it's own window.
I am not sure of the specifics of PostgreSQL, but there is one other thing to be aware of:
Linux has files which are links, they are conceptually the same thing as a shortcut in windows. Be careful that some of the files found in your locate command could be links to 1 file - so you might only have to edit 1 file. When you look at the files user a file browser it should tell you whether it's link or not.
How to open Nautilus:
or open it from the main menu.
It's not a bad idea to fill in which distribution of Linux you are using, in your LQ profile. This info is rather helpful to those trying to help.
Nylex is faster at typing than me
anyway have a great time with Linux
Actually there is one more problem, obviously I have to restart the system for the changes to take effect, but I'm not sure how to do it remotely. I use Putty to connect to the server, and I do not know which server to restart, the Apache, the Postgre, or the Linux?
If you only change the postgres configuration postgres is obviously
all you'll need to restart. If it's a slack-box there may (or may
not) be a special startup-script that you can use to do that, depending
on who and how they installed postgres.
If you have root-access something like (paths adjusted, of course)
should work ...
su - postgres -c "/usr/local/pgsql/bin/pg_ctl stop -l /usr/local/pgsql/data/logfile -D /usr/local/pgsql/data