Bitcoin Forum
November 13, 2024, 07:16:26 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 »  All
  Print  
Author Topic: Linux noob trying to run bitcoin via SSH  (Read 8951 times)
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 05:47:25 AM
 #1

I successfully downloaded and untar'd the lastest compiled version of bitcoin for linux via SSH.  The part I can't figure out is how to actually start the stupid thing running.  I'm a complete linux noob, only figured out how to do what I've done so far via googling.

So I've navigated to /bitcoin/bin/64/, and using ls, I can see that there are two files - bitcoin, and bitcoind.  But how do I actually launch either of them?  Typing bitcoind just says command not found.  I tried nohup bitcoind, and it says ":nohup: cannot run command 'bitcoind': No such file or directory".

What am I doing wrong here?
markm
Legendary
*
Offline Offline

Activity: 3010
Merit: 1121



View Profile WWW
July 14, 2011, 07:01:01 AM
 #2

You have to specify where the command is, because Unix, and Linux, defaults to looking in the places listed in its PATH environment setting.

The current directory is . so you can do ./bitcoin or ./bitcoind if they are in the directory you are in.

Or if you don't bother navigating all the way down to /bitcoin/bin/64 you could say /bitcoin/bin/64/bitcoin or /bitcoin/bin/64/bitcoind

bitcoin will want Xwindows, so you will have to've used ssh -X instead of just ssh so that it will know at what IP address, and at which X-windows display of that IP address, to bring up its GUI. (If you are on Windows, it does not typically come with an Xwondows display, that is an extra you have to go find, some of them are commercial, long time since I went looking for such a thing.)

The basic point is that for security reasons . (the current directory) is deliberately omitted from PATH (too many nasty tricks can be played on people who put . into their PATH).

-MarkM-

Browser-launched Crossfire client now online (select CrossCiv server for Galactic  Milieu)
Free website hosting with PHP, MySQL etc: http://hosting.knotwork.com/
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 07:38:21 AM
 #3

Thanks, making progress.

I did "nohup ./bitcoind, and it said "nohup: ignoring input and appending output to 'nohup.out'

Sending the command pico nohup.out results in the following text:
"./bitcoind: error while loading shared libraries: libgthread-2.0.so.0: cannot o$"


Now you mentioned that bitcoin will want Xwindows... why is this?  I simply want to run a bitcoind RPC service - I don't need a GUI of any kind.
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 14, 2011, 07:43:46 AM
 #4

what kind of distro do you run? debian? centos 5?

"./bitcoind: error while loading shared libraries: libgthread-2.0.so.0: cannot o$"
it looks like you need glibc2

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 14, 2011, 07:44:44 AM
 #5

Even the deamon requires libgthread, which is part of glib2. This is due to imperfections in the makefile used to control the build. It is a dependency even though the daemon build doesn't use it. The same is true of libz.

Note this is glib2, not glibc2.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 07:46:25 AM
 #6

what kind of distro do you run? debian? centos 5?

"./bitcoind: error while loading shared libraries: libgthread-2.0.so.0: cannot o$"
it looks like you need glibc2
No idea what distro... is there a way to find out via SSH?  This is a rented VPS, and I did not get information on what version of linux was installed on it.

Ok, I'll see if I can figure out how to install glibc2.  Thanks!

EDIT:  Looks like Debian is the default Linux installation, but other versions can be installed.  Also, I am clueless as to this glibc2 thing... it seems like it's a major OS-level upgrade to everything, so I'm a bit hesitant to just start trying things.  Any simple way to get that particular library requirement installed?
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 14, 2011, 07:54:44 AM
 #7

Quote
No idea what distro... is there a way to find out via SSH?  This is a rented VPS, and I did not get information on what version of linux was installed on it.
it is likely to be debian or centos.
try:
Code:
uname -a
cat /etc/lsb_release

also bitcoind does not need xwindows. only bitcoin. the ssh -X is not needed

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 07:57:41 AM
 #8

See above - it is running Debian.

Those two commands don't come up with useful information.  The first command seems to show some hardware information (amd64, x86_64, GNU/Linux, etc), and the second just says "No such file or directory".
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 14, 2011, 08:39:07 AM
 #9

See above - it is running Debian.

Those two commands don't come up with useful information.  The first command seems to show some hardware information (amd64, x86_64, GNU/Linux, etc), and the second just says "No such file or directory".
may i get root access to it for an hour? i can install bitcoind, and fix all kind of unforeseen troubles(os upgrade, ...)

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 14, 2011, 08:44:01 AM
 #10

I just uploaded a build of the git repository version of 'bitcoind' (0.3.25-beta). It was built for 64-bit Linux with no mods or options, but without the spurious 'libz' or 'libgthread' dependencies. You can fetch it at this URL:

http://davids.webmaster.com/~davids/bitcoind
The MD5 sum is:
469c47c2103fcdaca5c9fa23ce20bdd4
The SHA1 sum is:
5de7489f1b27bb3f291f10e3455786f8a7985925

$ ldd ./bitcoind  | cut -f 1 -d "("
        linux-vdso.so.1 =>  
        libdl.so.2 => /lib64/libdl.so.2
        libpthread.so.0 => /lib64/libpthread.so.0
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6
        libm.so.6 => /lib64/libm.so.6
        libgcc_s.so.1 => /lib64/libgcc_s.so.1
        libc.so.6 => /lib64/libc.so.6
        /lib64/ld-linux-x86-64.so.2

If you'd prefer a different build, such as the latest release, just let me know.

For reference, this is the only change:
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -30,11 +30,13 @@ endif
 
 LIBS+= \
  -Wl,-Bdynamic \
-   -l gthread-2.0 \
-   -l z \
    -l dl \
    -l pthread
 
+GLIBS= \
+   -l gthread-2.0 \
+   -l z
+
 
 DEBUGFLAGS=-g -D__WXDEBUG__
 CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
@@ -68,7 +70,7 @@ cryptopp/obj/%.o: cryptopp/%.cpp
        $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
 
 bitcoin: $(OBJS) obj/ui.o obj/uibase.o
-       $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
+       $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS) $(GLIBS)


I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
WakiMiko
Newbie
*
Offline Offline

Activity: 59
Merit: 0



View Profile
July 14, 2011, 10:22:14 AM
 #11

Also, you probably want to start
Code:
bitcoind -daemon
which will cause bitcoin to demonize so it will keep running even if you log out from your ssh session. no nohup required Smiley.


JoelKatz: That should really be in the official release.
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 14, 2011, 10:31:53 AM
 #12

JoelKatz: That should really be in the official release.
I was going to create a pull request, but I ran into some technical issues confirming that the patch didn't break the GUI build. I ran out of the time I could devote to doing it and I don't think it makes sense to issue a pull request without testing that.

Anyone?

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 03:56:53 PM
 #13

Wow, thanks for the responses all!  I'm not at home right now, but I'll give Joel's bitcoind a try when I do get home.

kokjo, I would love to allow you to do that, but how can I know that you won't install something malicious that could grant you access to the server down the road?  Would there be some way for me to verify that nothing like that is installed?
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 14, 2011, 08:02:10 PM
 #14

Quote
kokjo, I would love to allow you to do that, but how can I know that you won't install something malicious that could grant you access to the server down the road?
you can't. but i will not do that, it would destroy my reputation.

Quote
Would there be some way for me to verify that nothing like that is installed?
no not if you give root access, i could hide anything.

i can do it if you like. but only if you thrust me, Nefario can vouch for me.

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 14, 2011, 08:09:02 PM
 #15

Quote
kokjo, I would love to allow you to do that, but how can I know that you won't install something malicious that could grant you access to the server down the road?
you can't. but i will not do that, it would destroy my reputation.

Quote
Would there be some way for me to verify that nothing like that is installed?
no not if you give root access, i could hide anything.

i can do it if you like. but only if you thrust me, Nefario can vouch for me.
I'll let you know, thanks for the offer!
SgtSpike (OP)
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 15, 2011, 05:22:49 AM
 #16

I just uploaded a build of the git repository version of 'bitcoind' (0.3.25-beta). It was built for 64-bit Linux with no mods or options, but without the spurious 'libz' or 'libgthread' dependencies. You can fetch it at this URL:

http://davids.webmaster.com/~davids/bitcoind
The MD5 sum is:
469c47c2103fcdaca5c9fa23ce20bdd4
The SHA1 sum is:
5de7489f1b27bb3f291f10e3455786f8a7985925

$ ldd ./bitcoind  | cut -f 1 -d "("
        linux-vdso.so.1 =>  
        libdl.so.2 => /lib64/libdl.so.2
        libpthread.so.0 => /lib64/libpthread.so.0
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6
        libm.so.6 => /lib64/libm.so.6
        libgcc_s.so.1 => /lib64/libgcc_s.so.1
        libc.so.6 => /lib64/libc.so.6
        /lib64/ld-linux-x86-64.so.2

If you'd prefer a different build, such as the latest release, just let me know.

For reference, this is the only change:
--- a/src/makefile.unix
+++ b/src/makefile.unix
@@ -30,11 +30,13 @@ endif
 
 LIBS+= \
  -Wl,-Bdynamic \
-   -l gthread-2.0 \
-   -l z \
    -l dl \
    -l pthread
 
+GLIBS= \
+   -l gthread-2.0 \
+   -l z
+
 
 DEBUGFLAGS=-g -D__WXDEBUG__
 CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEBUGFLAGS) $(DEFS)
@@ -68,7 +70,7 @@ cryptopp/obj/%.o: cryptopp/%.cpp
        $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
 
 bitcoin: $(OBJS) obj/ui.o obj/uibase.o
-       $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS)
+       $(CXX) $(CXXFLAGS) -o $@ $^ $(WXLIBS) $(LIBS) $(GLIBS)


I gave it a try... basically, just downloaded your bitcoind and replaced it with mine in the /64/ folder.  The following was noted in the nohup.out log:

Code:
./bitcoind: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./bitcoind)
./bitcoind: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by ./bitcoind)
./bitcoind: /lib/libc.so.6: version `GLIBC_2.8' not found (required by ./bitcoind)
./bitcoind: /lib/libc.so.6: version `GLIBC_2.14' not found (required by ./bitcoind)
Tasty Champa
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
July 15, 2011, 09:30:17 AM
 #17

I not anyone or know any of these guys but I suggest letting one of these guys help you.
The web will often fail you with outdated info when comes to linux, it changes frequently.
Having someone that knows current info and can show you or help you fix things is invaluable.

Teamviewer is excellent too.
Teamviewer has an ability to record the session also, so you can go back and watch exactly what they did, in case you want to setup another one or ever need to set it up again for any reason.
it also has a browser interface.
Maxim Gladkov
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile WWW
July 15, 2011, 10:00:00 AM
 #18

I not anyone or know any of these guys but I suggest letting one of these guys help you.
The web will often fail you with outdated info when comes to linux, it changes frequently.
Having someone that knows current info and can show you or help you fix things is invaluable.

Teamviewer is excellent too.
Teamviewer has an ability to record the session also, so you can go back and watch exactly what they did, in case you want to setup another one or ever need to set it up again for any reason.
it also has a browser interface.


Speaking about Teamviwer and other remote desktop software - it is impossible to use them with mining rigs, because they use your video graphics adapter to render image for your remote session, but VGA is already working hard to mine some bitcoins for you, so it's lagging awfully!

My last time, I wasd trying to use Teamviwer with my rig - I just saw black screen and nothing more Wink so I don't think it will be a good wayfor this...
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

You are WRONG!


View Profile
July 15, 2011, 10:43:57 AM
 #19

you people do know that we are talking about an rented headless linux server here, right?
which i will(if sgtspike whats it) get root access though ssh, right?

you cant teamview on this, sorry.
stupid windows users please go away and let us serious people work, or please read the thread before commenting.

@Maxim Gladkov: we are not talking about mining.
@Tasty, davidonpda: AFAIK, teamviewer cant be used on a headless linux server

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
wannaBhacker
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
July 15, 2011, 02:02:33 PM
 #20

you people do know that we are talking about an rented headless linux server here, right?
which i will(if sgtspike whats it) get root access though ssh, right?

you cant teamview on this, sorry.
stupid windows users please go away and let us serious people work, or please read the thread before commenting.

@Maxim Gladkov: we are not talking about mining.
@Tasty, davidonpda: AFAIK, teamviewer cant be used on a headless linux server


Kokjo you're quite an @$$.

Let's think about this for a minute. He has a VPS. So he doesn't have local access to the machine. So, a teamviewer session would work like this. Mr VPS user logs into SSH into the VPS on his windws/linux desktop. He then allows you to have teamviewer access to his desktop which has the SSH shell. Several other people appeared to understand what he was talking about. And you're the nice person trying to help? Come on.

And Maxim. We aren't talking about mining but I use teamviewer all the time for my remote machines. I am using ubuntu desktop for mining. You need to start teamviewer outside of an RDP protocol, like with a monitor. Set it to run automatically with start up and use a secure password. I have seen a sample from someone else where they were logged into a RDP desktop, started teamviewer and teamviewer logged them into the RDP session. They tried it again with closing out the RDP after opening teamviewer then logging into the machine with teamviewer and it worked just fine. Don't let the graphics controllers get locked into sending their signal to the RDP protocol.

Kokjo if you are really trying to be helpful pull the stick out of the hind end.
Pages: [1] 2 3 4 5 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!