Portal Home > Knowledgebase > Articles Database > Going without a control panel - can this be done?


Going without a control panel - can this be done?




Posted by calabiyau, 06-16-2007, 05:54 PM
I'm just starting to explore the idea of getting dedicated server or good VPS for hosting websites of clients I do php/sql programming for. I want to learn the right way, so I downloaded CentOS iso's and installed the operating system on an old computer, learned how to use yum to install the server software, set up virtual hosts, etc. I would like to give clients ftp access though honestly most of their sites will be hooked up to CMS, but sometime might arise where somebody just wants hosting and not programming. I would like to do without a control panel and try to do as much as possible from command line. For limiting site's bandwidth i found mod_cband. Anybody have expreience with that? Does it work as it is supposed to? Now I'm wondering how to put a quota on how much space client can use on disk, but after much searching haven't come up with an answer. Anybody have any idea how you are supposed to do that? And also, haven't looked into the FTP end of things, as I can't really test that right now on development server, but is it possible to manage FTP accounts solely from command line and editing config files? Whew...I guess that's it for now. Appreicate any input.

Posted by Crucial Web Host, 06-16-2007, 06:03 PM
Yes, of course it is. What do you think we did before the days of cPanel, etc.? All these control panels really do is simplify the job of handing editing a billion config files, which are PRONE to errors when done by hand. But, the short answer to your question is absolutely. In fact - my puritan friends would say it's the ONLY way to do it. But, to be honest with you - you're kindof starting out at the pro level. A lot will be expected of you and your learning curve will be very steep. Don't take this as 'dont do it', just be prepared for a lot of learning. The command line can be very unforgiving. Kindly,

Posted by calabiyau, 06-16-2007, 06:24 PM
I'm just a bit confused about the disk quota issue though. I mean I can limit the size of their folder through CMS and php directory functions when they upload files through the CMS, but how to do it with FTP. Is this a feature of the common FTP servers where you can set these limits or is it done elsewhere through the OS, or perhaps another piece of software? Keep in mind I am many, many months away from even setting it up to host my own website let alone anyone else's.

Posted by Crucial Web Host, 06-16-2007, 06:27 PM
I understand. Sure, quotas are very flexible. There not a feature of any services - but an operating system feature that needs to be enabled per filesystem. http://www.steveo.us/quota.html Also, google is your friend...

Posted by calabiyau, 06-16-2007, 06:43 PM
I googled this one to death believe me and came across a lot of info, but I guess I was looking for a way to assign these quota's based on the virtual host itself. so you actually create a new user for the client...how does this connect to the ftp? when they connect via ftp, do they connect as that user and hence have the limits imposed? am i on the right track with my thinking about this? sorry for the newb questions, but i literally just installed the OS yesterday and took a great big book Red Hat LInux from the library. i guess i'd better install and configure the ftp server. might fill in the blanks a little. thanks for the help.

Posted by Jeff - Exceed, 06-16-2007, 06:47 PM
Check out quota-tools, you can add a user to the config file and it will limit the disk space that user may use. Take a look at mod_bandwidth for your bandwidth issue. These tools should sort you out in regards to user limits. Remember to implement good security rules on the server however. This will take a little time for you to configure and learn, however the end results are beneficial over managing a server with a control panel that you do not know how to administrate from the command line which may be problematic when issues arise.

Posted by Darvil, 06-16-2007, 06:57 PM
Why don't you try like a free panel? Webmin does well in that department. Just in case something happens.

Posted by Jeff - Exceed, 06-16-2007, 07:26 PM
A panel isn't gonna protect you "just in case something happens". Webmins functionality is rather minimal and it is apparently insecure. Best to get dirty with the shell once in a while

Posted by Darvil, 06-16-2007, 07:48 PM
I disagree with that. For me and you it won't be that useful. But for someone who's doesn't have that much shell experience it would come in handy for some situations; say like mysql.

Posted by calabiyau, 06-16-2007, 08:10 PM
Major LOL...no sooner did i try following along the tutorial in the link posted above, rebooted the computer, and get a horrific error message about the file system being messed up and taking away my nice graphical interface leaving me with nothing but the shell. can't remember exact wording of the error. must have done something wrong and thought..oh god, i dont' have a clue what i'm doing, i'll have to reinstall everything...but using my trusty Red Hat book managed to navigate to the fstab file and delete the line i added which seems to have me back to normal again. i followed it to the letter, so i don't know what went wrong. only way to learn i guess.

Posted by Jeff - Exceed, 06-16-2007, 08:33 PM
Use quota-tools. Other usefull links for you are as follows: Apache and PHP on Linux: http://dan.drydog.com/apache2php.html MySQL on RPM Linux distros: http://www.webdevelopersnotes.com/tu..._on_linux.php3 BIND on linux (DNS service) http://www.xenocafe.com/tutorials/dn...dhat-part1.php Mod_bandwidth on Linux (Apache first): http://www.webhostgear.com/158.html Quota tools on RHEL based systems (CentOS, Fedora, Redhat) http://www.savagereactor.co.uk/?page...g/fc/quota.php Edit: Forget about the GUI on Linux servers, it's practically useless. The shell is what you need.

Posted by calabiyau, 06-16-2007, 09:46 PM
Just at looking at these docs for quota tools, I need to have the user's sites on a separate partition if I want to limit them in this way? Just goiong from a default install of Cent OS, I assume everything is on the same partition so that is the reason my attempt did not work? Correct or am I still lost?

Posted by Jeff - Exceed, 06-17-2007, 07:08 AM
Your users files should be under /home so if you were making a directory for "example.com" I'd recommend having this under /home/example.com and having Apache virtual hosts point to it, then configure quota-tools for that directory. For FTP access to that directory simply install pro-ftpd by "yum install proftpd" and to add an FTP and system user type "adduser -u 3000 example -d /home/example.com -s /sbin/nologin", replace "3000" incrementally as you add users as no user can have the same UID, and the home directory and user name and you're good to go. After adding a user you can use it for anything related to that users home directory, including quota-tools.

Posted by calabiyau, 06-17-2007, 01:42 PM
Yes, I see...it's finally starting to come together how this all works, which feels great! so the -s sbin/nologin is a directive to stop them from being able to log in as a regular user through my own secure log in, correct? That limits them to only FTP. Loving this stuff!

Posted by wubwob, 06-17-2007, 04:18 PM
Its pretty much particular that any high volume site does NOT using crap like CPANEL or any other control panel. They are only there so that consumers can have some control over their hosting and hosts can leave them to their own devices. Its not that difficult to create scripts to automate the setup of a website so if you are low volume or catering for clients that DONT need control then yes, ditch the crap.

Posted by Jeff - Exceed, 06-17-2007, 05:25 PM
Nice Setting up a customised LAMP stack is fairly easy, it just takes a bit of patience to get everything right and once it's setup it's a breeze to administer. It's much better as you don't have to rely on control panel updates and customisation of modules on a server with a control panel can break things, the way you're doing it will allow you much more flexability in administering and upgrading the server in future. Regarding your "-s /sbin/nologin" question, you are correct however make sure you use full correct paths as you made a typo, "-s sbin/nologin", it needs to be "-s /sbin/nologin". Such mistakes can cost you in security, so be vigilant when using the command line. Make sure to implement a firewall also, a good one for IPTables is APF, just keep the ports that you need open. Best to check with the various modules you'll be implementing (I.E. MySQL, FTP, SSH, BIND) etc exactly what ports you need incase you forget a vital one. Best of luck Last edited by Jeff - Exceed; 06-17-2007 at 05:38 PM.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Server Lagging (Views: 388)