I'm trying to install Hyperledger locally on my Mac following instructions at Hypeledger - Installing the development environment. In the last step to start the web app ("Playground"), when i run the command:
composer-playground
shows
-bash: composer-playground: command not found
How can i run "composer-playground" ?
Thanks for Hyperledger community for helping me with the solution. Adding the resolution here for benefit of the stackoverflow community:
The issue is that composer-playground is not available on the path for it to execute.
Solution:
Add composer-playground to PATH in bash_proile.
To know the path where composer-playground is installed run the command: $npm get prefix. The result will be generally like /Users/user/.np-global
Go to bin under the above folder.. /Users/user/.np-global/bin and check if composer-playground is listed.
For me it was like this rwxr-xr-x 1 root staff 46 Feb 19 15:12 composer-playground -> ../lib/node_modules/composer-playground/cli.js.
Add the path /Users/user/.np-global/bin to your ~/.bash_profile. Save and source ~/.bash_profile so the changes are applied.
Now you can run composer-playground (this runs on default 8080 port. You may also use composer-playground -p 8090 to run on a different port.
Just use this command
npm install -g composer-playground#0.20
Related
I had a requirement to rename my mac homefolder, however now when I try to run:
ddev start
I'm getting the following error (which is pointing to the older homefolder name gregmercer):
~/Desktop/ddev/locals/gsb-3/public-website (develop) $ ddev start
Starting gsb-d8...
Using custom nginx configuration in /Users/gmercer/Desktop/ddev/locals/gsb-3/public-website/.ddev/nginx_full/nginx-site.conf
Custom configuration takes effect when container is created,
usually on start, use 'ddev restart' if you're not seeing it take effect.
Failed to open /Users/gregmercer/Library/Application Support/mkcert: open /Users/gregmercer/Library/Application Support/mkcert: no such file or directory
I've tried upgrading ddev, but that didn't seem to help.
I've run mkcert -install, and run mkcert -CAROOT. The last command seems to show the correct path to my newly named homefolder gmercer
~/Desktop/ddev/locals/gsb-3/public-website (develop) $ mkcert -CAROOT
/Users/gmercer/Library/Application Support/mkcert
At this point I'm not sure what to try. Any ideas?
Your mkcert CA has been orphaned.
Please try mkcert -uninstall and then mkcert -install
Then edit or remove the existing mkcert_caroot in your ~/.ddev/global_config.yaml
I've followed the documentation on how to install the Hyperledger Composer & Playground locally and it works. However, if I reboot my computer and want to restart the Hyperledger Composer playground, I don't see how to do it, other than re-downloading the docker images and starting over from scratch.
How can you restart the playground it as to pick back up where you left off?
If you are using Mac then just follow these steps:
Open terminal
Type this command and press enter: ./composer.sh
That's it. Now Hyperledger composer will locally re-started.
You need to change the docker-compose.yml in order to start where you left off,
otherwise your data will be lost after reboot. See http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html and the section called "A Note on Data Persistence" which provides more detail on this.
After reboot you just need to go to dir fabric-tools:
run ./startFabric.sh
run composer-playground
If you had followed the tutorial, your system would have already downloaded all the required docker images.
docker images
command would show you all the images downloaded.
You need to just go to fabric-dev-servers folder and then start the network using
./teardownFabric.sh
./startFabric.sh
./createPeerAdminCard.sh
Then verify that all dockers are running using command
docker ps
Then you can simply start composer playgroup by
composer-playground
Head to http://localhost:8080
Trying to install Glassfish(Java EE App. Server) and Wildfly App Server using Homebrew .
http://macappstore.org/wildfly-as/
http://macappstore.org/glassfish/
used these above mentioned tutorials .
I got the following errors while trying to run them by typing just "glassfish" & "wildfly-as" respectively.
Output(Error):
-bash: glassfish: command not found
-bash: wildfly-as: command not found
Searched about it and I think it has something to do with $PATH. I don't understand $PATH Variable . Need help.
The issue is that there are two asadmin scripts. One at $GLASSFISH_HOME/bin and one at $GLASSFISH_HOME/glassfish/bin
Here are full instructions to get your domain up
brew update
brew install glassfish
you should see message, add that line to your .bash_profile
==> Caveats
You may want to add the following to your .bash_profile:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec
Open a new terminal then, cd $GLASSFISH_HOME/glassfish/bin
./asadmin start-domain --verbose
Browse to http://localhost:8080 for welcome page and http://localhost:4848 for admin console
I actually installed Wildfly-Application Server using homebrew but could not find a way to run it.
https://tomylab.wordpress.com/2016/07/03/how-to-install-wildfly-on-mac/
This tutorial helped me .
And for glassfish, my installation was again successful using homebrew but was not able to run it . I did figure it out when I ran the following commands.
$ cd /usr/local/opt/glassfish/libexec/bin
$ ./asadmin
asadmin> start-domain
You need to understand about the PATH variable. It is an environment variable on Unix-like operating systems, specifying a set of directories in which executable programs are located. In general, each executing process, or user session, has its own PATH setting.
So, you need to add the glassfish home path to your actual path variable.
Now, as per your problem with running the Glassfish server; try this:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec/
export PATH=$PATH:$GLASSFISH_HOME/bin
Add it to your bash profile, if you do not want to do this everytime.
I tried to install firebase:
npm install -g firebase-tools
but then I tried:
firebase login
and failed with:
The system cannot find the path specified.
But I have global npm folder in my PATH.
I have yarn & flow and it works fine
My PATH looks like this:
and my npm folder (you can see firebase, yarn, flow there):
reboot doesn't work
reopening my cmd doesn't work too
Please help.
I know It's a bit late but here is my fix:
After running npm install -g firebase-tools open your File explorer at this location: C:\Users\YOUR_USERNAME\AppData\Roaming\npm
Shift + Right Click to open PowerShell at this location and then enter ./firebase. If this works, great!
Open environment variables and add C:\Users\YOUR_USERNAME\AppData\Roaming\npm to your path for current user AND System variables
Restart your machine
Use firebase #Yay
Hope it helps!
OS: Mac OSX 10.9
I have rabbitmq installed via home brew and when I go to /usr/local/sbin and run rabbitmq-server it states that: rabbitmq-server: command not found even as sudo it states the same error.
How do I get rabbitmq to start if it's not a command? I have also tried chmod +x rabbitmq-server in that directory to get it be an executable, same issue.
From the docs:
The RabbitMQ server scripts are installed into /usr/local/sbin. This is not automatically added to your path, so you may wish to add
PATH=$PATH:/usr/local/sbin to your .bash_profile or .profile. The server can then be started with rabbitmq-server.
All scripts run under your own user account. Sudo is not required.
You should be able to run /usr/local/sbin/rabbitmq-server or add it to your path to run it anywhere.
Your command failed because, by default, . is not on your $PATH. You went to the right directory (/usr/local/sbin) and wanted to run the rabbitmq-server that existed and had exec permissions, but by typing rabbitmq-server as a command Unix only searches for that command on your $PATH directories - which didn't include /usr/local/sbin.
What you wanted to do can be achieved by typing ./rabbitmq-server - say, execute the rabbitmq-server program that is in the current directory. That's analogous to running /usr/local/sbin/rabbitmq-server from everywhere - . represents your current directory, so it's the same as /usr/local/sbin in that context.
My OS: macOS Sierra 10.12.5
My RabbitMQ was installed using:
brew install rabbitmq
And it was installed into /usr/local/Cellar, just in case if someone has same situation with me, you would need to do similarly:
In terminal:
ls /usr/local/Cellar/rabbitmq/
to check which version you have installed, and then add to .bash_profile:
export PATH=/usr/local/Cellar/rabbitmq/<version>/sbin:$PATH
On mac by this command you can start,restart or stop rabbitmq
brew services start rabbitmq
brew services stop rabbitmq
brew services restart rabbitmq
As rabbitmq-server resides in /usr/local/sbin, running this command will enable starting server from anywhere:
export PATH=/usr/local/sbin:$PATH
I installed using home brew and I did the following:
brew install rabbitmq.
encountered issues cause the installation happened under bin and not /usr/local/sbin
So I did the following:
1. chown -R `whoami`:admin /usr/local/sbin
2. chown -R `whoami`:admin /usr/local/share
3. brew install rabbitmq
4. /usr/local/sbin/rabbitmq-server
And then the server runs and you can login to the management console :
http://localhost:15672/
userame: guest
password: guest
Start the service like this:
brew services start rabbitmq
Or if you don't need to start it as service:
/usr/local/sbin/rabbitmq-server
In my case the paths /usr/local/sbin/ nor /usr/local/Cellar/rabbitmq/ etc., did not work as Homebrew was putting these all together in a different location.
I opened Finder in my Mac and searched for rabbitmq-server in the search textbox on top right corner of the Finder window.
rabbitmq-server was located under the path below:
/Users/${USER}/homebrew/Cellar/rabbitmq/3.7.15/sbin
So in my ~/.bash_profile , I updated the PATH as below:
export PATH=$PATH:/Users/${USER}/homebrew/Cellar/rabbitmq/3.7.15/sbin
After source ~/.bash_profile
~ $ rabbitmq-server
## ##
## ## RabbitMQ 3.7.15. Copyright (C) 2007-2019 Pivotal Software, Inc.
########## Licensed under the MPL. See https://www.rabbitmq.com/
###### ##
########## Logs: /Users/santoshsindham/homebrew/var/log/rabbitmq/rabbit#localhost.log
/Users/santoshsindham/homebrew/var/log/rabbitmq/rabbit#localhost_upgrade.log
Starting broker...
completed with 6 plugins.
Just add this in your ~/.bash_profile
export PATH=$PATH:/usr/local/opt/rabbitmq/sbin
I installed using HomeBrew I added this to my bash profile
PATH=$PATH:/usr/local/Cellar
This worked for me
I have Mac OS version 10.13.6 installed. Somehow I did not have sbin directory present under /usr/local/. On carefully looking I found that for me the rabbitmq-server binary was present here /usr/local/Cellar/rabbitmq/3.7.9/sbin/rabbitmq-server.
i have read a wonderful article to fix that
simply open your bash_profile or .profile.
sudo nano ./bash_profile
in the begin of the file add PATH=$PATH:/usr/local/sbin, close and save, then write source ~/.bash_profile and lastly restart your terminal.
problem fix it!
http://www.andrewcranston.me/en/engineering/rabbitmq-and-path-variable/