Installed Appium via npm but it is not starting on terminal

I have installed Appium via npm, but when I hit “Appium” on terminal it shows command not found.
Is it expected behavior. Please help, I am new to Appium.
Below are the logs of terminal.
administorsmini:~ xxxxx$ npm install -g appium
/Users/xxxxxx/.npm-global/bin/appium -> /Users/xxxxx/.npm-global/lib/node_modules/appium/build/lib/main.js

  • [email protected]
    updated 1 package in 9.668s
    administorsmini:~ xxxxx$ appium
    -bash: appium: command not found

I am trying to automate the Appium start and stop programmatically. But it gives me below error
"io.appium.java_client.service.local.InvalidServerInstanceException: Invalid server instance exception has occured: There is no installed nodes! ".
Although I have installed Appium via Appium on terminal[as mentioned above].
Please tell me how can I resolve it.