![]() Glad it was so obvious that the directory permissions needed to be set to myuser and not root. UPDATE Running the command sudo chown myuser /usr/local/var/postgres/, and then running initdb afterward allowed the database to be initialized. Oh, really? Then why were you giving me permission errors?! So now I think the problem is that I just have to chown the folder, but still run initdb as my user rather than root. I finally type in sudo initdb /usr/local/var/postgres, to be met with: initdb: cannot be run as root. So then the alias command shows my new alias. profile, and seemed to be loaded just fine, so why wasn't the alias also working? Moving the alias into. That being said, my PATH additions were done in. UPDATE From this site, I read about the precedence of dotfiles. Running alias only shows an RVM alias, but not the sudo alias I tried to set up. profile now has this at the end: export PATH="/usr/lib/postgresql/9.1/bin:$PATH" bashrc file isn't read in a login shell, only profile. Based on reading I did here, it seems that the. UPDATE: Since I'm using Ubuntu and RVM, RVM recommended that I set up the terminal to "Run command as login shell". so something is wrong with those getting set up. When I run alias, I only show a single one. Still doesn't effin' work! It looks like the alias isn't working. So I added alias sudo='sudo env PATH=$PATH' to my. I just get: -bash: initdb: command not found. However, running the command with sudo -i does not fix the problem. UPDATE: I believe it's related to this question. I'm a bit of a newbie in Linux, but these are the sorts of super-irritating problems I keep running into! How is this command not found? I just ran the damn thing! echo sudo $PATH shows the PostgreSQL directory in the path. Result is sudo: initdb: command not found. I try running sudo initdb /usr/local/var/postgres. UFW comes preinstalled with all Ubuntu installations after version 8.04 LTS. ![]() For RHEL-based distributions such as Fedora, Rocky, AlmaLinux, and CentOS run the following yum command. At the same time, you can use UFW to configure most of the rules possible with iptables. The command installs PIP alongside a bunch of other additional packages and dependencies. Step 3: I try running initdb /usr/local/var/postgres. With its small command set and plain English parameters, UFW makes it quick and easy to understand and set up firewall rules. (Sidenote: Anybody know why this is necessary? Am I doing something wrong with the install? Everything else I've installed in Ubuntu "just works" without changing the $PATH.) For whatever reason, the install doesn't appear to add it to the path? So I had to manually add the line export PATH=$PATH:/usr/lib/postgresql/9.1/bin to the bottom of my ~/.profile. You need to relogin or reboot device completely for changes to take effect. Run: visudo to modify sudoers file and add following line into it (if it is missing): Allow members of group sudo to execute any command sudo ALL (ALL:ALL) ALL. Step 1: I installed PostgreSQL using sudo apt-get install postgresql-9.1 as recommended on the PostgreSQL website Make sure your sudoers file have sudo group added.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |