Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi can anyone point me in the direction of some documentation.
My program is just a simple socker server. Linux = 2.6
I have to code, I just need to know the basics like where to put it on my server so client applets can connect to it, and how to start the server.
Thank you
Just run the code. Make sure that your firewall allows traffic to/from whatever port your server is listening on. I am assuming you just need to start it once, not on every reboot.
My questions was were to put the socket server on my server. In which folder. I am a complete beginer and have very little Linux knowledge.
So,
1) which folder should I put it in to be avaliable to only one particular domain name?
2) where to put t to be avaliable to all my domains on the server?
3) how do i start it?
4) how to I stop it?
5) how can I see the out put, like on a windows computer I can run it and a command window type thing opens and I can see the system.out's. How can I do this on a Linux server, bearing in mind my only access is SSH?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by gloveny
My questions was were to put the socket server on my server. In which folder. I am a complete beginer and have very little Linux knowledge.
So,
1) which folder should I put it in to be avaliable to only one particular domain name?
domain name ?
The folder (directory) where a program sits has no relation whatsoever with that.
Quote:
2) where to put t to be avaliable to all my domains on the server?
Same as the above.
Quote:
3) how do i start it?
java <something>
Quote:
4) how to I stop it?
That depends on how it is written, in last case, kill <process-id> should work.
Quote:
5) how can I see the out put, like on a windows computer I can run it and a command window type thing opens and I can see the system.out's. How can I do this on a Linux server, bearing in mind my only access is SSH?
The output of a socket server usually goes to its clients, please be more specific about what output you are talking about.
jlliagre, thanks for your reply.
When I say out put I mean simple system.outs to the consol window so I can debug my java socket server. I'd liek to just develop it locally and then upload it but ho many programs work first time after you moved its location.
I've only just got used to login in via SSH and perhaps running few commands like getting a password or somthing. I want to be able to start the server and then watch or capture the system.out's. I could always write them to a file instead if its not possible.
You can put the server anywhere and then start it with "java <programname>" anything you write to standard output (e.g. with system.out.println) will be printed onto your console. Running your server with the java command is just like running any other command in Linux -- anything going to the standard output is written to the terminal unless you redirect it somewhere else.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.