linux - Install postgres without apt-get
2014-07
I have access to a machine on a scientific hpc, and I'm setting up an environemnt to create a web application, made up basically of TOMCAT and postgresql. I cannot use another web server.
The OS is linux with Debian (squeeze) and I don't have root access to the machine.
After googling a bit around, I only found method which required root access to the machine for installing postgresql (apt-get ....).
Is it possible to install postgresql in a local directory where I have full permissions? Or Does postgresql necessarily requires root access to be installed? Why?
Yes, PostgreSQL can be installed without being root, although the installation has to be done manually, as you cannot use the package manager of your distribution.
Two ways:
- compile from source; or
- Download EnterpriseDB's pre-compiled platform-independent-ish binaries then
initdb
yourself and start the server withpg_ctl
.
Is it possible to have a user in Ubuntu/Debian that does not have access to synaptic
, apt-get
, dpkg
and cannot even download anything from the Web, but has root privileges otherwise?
Original post (above translated by aimar):
Bonsoir je voulais savoir s'il est possible d'avoir un user avec tous les droits de root et qui ne peux rien télécharger. En fait je cherche à désactiver synaptic, apt-get, dpkg Merci
Downloading from the web can be blocked using the firewall settings of Linux (iptables).
As for root - if you want to only provide access to specific commands as root then you would be best off using sudo
to grant specific users access to specific commands.
I'd say your best bet is to remove the binaries that you don't want your root user to use (wget, apt-get, etc).
However this can break some system fuctionnalities because some applications assume you have a functionnal wget, dpkg, etc. And, well, as long as it's root, and even with no internet connection, he can insert a cd and recopy the binaries...