LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-14-2011, 09:03 AM   #1
Mak007
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Rep: Reputation: Disabled
Lightbulb Connecting Two Linux Machines


hi guys .. i am Mak .. hope ur all doin' gud .. i hv a query regarding networkin on linux machine ,, actually i want to use an installed application on other linux machine available via internet without installing the software on my machine .... i can give u an example to understand wt m askin for ...
lets say we have two linux machines A( it has already installed a software or any compiler) and B( this machine has no compiler software and wanna excute its code using machine A on internet )

so it means i hv written a source code but have no compiler to execute it .. for the execution i wanna use the compiler installed on other machine A.. how can i do tht pls tell me .. i am new to linux i dun even noe how to connect two linux machines !! all replies will be appreciated thnx!!
 
Old 08-14-2011, 11:31 AM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,773

Rep: Reputation: 197Reputation: 197
Quote:
i am new to linux i dun even noe how to connect two linux machines !!
Hook both to a switch with CAT5 or CAT6 cables, configure both network interfaces with an IP address, or hook them both together with a crossover cable.
http://www.linuxhomenetworking.com/
http://www.linuxhomenetworking.com/w..._to_Networking
Quote:
i want to use an installed application on other linux machine available via internet without installing the software on my machine
http://linux.die.net/man/1/ssh
Quote:
this machine has no compiler software and wanna excute its code using machine A on internet
Be easier to just install gcc or whatever compiler you want on it. Compilers aren't very big.
 
1 members found this post helpful.
Old 08-14-2011, 12:43 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Firstly, please use proper spelling here; we're not on a bandwidth-limited network and messages can can be arbitrarily long.

What you are attempting is done routinely. You will need to get both hosts configured on the local network, either wired or wireless. You will need to use ssh to log in to the peer host that has the runnable binaries. Then, simply run the program(s). If the program(s) in question use X, you should use the '-X' option when you perform the ssh login.
To provide any further help, it would be helpful to know something about the nature of the respective Linux hosts, especially Linux distribution.
Also, just to be completely clear, you do not need a compiler to execute programs. The compiler is used (along with a linker and sundry other tools) to convert programming language source code into executable object code. If there is enough similarity between your two hosts, it is possible that the executable binaries on one host could be copied to the other, where they would then run as local processes.

--- rod.

Last edited by theNbomr; 08-14-2011 at 12:44 PM.
 
1 members found this post helpful.
Old 08-14-2011, 01:11 PM   #4
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 172
Blog Entries: 5

Rep: Reputation: 17
Quote:
Originally Posted by Mak007 View Post
...

so it means i hv written a source code but have no compiler to execute it .. for the execution i wanna use the compiler installed on other machine A.. how can i do tht pls tell me .. i am new to linux i dun even noe how to connect two linux machines !! all replies will be appreciated thnx!!
Do you mean to COMPILE your source code using a compiler installed on a different machine??

However strange the idea may sound, it is quite possible to do. You may need it in case your source code (for example, your kernel source) is on a machine with very low resources (say, Pentium II 82Mb of RAM) and you want to compile quickly.

Suppose, now, your source code is on the Linux machine A and your compiler on the B machine. If you've established your network connectivity using the above given manuals (which is pretty simple and straightforward, so I need not dwell on that), you can now configure your A machine as a NFS server and some partition (directory) on it as a NFS partition.
Then you can mount your NFS partition via network on your B machine (which will act as a NFS client), where your compiler is. Once NFS-mounted on your B machine, the source code on that partition becomes available on your B machine like any local code. So you can compile it using local compiler. Sure thing, the speed will be limited by the I/O speed of your A machine's HDD controller and bus (as your NFS partition is still on your A machine). But the memory and processor of your B machine will speed things up considerably.

Read the NFS-HOWTO in order to better understand what NFS is. Essentially, NFS is a protocol that allows mounting partition from one machine on another and work with it as though it was a local partition. There's nothing really complicated about this stuff.

I remember doing it when my source code was on a very low resource machine and I needed to compile it rather quickly. That worked fine!
But hey, you can do the same on your Mac, eh?
 
1 members found this post helpful.
Old 08-14-2011, 03:20 PM   #5
Mak007
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
thnk u guys i hope it will surely work well ... i have to wait for 1 day before setting up this kind of interconnected system .. well thnx !! special thnx to "kostya" who let me know that we can compile our source codes with high speed by using other system via networking .. my english is not too good but its quite fare enough to make you guys help me better :P
 
Old 08-14-2011, 05:42 PM   #6
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 172
Blog Entries: 5

Rep: Reputation: 17
I'm terribly sorry, but on a second thought it is not as simple as that.

For that trick to work your two machines must be the same architecture. Then, too, your A machine MUST have a compiler installed on it. Then you just mount your NFS partition and `chroot` into it and just use the installed compiler to compile your code as if you were on your machine A, but using the resources of your machine B.
Note, that when you `chroot` into your partition, you can only use whatever exists in that partition. Therefore if GCC isn't there, you can't use it. But if you have GCC installed on A machine, you'll absolutely be able to do a quicker compilation from machine B if they are the same architecture.

Sorry for my forgetfulness, it was long time ago and I don't remember all details .
 
1 members found this post helpful.
Old 08-14-2011, 09:48 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
If this is really across the internet, NFS is not a good idea. Its plain text and not designed for long distances usage; you'll probably get timeout issues.
I would just use ssh/scp to copy across the src code to the compiler on box A and compile it there.
As mentioned above, normally box A must have the same architecture as box B for the resultant binary to run on box B, although cross-compilation is an option as well.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 12.2 -- connecting two linux machines with crossover cables noviciado Linux - Networking 15 02-14-2009 03:49 AM
Connecting 2 Linux machines ruh31 Linux - Networking 4 12-23-2004 03:04 AM
Help on connecting 2 linux machines over phone line fcalcada Linux - Networking 4 12-16-2003 01:03 PM
Connecting existing Windows Machines to Linux Server tj8_us Linux - Networking 0 09-13-2003 04:12 PM
connecting two machines vicente Linux - General 1 10-23-2001 08:33 PM


All times are GMT -5. The time now is 05:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration