Trouble installing and running elasticsearch - elasticsearch

Yes, I have thoroughly searched for another answer to this question but have yet to find one.
I tried installing first by following the instructions on this page: http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
I am not sure what to do after this step. It seems that is has installed correctly, but I don't know how to run it. (I am using PuTTY.) Can I import it into my module now and being using it, or is there something else I should do?
Here are some attempts I've made:
deloacha#azdev-deloacha:~$ bin/elasticsearch.bat
-bash: bin/elasticsearch.bat: No such file or directory
deloacha#azdev-deloacha:~$ cd elasticsearch-1.5.1/bin
-bash: cd: elasticsearch-1.5.1/bin: No such file or directory
deloacha#azdev-deloacha:~$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory
deloacha#azdev-deloacha:~$ cd ..
deloacha#azdev-deloacha:/home$ cd elasticsearch-1.5.1
-bash: cd: elasticsearch-1.5.1: No such file or directory

Installing the way as provided in the document can sometimes leads to confusion. You need to find the directory containing the elasticsearch files. most probably it'll be at "/etc/elast...."
Another easy way of installation follow the steps:
make a directory where you want to install
go to that directory and download elasticsearch there using
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.5.1.tar.gz or curl
extract files: tar -zxvf elasticsearch-1.5.1.tar.gz
cd elasticsearch-1.5.1
You need to have java 7 on your system. you can start elasticsearch using "bin/elasticsearch -d" . "-d" is to run in detached mode.
Logs are by default in the location elasticsearch-1.5.1/logs. Check logs for any error during start up.
check status at: http://localhost:9200 or http://{system ip}:9200

Related

Command not found when trying to set up substrate

This is the first time I use the terminal on my mac OS. I have followed the instructions so far and restarted Terminal. I tried again making sure I followed every step. That is the reason it says it's already there. The next item I copied and pasted says command not found. Should I delete and start over?
-bash: rustup: command not found
Elizabeths-MacBook-Pro:~ el1748eth$ git clone -b v2.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
fatal: destination path 'substrate-node-template' already exists and is not an empty directory.
Elizabeths-MacBook-Pro:~ el1748eth$ cd substrate-node-template/
Elizabeths-MacBook-Pro:substrate-node-template el1748eth$ cargo build
-bash: cargo: command not found
Elizabeths-MacBook-Pro:substrate-node-template el1748eth$

How do I add a file to a directory in terminal?

I am trying to add files to a directory that I created, and I attempted to use
cvs add filename
but that did not work, as I got the error message:
-bash: cvs: command not found
How do I fix this and be able to add files to a directory?
It's either cvs has not been installed or not found in the environment path variable e.g. $PATH. If you're sure that you have installed cvs successfully, try to execute the cvs command by using its absolute path.

cp: cannot stat ‘build/docker/gotools/bin/protoc-gen-go’: No such file or directory

I try to build hyperledger fabric, and have installed the project as the guide in http://hyperledger-fabric.readthedocs.io/en/latest/Setup/Chaincode-setup/#option-1-vagrant-development-environment.
When I try to 'make peer', command is shown as:
vagrant#ubuntu-1404:/opt/gopath/src/github.com/hyperledger/fabric/devenv$
cp: cannot stat 'build/docker/gotools/bin/protoc-gen-go': No such file
or directory
I looked into the folder and didn't find the file protoc-gen-go. Does it indicate that I missed few steps when I was setting up the envrionment?
Step 1: Run
$go get -u github.com/golang/protobuf/protoc-gen-go
Download protoc-gen-go
Step 2: cp
$ cp $GOPATH/bin/protoc-gen-go build/docker/gotools/bin/
Then continue your make.
You can find the file protoc-gen-go in path: $GOPATH/bin, then copy this file to $GOPATH/src/github.com/hyperledger/fabric/build/docker/gotools/bin/.
If all things has done, you can run: make peer and it will work.
I had a same problem. Maybe your GOPATH and GOROOT variables are conflicted with your customized paths.
I solved the problem like this:
Delete /usr/lib/go
Delete /usr/local/go
Download protoc-gen-go ($go get -u github.com/golang/protobuf/protoc-gen-go)
protoc-gen-go binary is created at your go workspace
copy the protoc-gen-go binary to fabric/build/docker/gotools/bin/
BUILD AS make peer
I hope this would helpful to you
Can you try to:
cd /opt/gopath/src/github.com/hyperledger/fabric/
make peer
and see if it works? Looks like you are in the devenv subdir.
I had the same issue when Docker was returning permissions issues causing the build to fail.
Once that happens, the build process won't work successfully even after you fix the Docker issues.
Instead, once Docker is repaired, delete the gotools folder and run make again:
Makefile:245: recipe for target 'build/docker/gotools' failed
make: *** [build/docker/gotools] Error 126
user#:~/go/src/github.com/hyperledger/fabric$ rm -rf build/docker/gotools/
user#:~/go/src/github.com/hyperledger/fabric$ make all

Having trouble editing and executing .sh file in Cygwin

I am relatively new to the Cygwin program, and I have a .sh file that I need to edit and execute. I am currently running on Windows 10. I have installed Cygwin64 terminal on my machine.
The full list of steps required are as follows:
Be sure to have libtool installed.
Download protobuf from https://github.com/google/protobuf/ (download ZIP and unZIP at desired location, or clone the repo) The protocol buffer is used for communication between the CuraEngine and the GUI.
Before installing protobuf, change autogen.sh : comment line 18 to line 38 using #s. This removes the dependency on gtest-1.7.0.
Run autogen.sh from the protobuf directory: $ ./autogen.sh
$ ./configure
$ make
$ make install # Requires superused priviliges.
(In case the shared library cannot be loaded, you can try "sudo ldconfig" on Linux systems)
Once I get to 3.:
Before installing protobuf, change autogen.sh : comment line 18 to line 38 using #s. This removes the dependency on gtest-1.7.0.
I am having issues opening up to .sh file in Cygwin to make the appropriate edit.
When I try this command to even execute the .sh file:
$ '/cygdrive/c/Users/Thomas/Desktop/3D Printing/protobuf-master/autogen.sh'
I receive the error:
Could not find source code. Make sure you are running this script
from the root of the distribution tree.
If anyone has some insight as to a solution for this problem it would be greatly appreciated.
You are getting the error from this test in autogen.sh :
# Check that we're being run from the right directory.
if test ! -f src/google/protobuf/stubs/common.h; then
cat >&2 << __EOF__
Could not find source code. Make sure you are running this script from the
root of the distribution tree.
__EOF__
In this test, common.h path is relative to the protbuf install directory, just cd to it before executing the script.

Boost 1.60.0.tar.bz2 not extracting correctly

Forgive me for any silly mistakes but I'm very inexperienced. I have a file boost_1_60_0.tar.bz2 and am trying to extract it to /usr/local using the command
tar --bzip2 -xf ~/Downloads/boost_1_60_0.tar.bz2
When I try to do this it gives me over a thousand errors each with the same basic format like this example: boost_1_60_0/doc/html/boost_asio/reference/serial_port_base/: Failed to create dir 'boost_1_60_0'Can't create 'boost_1_60_0/doc/html/boost_asio/reference/serial_port_base'
When I do this I have cd'd into usr/local. Thank you for your help.
You don't have permission to write into /usr/local as an ordinary user.
Instead you should extract to a build directory, for example under your home directory, and then follow the boost build and installation instructions in the "getting started" page. That will put the files into /usr/local with a reasonable structure.

Resources