Tag Info

Hot answers tagged

11

Check out Why does the 'bin' user need a login shell? It says this pattern for system users is Common in Debian, and not so much in other distributions. Considered a bug / genuine security issue by several people. Required in order to run cron jobs as that user, and perhaps also by some scripts if they use su -c to run as this user. It should be ...


9

The short version You can safely install the PostgreSQL package from the backports. You'll probably get a stable piece of software that will not nuke your system. The longer version Debian comes in three flavours: stable, testing and unstable. See Debian Releases. You are apparently running Debian stable, which is the preferred release for a production ...


5

The same way you'd time any other shell command: use the time command. $ time pg_restore ... real 1m0.000s user 1m0.000s sys 0m0.000s Here, real is the elapsed wall clock time, which is probably the only meaningful value, since most of the work is being done in a separate process (the PostgreSQL server).


3

I installed Postgresql with the apt-get command. Do I have to create a postgres-user and change ownership of the installed postgresql files? No, you don't need to create postgre-user, postgresql package will automatically create the users that require. You can check using : getent passwd postgres or just grep in /etc/passwd file I see that the ...


3

When I use the useradd command I don't specify a password. [...] Does this mean that the user is disabled until it is done? Yes, if you don't specify a password hash using useradd's option -p, password-based login to the newly created account will be locked until you set a password using passwd. I installed Postgresql with the apt-get command. Do I ...


3

In my case I had two sets of databases some running on the old version of Postgresql 8.4 and other running on version 9.1. What I did was to locate pg_dump in Linux machine using the locate command below $locate pg_dump result /usr/bin/pg_dump /usr/bin/pg_dumpall /usr/lib/postgresql/8.4/bin/pg_dump /usr/lib/postgresql/8.4/bin/pg_dumpall ...


3

apt-get will upgrade to the packages available in the repository from the source that apt is configured to use. The postgresql-9.1 package is version 9.1.4 in the squeeze-backports repository. Add the following to /etc/apt/sources.list.d/backports.sources.list deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free Then ...


3

It would appear that you have your your syntax a bit backwards. rc.d usage: rc.d action daemon ... e.g: rc.d list rc.d help rc.d start sshd gpm So you would want to do rc.d start postgresql The rc.d script is simply for convenience. It makes starting multiple ...


3

The protocol is plain TCP/IP. From posgresql documentation about "frontends" and "backends" protocol: PostgreSQL uses a message-based protocol for communication between frontends and backends (clients and servers). The protocol is supported over TCP/IP and also over Unix-domain sockets. Port number 5432 has been registered with IANA as the customary TCP ...


2

If the database servers are running, ask them: psql -l mysql <<< 'show databases' Just searching the filesystem for relational databases is not a trivial task.


2

Edit your PATH so that /usr/pgsql-9.1/bin/ (the newer one) comes before /usr/bin/. A less package-manager-safe safe alternative is to move/remove/rename the psql in /usr/bin/ and create a symlink in /usr/bin/ to the new one (not tested): > cd /usr/bin # move the old one however you like > ln -s /usr/pgsql-9.1/bin/psql .


2

Couple of options. Download .deb 9.1 from the Postgres site Take a look at this page titled: Linux downloads (Debian) - PostgreSQL. You can either download an updated .deb from the site directly, or re-point to their repository, and do a command like this: apt-get install postgresql-9.1 Debian backports You may be able to find specific versions here, ...


2

Add this to your sources.list: deb http://ftp.de.debian.org/debian/ wheezy main non-free contrib deb-src http://ftp.de.debian.org/debian/ wheezy main non-free contrib Make sure you use the appropriate mirror for your location. Run aptitude update or apt-get update and finish the installation. The interactive mode of aptitude is quite useful to solve ...


2

Like the comments in this answer suggest, just edit the file /etc/shadow as root (e.g. run sudo nano /etc/shadow in a terminal) and replace the hashed password in postgres's line with *. (If you don't have that line or that file, it'd be interesting to know which Linux distribution and nsswitch settings you use.)


2

You might want to try the directions described in this post titled: Install latest PostgreSQL on Linux Mint. General steps: create /etc/apt/sources.list.d/pgdg.list containing: deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main Import the repository signing key, and update the package lists $ wget --quiet -O - ...


2

Checklist: Have you reloaded/restarted the server after configuration changes? Is the firewall configured to pass TCP port 5432 from the client? Is PostgreSQL actually running on that port? Use netstat -tnlp | grep :5432 to find out. (run as root to get the program name) Is no other rule in pg_hba.conf blocking access? Are there any errors in your error ...


2

The best method to incremental backup Postgres is to use periodic hot physical backups and continuous WAL archiving. http://www.postgresql.org/docs/9.1/static/continuous-archiving.html The periodic physical backup can be done with rsync using the --copy-dest= option to take advantage of any previous copy reusing unchanged files. This is a very effective ...


1

export puts the variable in the program environment, which is propagated to forked processes. If you want any processes you launch to know about the new location, you need to export it (although if it is already exported, you don't need to use export again, but it does no harm to do so). If you want to be totally sure, export it. If it is already in your ...


1

I think what you're looking for is this product, it's open source and it's called dbmail. Based on it's description it sounds like exactly what you want: DBMail is an open-source project that enables storage of mail messages in a relational database. Currently MySQL, PostgreSQL, Oracle, and SQLite can be used as storage backends.


1

It won't. You have 3 options if you want yum to deal with your new software. Option #1 - use deadly force Download the .rpm files that you're attempting to install and tell rpm to install them for you. You can do this using 1 or a combination of these 2 switches to get what you want. --nodeps do not verify package dependencies ...


1

It is Debian distribution policy that configuration files, binaries, and data are stored at these three different locations. There are various reasons for this, including: consistency between packages easier to tell which directories to back up, to audit, to tune, etc. could mount /usr read-only The reason the binaries are split over two directories has ...


1

This splitting is pretty typical for most services. I'm on Fedora but most distributions do the same in terms of organizing files based on their type, into designated areas. Taking a look at the Postgres SQL server: The configuration files go into /etc/ Executables go into /usr/bin Libraries go into /usr/lib64/pgsql/ Locale information goes into ...


1

stefan@laptop ~ $ su - Password: laptop ~ # useradd example laptop ~ # su example example@laptop /root $ exit laptop ~ # logout stefan@laptop ~ $ su example Password: The user can only be logged in as root without a password. To log in as the postgre user try to su as root (if you have root). So try a: sudo su postgres and that should work.


1

I had to edit my pg_hba.conf file: # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host ...


1

The following assumes that the unix user running psql has a postgresql account which is capable of accessing 'nm.table1'. If not, you will also need to provide authentication details to psql. The best way to do that is to have a ~/.pgpass file containing the authentication details. Anyway, once authentication is sorted out, getting data from psql queries ...


1

This turned out to be an selinux issue. I disabled it and was well. Full config below. For those of you that arent up on selinux (like me until today) the config can be found in: /etc/selinux/config It can also be turned off temporarily like this: echo 0 > /selinux/enforce Full config [root@integration selinux]# cat config # This file controls ...


1

I would try the following since it seems like you're attempting to start the PostgreSQL service with vagrant's credentials even though you're doing a sudo. This will just confirm that you can in fact start PostgreSQL. $ sudo su - $ service postgresql start If you can start the service using the above commands then something is up with your vagrant ...


1

Another option, that may be suitable for you, is to uninstall the old parallel version: on debian/ubuntu: sudo apt-get remove postgresql-8.4 sudo apt-get remove postgresql-client-8.4 That preserves the later version (e.g 9.1) removing only the older 8.4 client and server libs.


1

Alternatively, to avoid symlinks, and to avoid changing your $PATH, you could add your command to the hash table: hash -p /usr/pgsql-9.1/bin/psql psql This will put your command into the command hash table and it will be executed before any other command (in fact, no path search will be performed). If you used a command called psql before, then it ...


1

Your reason for Debian is a good one. But in the future your should stay on that choice. Another idea might be using RedHat, CentOS or Scientific Linux. I found a quite stable looking repository for EL5.



Only top voted, non community-wiki answers of a minimum length are eligible