How do I set up an account/website without WHM/cPanel?

For compliance reasons, I can no longer use WHM/cPanel on my RHEL server.  Normally, I would just go to "Create an Account" in WHM to add a new account/website.  How do I do it now?  If possible, I would like the same functionality as WHM uses where the account is created with files from a skeleton directory.
jeff_zuckerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

farzanjCommented:
It is definitely possible.  Most power users never use a panel.

What accounts are you exactly talking about.  Please be more specific so that I can assist you better.
0
expert_tanmayCommented:
You can use webmin (http://www.webmin.com/download.html) you have all the functionality as WHM.

Cheers..
0
jeff_zuckerAuthor Commented:
farzanj - I sell websites, so I'm trying to set up websites on the server.  Ideally, there is a script that does this automatically when someone signs up.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

jeff_zuckerAuthor Commented:
tanmay - I'm checking, but I think webmin is going to have the same compliance issues as cpanel.
0
farzanjCommented:
Yes, not hard to implement.  You are looking for CGI script that could be written in bash.  You need to set few configurations in Apache, mostly, ScriptAlias, and then you can run this script.  So basically users will fill out a form and then after checking implement changes.
0
expert_tanmayCommented:
Hi Jeff,
I found one more script which can be used by hosting providers. http://www.scripts.com/php-scripts/web-hosting-scripts/webcp/
Please let me know your WHM has to be compliant to what standards?

Cheers..
Tanmay  
0
jeff_zuckerAuthor Commented:
I need to be PCI Compliant.  I think farzanj is on the right track.  I believe I need a bash script.  I know that to set up an account I need to create a directory in /home, create a user for it, edit vhosts, edit httpd.conf, etc.  There has to be some pre-written script on the internet to do all of this (I'm really shaky with this stuff).  I just can't find it.
0
farzanjCommented:
There are multiple ways.

You can get data using a web form and store it in a text file or DB.  You can schedule a script to every 5 minutes that would run to do these tasks.

Or you can write a CGI script that would do it right away.
0
expert_tanmayCommented:
Hi Jeff,
The script on http://www.scripts.com/php-scripts/web-hosting-scripts/webcp/ will exactly do the same for you. This script has a web interface and internally it executes scripts to create the user with home directory, allocating quota, editing httpd.conf to create virtual hosts etc. Please have a look at the documentation of web-cp.

Cheers..  
0
jeff_zuckerAuthor Commented:
That webcp script only gets 1.69 stars out of 5, so I don't want to use that.
0
farzanjCommented:
Ok, I can write a script for you should you tell me in a little more detail.

Do you like to schedule a script to implement tasks or would you like to run it as a CGI script?
What changes should it make?
0
jeff_zuckerAuthor Commented:
farzanj - That would be great!  Right now when someone signs up, the data is written to a database.  Whichever way it would be easiest to get the information from the db and set the site up.
0
farzanjCommented:
I think in your architecture, you need to have a script run every five minutes, pick the records and implement them.  If there are no records to be implemented, the script should end without implementing anything.  You will be notifying your customers, "It will take about 15 minutes for your account to be implemented".

Since there are too many unknown details and it is not even advisable to expose your details, I can give you a general algorithm.

First you would need one more column in your database that you say, implemented or not (boolean).

1.  Read rows that are not implemented.
2.  For each row create accounts, make website modifications, etc.
3.  pick the next row, until no more rows are left.

You will have to schedule this script with crontab

You should figure out each portion/stage that needs to be implemented (break it into pieces) and open a separate question for each portion.  This way you would have a very good solution at the end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jeff_zuckerAuthor Commented:
I know how to do 1 and 3.  All I need is the commands I would use to do #2.
0
expert_tanmayCommented:
To create account you have to use useradd command. Things like adding domain, changing of conf files you can make templates. So the scripts can use the templates to append to the conf files..

Cheers..
0
farzanjCommented:
For #2, could you make a list of things that need to be done?

Adding user should be useradd but I would need to know what kind of access, like for instance the users get a Linux shell?  What kind of access do they get?

Do you know what kind of entries you make for apache virtual server?

What other changes?
0
expert_tanmayCommented:
Following are the list of activities you need to provide through your control panel

1. Httpd (virtual hosts, domain and IP based)
2. FTP, SFTP, SCP
3. DNS (A, CNAME, MX, SRV and TXT Records)
4. POP3, IMAP
5. Email-Autoresponder
6. Server based mail filtering
7. Advanced email spamfilter and antivirus filter
8. MySQL client-databases
9. Webalizer statistics
10. Harddisk quota
11. Mail-Quota
12. Traffic limits and statistics
13. IP-addresses
14. SSL
15. SSI
16. PHP (available PHP modes: mod_php, FCGI,CGI and SuPHP)
17. Shell-access
18. Jailed shell access
19. Firewall
20. Server monitoring module
21. Mysql client database access trough phpmyadmin

To enter a virtual host make the following entries in httpd.conf

<VirtualHost domain.com/>
ServerAdmin xyz@abc.com
DocumentRoot /var/www/path_to_virtualHosting
ServerName domain.com
ServerAlias www.domain.com
ErrorLog /var/logs/httpd/log_path/error_log
CustomLog /var/logs/httpd/access/access.log common
</VirtualHost>

0
jeff_zuckerAuthor Commented:
Only graded this a "B" because I was looking for something a little more specific in terms of a setup script, but this gave me enough so that I could start the script on my own.  Thanks for the help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.