Running CLI on influxdb#1 installed via Homebrew - macos

I have installed version 1.9 of influxdb from Homebrew on a mac. (I don’t want to use version 2.X as it would break the way another programme feeds data to influx.)
I seem to have got the db service running - but can’t start influx cli. I have tried various permutations of instructions - with various permutations of errors coming back.

install influxdb 1.x with brew install influxdb#1
then brew install influxdb-cli

Related

How to change Homebrew's prefix?

I'm using MACOS M1, and started to install brew under ARM. Then at the other day, I installed some formula under x86.
When I run a command
brew doctor
And I got this message
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/usr/local).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
unsupported configuration.
How to change the prefix to /usr/local/?
When I run which -a brew I got this result
/opt/homebrew/bin/brew
/usr/local/bin/brew
Thanks in advance.
I had the same issue because I did not installed the homebrew from the local path on my terminal.
I just uninstalled the homebrew, installed it again (from the local path this time) and it is fine now.
To uninstall Homebrew, run the uninstall script from the HomeBrew/install repository.

Ansible insatllation through brew and pip in mac

What is the difference between brew installation and pip installation in mac
Is there any supporting packages ?
Please give me some good ways to install ansible
brew install ansible
I prefer a installation via brew. I see the following pro's:
integration better geared towards mac (pip is more general purpose)
I try to install everything via brew (not pip for python, npm for javasscript...)
upgrade mechanism seems better to me (as far as I know upgrading every pip package is a bit hacky)
The ansible documentation recommends installation via pip :
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#control-node-requirements
I trust the product documentation more than the hearsay. Arguments like "I try to install everything via brew" do not apply here.
I recommend using pip as well, with a good python versions management and virtual environment.
I am using myself a combination of pyenv + venv (the latter is a module in recent versions of python in the standard library) and run Ansible on a control node in Mac OS in a python virtual env. It gives full control and definitely is not "hacky". The brew way is relying on system python on the other hand puts ansible in a Cellar site packages, ties it to a particular version of python with all its consequences and surprises.
To the OP - please read the ansible user guide and getting started documentation first before asking "please give me one sample".

fatal error: 'libcouchbase/cbft.h' file not found

fatal error: 'libcouchbase/cbft.h' file not found
Error while installing couchbase.
command used: sudo pip install couchbase.
installing libcouchbase is required.
(in my case, updating libcouchbase did the trick)
For Mac:
brew unlink libcouchbase
brew install libcouchbase
sudo pip install couchbase
libcouchbase/cbft.h is a C header file recently added to libcouchbase in order to support the Couchbase Full Text (cbft) Search developer preview in Couchbase Server 4.5. It appears in this instance that you have previously installed an older version of libcouchbase without full text support and you are trying to install a new version of the Couchbase Python client with full text support. The Couchbase Python client relies on libcouchbase to handle the full-text queries and needs the cbft.h header file to allow it to call into libcouchbase.
The answer in the case (as you identified yourself) is to update your version of libcouchbase. On OSX this can be done using brew, on supported Linux platforms you can add our package repositories & install using apt-get/yum, and on Windows you can download our prebuilt binaries - you can find details on how to do this in the documentation (http://developer.couchbase.com/documentation/server/current/sdk/c/start-using-sdk.html).

How to install Logstash for NodeJs on Windows 7

I want to install Logstash for NodeJs on windows 7, but I am not able to find proper steps for the same.
Can any one please help!
There is the option of node-logstash if you want a node.js alternative to Logstash. This isn't something I'm using myself (I'm using nxlog in Windows instead) but it looks like a decent alternative to the standard JRuby Logstash if you need to forward logs from Windows.
Instructions from the readme are below:
Installation
Install NodeJS, version >= 0.10, or io.js.
Install build tools
Debian based system: apt-get install build-essential
Centos system: yum install gcc gcc-c++ make
Install zmq dev libraries: This is required to build the node zeromq module.
Debian based system: apt-get install libzmq1. Under recent releases, this package is present in default repositories. On ubuntu lucid, use this ppa. On debian squeeze, use backports.
Centos 6: yum install zeromq zeromq-devel. Before, you have to add the rpm zeromq repo : curl http://download.opensuse.org/repositories/home:/fengshuo:/zeromq/CentOS_CentOS-6/home:fengshuo:zeromq.repo > /etc/yum.repos.d/zeromq.repo
Clone repository: git clone git://github.com/bpaquet/node-logstash.git && cd node-logstash
Install dependencies: npm install.
The executable is in bin/node-logstash-agent
You have scripts in dists folder to build packages. Actually, only debian is supported.
As per the comment, logstash has nothing to do with nodejs.
What you're looking to do is install Logstash on Windows, something that you can find out about by using google, there will be loads of guides out there describing how to do this.
You would then need to configure logstash to look in the right location for the log files it needs to process, and then set up filters to handle nodejs style logs (which as far as I understand aren't very well standardised). You then need to configure an output (logstash is essentially a unix pipe on steroids and needs somewhere to save the logs it has processed). Elasticsearch is the most common thing to save logs to.
Personally, in my environment, I would install logstash on a CentOS server, as it's a well established process, and ship the logs from your Windows 7 machine to the logstash server using either logstash forwarder or nxlog. That way you can have logs coming in from a number of different sources and you can still reboot your Windows machine every few days as required by Windows update without your logstash server going down.

Having Trouble Using "brew link" to switch between PostgreSQLs

I want to run a Rails app on Heroku so I installed PostgreSQL on my Snow Leopard machine using Homebrew. Currently, brew installs 9.1.2 into /usr/local/Cellar/postgresql. After some research, I discovered that the free, shared version of Heroku requires 8.3.x. While homebrew-alt doesn't have 8.3, it does have 8.4 so I downloaded it instead and it installed into /usr/local/Cellar/postgresql8. I then confirmed that I am able to create and run databases on each version. Thinking that I could use "brew [link | unlink] to switch back and forth, I ran "brew unlink postgresql8" and then "brew link postgresql". However, running the latter command results in this error:
Linking /usr/local/Cellar/postgresql/9.1.2...
Error: Cannot link postgresql
Another version is already linked: /usr/local/Cellar/postgresql/9.1.2
Is there any way to do this (switch back and forth) or am I misunderstanding how brew link/unlink is supposed to be used?
By the way, "brew list" shows "postgresql" and "postgresql8" so I don't think it's the case that I should say "brew link postgresql9".
Thanks.
Use brew switch, which is an extension shipped with Homebrew. In your case, you could use 8.4 by running
$ brew switch postgresql 8.4
Thanks, mipadi! That did the trick. There was only one additional thing that I needed to do. The 'brew switch' command assumes all versions of postgresql are installed in /usr/local/Cellar/postgresql. That was not the case with version 8.4.8 as it was installed in /usr/local/Cellar/postgresql8. Consequently I had to create a symbolic link to point to this older version:
cd /usr/local/Cellar/postgresql
ln -s ../postgresql8/8.4.8 8.4.8
Naturally, it also makes sense to keep your database clusters in separate directories:
/usr/local/var/postgres/8.4.8
/usr/local/var/postgres/9.1.2

Resources