LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-15-2004, 05:55 AM   #1
ommy
LQ Newbie
 
Registered: Jan 2004
Location: Lahore
Distribution: Red Hat
Posts: 10

Rep: Reputation: 0
Linux Question....


Hello I am new to Linux but working out with it . I have a few questions.. I would appreciate if someone could answer them.
I want to develop simple c programs on the Linux platform. I have Re d Hat 7 disto and GCC installed. Please anyone refer me to any
simple tutorials starting from "HELLO WORLD". I am an intermediate programmer of C and have been programming with turbo C compilers.
Please someone refer to these kind of tutorials, or anyone can write a simple "hello world " programming with 'VI' , so that i could know how we include headers in a c program (on linux platform) and how could I compile it using GCC.
My ultimate goal is to develop a web server which could listen on port 80. Please do tell me that how much socket programming is involved in coding a web server. and most importantly I want it to be an open source code and based on a Linux platform. Moreover what functions should it do at the minimum to be called as a web server. One point in my mind is parsing <html> tags and server side scripting.But how to do it...I am I am pretty much lost at the moment. Please help me out with this as it is my final project.. What measures should be taken to make it secure. I would also look for the suggestions for teh development tools and environments. like should i stick to C or should move to JAVA and what IDE would be suitable as I want to do it on LInux Platform.
Guys this is my first post over here. And please do answer my questions as it would really help me to contribute towards the Open Source Code Community.
Thank you all for reading
Ommy
 
Old 01-15-2004, 07:25 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
O'Reilly has tons of good books on coding. Practical C Progamming is an excellent book which covers the basics and also covers the basics of compiling with gcc, makefiles and related utilities.

If you want tutorials, just use Google Linux and search. There is literally tons of stuff for developing with gcc on the web.

About your web server: Sounds like a fun project, but parsing HTML tags is what the client (browser) does, not the server. Your server has to implement the rfc2626 protocol, also known as HTTP/1.1 (and properly deny HTTP/1.0 requests if you don't implement that) in order to be fully compliant.

Writing a web server in Java is very easy as all the functionality you need is already available in the API. Just read up a bit on threading.


Håkan
 
Old 01-15-2004, 07:26 AM   #3
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
http://galton.uchicago.edu/~gosset/Compdocs/gcc.html

http://www.tldp.org/HOWTO/GCC-HOWTO/index.html

I will check about ur "webserver"

Cheers and welcome to LQ
 
Old 01-15-2004, 10:22 AM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
by ommy
I want to develop simple c programs on the Linux platform. I have Re d Hat 7 disto and GCC installed. Please anyone refer me to any simple tutorials starting from "HELLO WORLD". I am an intermediate programmer of C and have been programming with turbo C compilers. Please someone refer to these kind of tutorials, or anyone can write a simple "hello world " programming with 'VI' , so that i could know how we include headers in a c program (on linux platform) and how could I compile it using GCC.

how about http://www.linuxquestions.org/questi...ticle&artid=33

by ommy
My ultimate goal is to develop a web server which could listen on port 80. Please do tell me that how much socket programming is involved in coding a web server. and most importantly I want it to be an open source code and based on a Linux platform.

not a great deal of socket programming is needed, beej's network guide contains more than enough about sockets for your purposes

by ommy
Moreover what functions should it do at the minimum to be called as a web server. One point in my mind is parsing <html> tags and server side scripting.

the main function of a webserver is speak http and act accordingly, it has nothing to do with parsing html, i would worry about scripting until youve got something simple up and running.

by ommy
like should i stick to C or should move to JAVA and what IDE would be suitable as I want to do it on LInux Platform.

you should do it in whatever language you feel most comfortable with. as for an ide i reccomend you use a very simple text editor(pico, nc, gedit, etc) and the console because youve got plenty of learning to do as it is so you dont want to have to concern yourself with an ide as well.

Last edited by kev82; 01-15-2004 at 10:23 AM.
 
Old 01-15-2004, 12:45 PM   #5
ommy
LQ Newbie
 
Registered: Jan 2004
Location: Lahore
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
hey thank you all...this forum rocks. These posts cleared my somewhat confused vision. But i m looking for more substance. I am really intrested in doing socket programming and making my server more secure then others..likewhat if the traffic from the webserver should be encrypted or something like this. Coding a Web Server would be a lots of fun.
My second question is that when i try to install some packages on ma linux box..it shows some dependenices in the form of so's(shared objects)like
libcrypto.so.1
libstans1.so
and lots of others. I couldnt find these so's on internet. Please tell me hoe to handle this.
Thirdly almost every AIM client for linux is causing a problem cause i am behind the proxy ,precisely Microsoft Proxy(ISA). I think the problem is compatibility with the Microsoft Proxy. Somebody toldme that it should work fine with SQUID.
Thank you every one for reading
looking forward to ur replies
Ommy
 
Old 01-15-2004, 01:38 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just go to rpmfind.net and search for the file you need, it should then tell you which package you will need to install.

could i also mention that "Linux Question" is a pretty useless title.... that kinda goes without saying...
 
Old 06-10-2004, 09:54 PM   #7
8route
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
Re: Linux Question....

Quote:
Originally posted by ommy
I want to develop simple c programs on the Linux platform. I have Re d Hat 7 disto and GCC installed. Please anyone refer me to any
simple tutorials starting from "HELLO WORLD". I am an intermediate programmer of C and have been programming with turbo C compilers.
Please someone refer to these kind of tutorials, or anyone can write a simple "hello world " programming with 'VI' , so that i could know how we include headers in a c program (on linux platform) and how could I compile it using GCC.
Ommy
You can try Magic C++.A handy visual remote Unix and Linux C/C++ IDE under windows just like VC++. It provides a "hello world" template, you can generate a "hello world" project by project wizard, you'll get something fairly easy to use. You can edit this simple "hello world" and debug it handily.

Magic C++ download site:
http://www.magicunix.com

A "hello world" step by step tutorial( html format with illustrates )
http://www.magicunix.com/download/step_by_step.zip


Quote:
Originally posted by ommy
My ultimate goal is to develop a web server which could listen on port 80. Please do tell me that how much socket programming is involved in coding a web server. and most importantly I want it to be an open source code and based on a Linux platform. Moreover what functions should it do at the minimum to be called as a web server. One point in my mind is parsing <html> tags and server side scripting.But how to do it...I am I am pretty much lost at the moment. Please help me out with this as it is my final project.. What measures should be taken to make it secure. I would also look for the suggestions for teh development tools and environments. like should i stick to C or should move to JAVA and what IDE would be suitable as I want to do it on LInux Platform.Ommy
For simple httpd source codes you can try thttpd, that's what I'm using now.

thttpd download site:
http://www.acme.com/software/thttpd/
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Not really a Linux Question rm6990 General 5 10-12-2004 02:13 AM
Yet Another Linux HD Question egs4029 Linux - Newbie 5 05-29-2004 10:51 AM
Another Lilo dual boot (Linux+Linux) question tigerflag Slackware 11 05-22-2004 04:14 PM
Question: Which is better, linux or windows. Or, no : Why isn't linux mainstream yet? qanopus General 2 06-23-2003 04:57 AM
C++ question in linux kyoavk Linux - Software 1 07-22-2002 09:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:34 AM.

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
Open Source Consulting | Domain Registration