I am attempting to install 'pgadmin4' on a Fedora 34 VM (AWS AMI EC2), but it is not installing 'psql'
I ran these commands:
sudo rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-fedora-repo-2-1.noarch.rpm
sudo yum install pgadmin4-desktop
and psql is no where to be found
I ran: sudo find / -type f -name psql, and nothing was found.
How do I get psql installed on Fedora 34?
I do not want to install the server / database. I just need 'psql' on the system. I do not need or want the web components.
I have lost about three hours with this, extremely frustrated.
I have searched and searched, tried a number of things.
It will be a miracle if I can get this working, if anyone has any ideas or has actually installed pgadmin4-desktop successfully or found a way to get psql onto a system (without installing the database software).
I just need the psql client.
Thank You,
Try
sudo yum install postgresql
pgadmin4-desktop sounds like GUI to me. If you need server it's in postgresql-server
Related
I want to install mysql 5.7 on my Mac OS 10.13.5. However, brew install mysql installs version 8.0 which is not suited for my project. Forgive me if this question was asked before but I could not find a solution.
Now it's bit differently
brew install mysql#5.7
$ brew install mysql55
This installs a specific version 5.5 which exists along with 8.0
Also mysql entry should be added to .bash_profile to make sure it load and then server start should be done.
$ brew services start mysql#5.5
Below command gives the sequence of how the files are loaded in sequence.
$ mysql --verbose --help | grep my.cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
While installing first mysql server instance works perfectly, installing a different version of mysql instance should be configured properly and the paths of installation, log files and other components have different path.
Installation paths be found here, for eg.
mysql -> ../Cellar/mysql/8.0.11/bin/mysql
I installed rvm on debian 7 using the command:
\curl -L https://get.rvm.io | bash -s stable --rails
from this article:
https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-an-debian-7-0-wheezy-vps-using-rvm
I get this output:
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/x86_64/ruby-2.1.0.tar.bz2
Checking requirements for debian.
Installing requirements for debian.
Updating system...
Installing required packages: gawk, g++, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev
It hangs here forever. I tried waiting about 30 min. I also tried hitting ctrl-c and running some rvm commands. rvm list known works fine, but rvm install gets me back to the same "installing requirements" and it hangs as well.
Any ideas? Googleing only seemed to bring up issues involving OSX (I'm using debian in a vbox in windows 8).
Would installing each required package indiviually via apt-get be the best move?
I faced the same issue. To resolve, just mount the installation CD that you used to install Debian and it will work.
I encountered the same issue with Debian 8. As it turns out, the installation was looking for the required packages on the Debian install CD-ROM, which wasn't inserted. To fix this, run the following command:
nano /etc/apt/sources.list
Then, comment out the line beginning with "cdrom" so that it looks like the following:
# cdrom:[Debian GNU/Linux...
You should be able to run sudo apt-get update then try installing rvm again. However, I restarted my laptop before doing so. Therefore, I can't give 100% confirmation that it works without restarting.
As i've written in comment, try installing requirements by hand, sometimes something wilk silently fail and cause such issues. As OP found, the gawk package was causing the issue.
Just remove the cdrom entry from the sources.list file. This can be done easily:
sudo sed -i '/cdrom/d' /etc/apt/sources.list
This should take care of the problem. The message is because somehow you still have the cdrom entry in your sources.list file, you can check the content of the file using:
I have spent countless number of hours trying to setup PostgreSql on my Intel Mac.
I am able to install Rails and all but PostgreSql would not get installed on my Mac.
Anybody has any solution or any tutorial which I can follow to install it ??
P.S. I just started using Mac as my development machine. I have been using Windows before that !
Ok I had to do a little more research with a fresh mind and I am now able to solve the problem myself. Here is the solution :
Install Homebrew using this command :
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Once installed write this in your terminal :
brew install postgres
If this is your first install ( which was the case with me ) than type this in terminal after the above step:
$ initdb /usr/local/var/postgres
To start the postgresql type this in terminal:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
After the above step type this :
ps auxwww | grep postgres
If the result of the above command in terminal looks like this than that means the postgresql is installed correctly :
26000 0.0 0.1 2445860 1556 ?? Ss 1:59AM 0:00.05 postgres: autovacuum launcher process
25999 0.0 0.0 2445728 512 ?? Ss 1:59AM 0:00.15 postgres: wal writer process
25998 0.0 0.0 2445728 912 ?? Ss 1:59AM 0:00.21 postgres: writer process
25996 0.0 0.1 2445728 2508 ?? S 1:59AM 0:00.15 /usr/local/Cellar/postgresql/9.0.4/bin/postgres -D /usr/local/var/postgres
26257 0.0 0.0 2435548 0 s000 R+ 2:19AM 0:00.00 grep postgres
Create a user and database:
createuser username
createdb -Ousername -Eutf8 databasename
To login to postgresql use this command:
psql -U username databasename
If you are using it with rails you can install the gem like this :
sudo env ARCHFLAGS="-arch x86_64" gem install --no-ri --no-rdoc pg
If you would like to stop the PostgreSQL service use this command :
pg_ctl -D /usr/local/var/postgres stop -s -m fast
Hope this will help others in saving the time of going through different resources to come with the solution like I did :)
Try using Cinderella. That will give you the whole stack (including MongoDB, Redis, and a whole bunch of other stuff) in one nice neat bundle in ~/Developer. You're better off using custom builds of all your development tools so that you don't have to worry about what version of anything comes with the system and what an upgrade might to do your OS.
References:
Cinderella on Github
Cinderella Homepage
A few other notes to add to your instructions:
There is a good post at Russ Brooks Blog on installation which validates much of what you have above.
There are a set of admin tools available at pgadmin.org which will allow you to browse your database through a simple GUI on the Mac
If you use the admin tools you should install the instrumentation pack with the following:
psql -d postgres < /usr/local/Cellar/postgresql/9.0.4/share/postgresql/contrib/adminpack.sql
where the exact command obviously depends on the version of postgresql you are using.
If you are using postgres with rails and bundler then make sure the "pg" gem is in your gem file and run bundler with the following command immediately after you add it:
env ARCHFLAGS="-arch x86_64" bundle install
This will do the same as your 'gem install' command above. After you run it for the first time you no longer need to use the 'env ARCHFLAGS="-arch x86_64"' when you run bundler.
I had luck downloading and installing it straight from the site:
http://www.postgresql.org/download/macosx
I have used MacPorts for most of my server/low level program installations (PostgreSQL, MySQL, etc.). If you choose to go that route, you can then follow this blog post/tutorial on installing PostgreSQL via MacPorts onto your Mac. One thing to note on the PostgreSQL link: when following along, change the instances of 83 to 90. For example, you will see this in his steps:
sudo port install postgresql83 postgresql83-server
You can instead, type this to get the newest version of PostgreSQL
sudo port install postgresql90 postgresql90-server
I would also recommend grabbing a program such as Navicat for PostgreSQL Lite. It's free and nice to have to manage your local PostgreSQL DBs.
If you don't want to go with MacPorts, there's a similar alternative called HomeBrew that's quite popular ... I'm just too lazy to switch from MacPorts :).
Wondering if anyone could help me? I've recently switched over to Mac and trying to set up my Rails environment. I want to set up Postgresql as my database since I used it with my Windows development. The trouble is, there are a number of different ways to set it up and I just wanted to know which would be the best and error free.
I have homebrew installed too, I see it is available to download through there but has anyone had any experience through this route?
Cheers
Postgres.app is the easiest way to run PostgreSQL on the Mac
Almost same answer but using homebrew:
brew install postgresql
Get mac ports from http://www.macports.org/
sudo port install postgresql84; sudo port install postgresql84-server
You may need to tweak pg_hba.conf to allow connections from ::1 (IPv6 localhost).
Alternately, from source:
ARCH=x86_64 CFLAGS="-arch x86_64" LDFLAGS="-arch x86_64"
./configure --prefix=/usr/local/pgsql --with-libxml --with-libxslt --with-openssl
make
sudo make install
sudo su postgres -c '/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data/'
sudo su postgres -c '/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data/ -l /var/log/pgsql/postgresql.log start'
sudo chown -R postgres /usr/local/pgsql/
You could use cinderella to get the whole PostgreSQL, MongoDB, Ruby, ... stack in one go. The initial install takes awhile but it puts everything in ~/Developer so it is easy to keep track of and easy to clean up.
Just get the PostgreSQL OSX installer, provided by EnterpriseDB.
You might consider http://postgresapp.com/.
It claims to be "the easiest way to run PostgreSQL on the Mac" and so far it has been true for me.
I'm developing on Ubuntu, I have installed the mongoid gem, and when I run the rails server, I get this error
/home/username/.rvm/gems/ruby-1.9.2-p180/gems/mongo-1.3.1/lib/mongo/connection.rb:518:in `connect': Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)
I remembered using a command like brew install but I am pretty clueless. Am I missing something? Thanks in advance!
You need to have MongoDB installed, too. Since you're on Ubuntu, try this:
sudo apt-get install mongodb
If you saw any brew commands in any instructions you were reading, those were likely for Homebrew on Mac OS X, not for Ubuntu.
other possibility
you didnt start the server(which should auto-start usually)
mongod also has this weirdness
try to run sudo mongod in a foreground process
and the messages should tell you how to recover