Web Hosting Talk







View Full Version : How to set up a client on a server by hand ??


hoot
03-13-2002, 10:29 AM
Hi,
I've have heard of lost of people who have dumped their CP's and who set everything up by hand !
Some install that free admin program but some actually edit all the files by hand,

The thing is that I have decided to try and make some scripts that do what I need and nothing else but to make a script that does this I would first need to know what exactly fully what they need to do !

Could someone who knows how to do this try and give me step by step instructions?

This is what I will want to know how to do :
set up a directory with proftp so that the user can log in and upload the files,
Set up the DNS etc ...
setup the frontpage scripts for the account
create e.mail addresses by hand, set up mysql databases by hand and anything else that a CP can do...

ANy step by step instructions would be great or even sugestions to read certin books. I'm aiming at starting the programming in about 6 months time and have a finished project in a years time,

All this will be based on linux 7.2 or a later version if necessary when the time comes ...

Thanks for any suggestions ...

hoot
03-14-2002, 05:27 AM
I don't understand, I see so many posts about getting rid of the CP but no one seemes to know how to go without a CP !!!!

Please could someone try and help !! :)

MotleyFool
03-14-2002, 06:06 AM
Hi hoot,

I just now saw your post, and being one of those nutcases who does everything "by hand" as you say, here's what I do on a FreeBSD server..

User

1. Create a unix user [adduser -v username] and accept defaults
2. Create a /www/ folder under username

DNS

3. Create &,+,@ records in /etc/tinydns/root/data file
4. cd /etc/tinydns/root and then "make"

Apache

5. Edit httpd.conf file and add <VirtualHost> directives for the domain name
6. Restart Apache [here I use apachectl graceful]

FTP

I have written a smart proftpd.conf file [though with some limitations] that will automatically allow a user with a valid shell to access his directory

Mail

I use vpopmail to add a domain to qmail and the postmaster [admin] account and password

I give access to qmailadmin for each domain manager to create & manage his/her domain emails & forwarders etc.

Beer

Go have a beer!

It all depends on your choice of software... if you dont knwo how to do things "by hand" you can also look at webmin which is free and which I hear rocks!

Hope it helps

Cheers
Balaji

hoot
03-14-2002, 06:14 AM
Thanks !
Anyone with the same but on linux 7.2 ?

Abu Mami
03-14-2002, 06:22 AM
Originally posted by MotleyFool
Beer

Go have a beer!I could get interested in this thread :-))

I too have thought about getting away from the CP on my box (Redhat 7.1 with Webmin) but can never seem to find the time to try and learn the material needed. Balaji, the beer part I understand OK, but the other topics sort of go over my head (I'll get up from the floor when the beer wears off). I'm inspired. I want to learn this stuff the right way. Where do I go? Are there any sites you would recommend that would help? Well, that is in addition to www.guinness.com (http://www.guinness.com)

MotleyFool
03-14-2002, 06:23 AM
hoot,

It is virtually the same with Linux except I think you use useradd instead of adduser!

Cheers
B

MotleyFool
03-14-2002, 07:21 AM
Abu,

The key to managing it is to understand the concept behind your OS and your servers [by server I mean the software that performs the task of serving something]

There can be no standard book on this because each server product you choose to provide your desired service [like email is a service and qmail is a mail server] is configured in its own fashion and syntax.

Your disk space assignment and roles assignment is managed by your OS. Unix is highly secure in that it allows only superuser allocated users to use the harddisk and only to the extent of the files and directories assigned. Any intro book on Unix would do for this

For web hosting as we understand it, there are 4 servers minimally required:

The DNS server - for routing a domain name query to your IP

The Web server - for serving web pages to browser clients that request www.gimmeabeer.com [let's say]

The mail server for ..ahem serving mails [you also have POP servers and IMAP servers etc within this]

The Ftp server for serving , well, Files to FTP clients

In addition you can have database servers and application servers and whatever you want...

The logical way to go about it [it appears to this fool] is to first choose your OS, then your servers and then the documentation on each server software [ex. tinydns] becomes the bible for that...

The good news is that most servers in Unix take their service parameters from configuration files and these are stored in ASCII files in the OS and so all you need to set up servers for multiple users is to know the syntax for what are called directives in the config file

DNS is a little bit complex to understand and in my foolish opinion is the nerve center of hosting... but it is mandatory to know DNS if you want to manage from the commandline. A good intro to DNS is in www.lifewithdjbdns.org.

The web server of choice is the redoubtable Apache and excellent documentation is available at //httpd.apache.org/docs/
Apache has some 79 directives with many different permutations and it can be real messy to come up with a decent httpd.conf file that is functional, secure and tuned for performance [in that order].. add to that the complexities of apache modules and SSL and it can turn to a nightmare if you dont take it in small doses

And for mail server , you should choose the server and then read the docs [exim can be very different from qmail or postfix]

I am hoping to put together a decent handbook for managing my set up [see signature] and I will send it to you when [or if] it is ready..

FTP is easier than email or web server

But all this is just the beginning.. you need to know process management if you want to watch your server like a hawk and keep it up

But Budweiser was not brewed in a day so take heart and plunge in! What have we to lose but our buggy CP's & hangovers?

I used CPanel/WHM as a reseller and after about 2 months realized the total lack of control over the server environment spurred me into going to the basic command line.

The advantage as I see it is the power over the way my server can be configured, tuned and secured - not to speak of the knowledge ofcourse!

Enough said...
B

hoot
03-14-2002, 07:31 AM
Ok I'm trying to get this to work step by step.
Step 1
I did useradd -r USERNAME -p PASSWORD
Now where is the userfile created ? because the -v function didn't work, am I using the right command? (at the moment I'm on linux 7.1 but soon I'll be on 7.2

MotleyFool
03-14-2002, 07:41 AM
hoot,

I have never used Linux so I wont be able to help you much.. what you do [what you will be doing from now on! ;)] is type the command

man useradd

and it will throw a list of options and you can use them to help you. [if there is a verbose option in Linux like there is in FreeBSD then use that and it will hand hold you]

I think the default is /home/username

Cheers
B

ho247
03-14-2002, 04:46 PM
If you don't like using those control panels and want to do things by hand, I would certainly recommend using Webmin (http://www.webmin.com/webmin/), it basucally does those 'useradd' commands etc for you, but you use an online form.

The risk of using such a control panel, such as Webmin, is more risky than CPs such as CPanel, since you could literally mess up your server and so making it unavailable.

If you need any help just PM me.

Alan

hoot
03-14-2002, 04:58 PM
No what I want to do is learn how to do everything without a CP for 3 reasons :
1) have more controll over the server
2) Have less setup fee
3) Eventually when I can do everything, try and make my own CP that does exactly what I want

What My plan is, is to have one central server with my hosting site + the CP and have this controll all my other future servers (Soon I'll have 3 and I'm continuing to grow.

This way it will make everything easier to set up once I have got going and allow me to get bigger
All the big companys do everything by hand or use their own made scripts. There are loads of little things that I like and don't like depending on the different CP's. I Just want everything to be as easy as possible for all my customers and to also know how to repare something if something goes wrong. Givin enough time I'm sure that I'll manage one day (even if it takes me 5 years ...)
My scripts wont be anything like the plesk CP they will only have the necessary options and won't need to be so complicated.

So I would be greatfull if someone could help me get going so that I could maybe on the next server start setting sites up by hand,

Thanks,

Hoot