I want to use redis in my nodejs application.I have installed npm package for redis. But while starting application i am getting error as
Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379
Install WSL on windows. Can do this through Microsoft store. Example below is using Ubuntu and assumes you have installed the distribution with an open terminal. Ubuntu can be started by normal ways of starting applications on Windows.
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get install redis-server
> redis-cli -v
This performs updates to ubuntu on your machine and installs redis.
The last command should output something like: redis-cli 6.2.5
If for some reason redis is not running, execute sudo service redis-server restart in ubuntu terminal
Related
i'm trying to install postgresql on my Linux Pc with sudo apt-get -y install postgresql
but the terminal give me that output (i'm sry but is italian):
so i've tryed to install that with sudo apt install mongodb-database-tools but the terminal give back the same error
Try this way for installation
To install PostgreSQL, first refresh your server’s local package index:
sudo apt update
Then, install the Postgres package along with a -contrib package that adds some additional utilities and functionality:
sudo apt install postgresql postgresql-contrib
To make sure it's installed enter this command in the terminal psql --version and it will should output something like this
psql (PostgreSQL) 14.1 (Ubuntu 14.1-2.pgdg20.04+1)
i tried using ddev with Linux Kubuntu and did as proceeded as described here:
https://t3terminal.com/typo3-tutorials/install-typo3-docker-ddev/
means:
// Install DDEV
curl -L https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash
// Install mkcert
sudo apt install libnss3-tools
mkcert -install
// Check DDEV works well?
ddev
$ ddev config
… Project name (temp-test): test
… Docroot Location (current directory):
Found a php codebase at ~/github/temp-test.
… Project Type [backdrop, drupal6, drupal7, drupal8, drupal9, laravel, magento, magento2, php, shopware6, typo3, wordpress] (php): laravel
… You may now run 'ddev start'.
~/github/temp-test$ ddev start
Could not connect to docker. Please ensure Docker is installed and running.
So i found this tip's here: Docker can't connect to docker daemon :
~/github/temp-test$ sudo service docker stop && sudo service docker start
Warning: Stopping docker.service, but it can still be activated by:
docker.socket
~/github/temp-test$ ddev start
Could not connect to docker. Please ensure Docker is installed and running.
~/github/temp-test$ sudo service docker start
~/github/temp-test$ ddev start
Could not connect to docker. Please ensure Docker is installed and running.
~/github/temp-test$ sudo service docker restart
~/github/temp-test$
it looks as if docker is installed (because it talks to me Warning: Stopping docker.service) but ddev does not find docker. what else can try?
Docker version
~ docker --version
Docker version 20.10.8, build 3967b7d
Operating System
Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
You need to install docker on Kubuntu to use it.
Details are in the [ddev docs].(https://ddev.readthedocs.io/en/stable/users/docker_installation/#linux-installation-docker-and-docker-compose)
But the bottom line is:
You're using the Ubuntu setup.
Use the instructions for Ubuntu 20.04 assuming you're using something 20.04+: sudo apt-get update && sudo apt-get install docker.io docker-compose
Make sure to do the post-install, which requires you to add your own user to the "docker" group. sudo usermod -aG docker $USER, details in the linked docker instructions
Well I am trying for hours to install and configure postgres in ubuntu but getting below error:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I have tried almost every solution I found but still no success.
Below are the commands I have used to install postgres:
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo -i -u postgres
psql (After this I got an error)
The error arises during the installation of postgres.Kindly give suggestions or resources through I which I can fix this!
I want to install postgresql in ubuntu but facing lot of issues,searched a lot but still no success,so when I try to install I used below commands:
sudo su -
apt-get install postgresql-9.5
update-rc.d postgresql enable
When the installation completes it gives me the error of
9.5 main 5432 down postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log
and after when I give following command
sudo -i -u postgres
psql
it gives me
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
How can I fix this?
In Postgres, you need to connect as a specific user called postgres.
Try doing this : sudo -i -u postgres and then use psql
I'm having trouble installing Redis, this whole week I looked for a solution. I'm needing to install NodeBB running on a CentOS 6 server (with WHM/Cpanel).
Follow the steps http://nodebb-francais.readthedocs.org/projects/nodebb/en/latest/installing/os/centos.html
When I run a test (https://www.digitalocean.com/community/tutorials/how-to-configure-a-redis-cluster-on-ubuntu-14-04) with the command redis-benchmark -q -n 1000 -c 10 -P 5, the system returned the error Writing to socket: Connection refused.
In attempts I installed multiple times Redis, don't know if this may have affected the functioning now. Does anyone have any idea what could be the problem? Apparently Redis does not run in fact, and it is difficult to find specific content on the subject.
You need to install the redis package. Your guide is for Ubuntu where it is available in the base repository, it isn't in CentOs. You have to install it via the epel repository.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm; yum -y --enablerepo=remi,remi-test install redis
chkconfig --add redis
service redis restart
You can also install it from source:
wget http://download.redis.io/releases/redis-2.8.3.tar.gz
tar xzvf redis-2.8.3.tar.gz
cd redis-2.8.3
make
make install
chkconfig --add redis
service redis restart