Bitcoin Forum
February 20, 2017, 08:56:33 AM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How can I run -server with a Mac install?  (Read 1007 times)
hhigins
Newbie
*
Offline Offline

Activity: 3


View Profile
July 22, 2011, 07:00:41 PM
 #1

I would like to use the HTTP JSON-RPC and need to run the bitcoin server from my local machine (Mac OS X).

My setup varies from this question http://forum.bitcoin.org/index.php?action=printpage;topic=21956.0 in that my set up looks like the following...

I downloaded from here http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.3.24/bitcoin-0.3.24-macosx.zip/download
- Downloads
    -v0.3.24
        -license.txt
        +src
- Application Support
    -bitcoin
        -__db.001
        -__db.002
        -__db.003
        -__db.004
        -__db.005
        -__db.006
        -addr.dat
        -block00001
        -blkindex.dat
        +database
        -db.log
        -debug.log
        -wallet.dat

From ~/Application Support/bitcoin/ if I run bitcoin -server I get bitcoin: command not found.  I also cannot find a bitcoin.conf file.  I am able to launch the GUI from my Applications folder.

What do I have to do to get the server running?  Thanks.


Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Rob P.
Member
**
Offline Offline

Activity: 84



View Profile WWW
July 22, 2011, 07:21:41 PM
 #2

Open Terminal.
Issue these commands:

Code:
echo "rpcuser=user" >>  /Users/<YOUR USER HERE>/Library/Application\ Support/Bitcoin/bitcoin.conf
echo "rpcpassword=password" >> /Users/<YOUR USER HERE>/Library/Application\ Support/Bitcoin/bitcoin.conf
/Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin -server

The above assumes you change <YOUR USER HERE> to your username and that you move the v0.3.24 folder you downloaded to your /Applications folder.

This will also run the GUI, can't be helped without recompiling, but the app will now respond to commands.

To test:

Code:
/Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin getbalance

Should return your current Bitcoin account balance (assuming the local client is the one you use and has your wallet.dat)

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
hhigins
Newbie
*
Offline Offline

Activity: 3


View Profile
July 22, 2011, 07:51:11 PM
 #3

Thanks for working with me Rob P.  Running /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin -server returns...


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in AppInit()       


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in CMyApp::OnUnhandledException()       

Abort trap
hhiggins-MacBook-Pro:bitcoin hhiggins$ /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin getbalance


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in AppInit()       


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in CMyApp::OnUnhandledException()       

Abort trap
hhiggins-MacBook-Pro:bitcoin hhiggins$ /Applications/v0.3.24/Bitcoin.app/Contents/MacOS/bitcoin -server


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in AppInit()       


************************
EXCEPTION: N5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_op tions14invalid_syntaxEEEEE       
unrecognized line in 'rpcuser-user'       
bitcoin in CMyApp::OnUnhandledException()       
Rob P.
Member
**
Offline Offline

Activity: 84



View Profile WWW
July 23, 2011, 02:55:00 AM
 #4

There's something wrong with your bitcoin.conf file:

Go to your /Users/<YOUR USER HERE>/Library/Application\ Support/Bitcoin folder.
Right-click on bitcoin.conf.
Choose "Open with", "Other", and select TextEdit from your Applications.

It should look like:

Code:
rpcuser=user
rpcpassword=password

If it doesn't look like the above, fix it and save it.  It would appear you used an " - " instead of an " = ".

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
hhigins
Newbie
*
Offline Offline

Activity: 3


View Profile
July 23, 2011, 02:33:20 PM
 #5

That was the case.  Thanks.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!