Page 1 of 16 1234 11 ... LastLast
Results 1 to 40 of 603
  1. #1
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323

    Centmin - a low memory CentOS install script

    We're recently been re-working our CentOS install script so that it does the following:

    - Updates any already installed software (via YUM)
    - Secures /tmp (and /var/tmp)
    - Installs a limited selection of development tools (C, C++ compilers, autoconf, automake and pkgconfig)
    - Sets local timezone
    - Installs Nginx, MySQL, PHP 5.3.3 (/w FPM)
    - Installs NSD (DNS Server, alternative to BIND etc.)
    - Installs NTP to sync clock time - though obviously not on OpenVZ VPS (as you can not set the time on OpenVZ)
    - Installs SendMail

    There are a few last tweaks/bugfixes that need to be made, however I was wondering if anyone find this useful when it's done?
    If so, I will put it up on our site - though it will probably be in a day or two.

    For anyone interested, with the above installed and running it's currently using less than 50MB RAM (running CentOS 5.5 32bit on a Xen PV VPS).

    I am happy to announce that Centmin is now publicly available.

    Firstly, make sure that you read the readme.txt
    Secondly, 4 hours and two further revisions later, everything is now working fine.

    You can grab the script from here - enjoy
    Last edited by Quartz; 09-17-2010 at 03:20 PM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  2. #2
    Join Date
    Jun 2010
    Posts
    469
    Sure please share it, I guess it's a reworded LEA Debian script?

  3. #3
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by Kurikami View Post
    Sure please share it, I guess it's a reworded LEA Debian script?
    No, it's actually been made in-house from scratch.

    And in that case I will try to get it finished off either this evening, or tomorrow (depending on my free time) and get it uploaded (with a readme/howto).
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  4. #4
    Join Date
    May 2007
    Location
    God's own country!
    Posts
    654
    I'd love to see it
    SunShell™ Hosting
    Shared, Reseller, Master Reseller,VPS and Dedicated Server Hosting since 2006

  5. #5
    Join Date
    Feb 2004
    Location
    Sacramento CA
    Posts
    3,303
    = ) you know I would fine it useful! Good job Ben.

  6. #6
    Join Date
    Apr 2009
    Location
    inside wht
    Posts
    716
    Is it install The os is a fresh server , or just update an already installed os ?
    24x7 PRO-ACTIVE SERVER MANAGEMENT | OUTSOURCED WEB HOSTING SUPPORT
    Now Available The first Support Brand for Startup Hosting Companies

    Sales : sales @ syslint.com | Skype us : SyslintSkype | Call us : (+91)6007799

  7. #7
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by vcPanel View Post
    Is it install The os is a fresh server , or just update an already installed os ?
    It's something that personally I would normally install on a freshly installed CentOS server, however it can also be run on a server that has already been setup - as you have the option to enable/disable the various software installation options, and answer yes or no to the questions it asks you.

    Obviously for best results it would be used on a minimal CentOS template.

    ---

    I am about to wipe our test VPS and check that v1.0.1 is working properly, if there are not any problems with it this will be the version that is initially released.
    While I spent some time fixing various issues yesterday evening, by the time I had finished it had gone 1am, so did not get round to testing it then.

    This means hopefully assuming everything works OK then I will get the time to write up some documentation for it this evening, if not it should be tomorrow evening this gets uploaded by at the latest.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  8. #8
    Join Date
    May 2008
    Location
    Germany
    Posts
    676
    Thanks a lot for sharing this script Ben!
    CoderJosh | Web Application Developer and Linux Server Admin
    █ Web & Mobile App Coding | Troubleshooting | Tuning | Hardening | SysAdmin Services
    https://www.coderjosh.com/

  9. #9
    Looks like a great script, ill try it out soon. a few questions though

    1. Will this work with CentOS 5.5 ?
    2. whats the RAM usage of this setup?
    3. Any recommended minimal CentOS template?
    4. Any specific reason why you used NSD over BIND ?


    Also I would recommend adding an option for Nginx to choose latest development or stable release.

  10. #10
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by CoderJosh View Post
    Thanks a lot for sharing this script Ben!
    No problem.

    Quote Originally Posted by Dregond Rahl View Post
    Looks like a great script, ill try it out soon. a few questions though

    1. Will this work with CentOS 5.5 ?
    2. whats the RAM usage of this setup?
    3. Any recommended minimal CentOS template?
    4. Any specific reason why you used NSD over BIND ?
    1. Of course - it's been tested on CentOS 5.3, 5.4 and 5.5 (32 and 64bit) - but it should work just fine with all versions of CentOS 5.

    2. Depends on what other services you have running, but on its own, around the 50-60MB RAM mark (it uses 47MB on our Xen PV VPS, where as around 60MB on our OpenVZ VPS in testing) - to disable unneeded services, see here.

    3. OpenVZ (CentOS minimal under Contributed templates), Xen, Dedicated server.
    Alternatively, the following providers I have used have actual minimal templates: ramhost, ThrustVPS, niXcom - I think both Server Complete, and Delimiter do too, but can not remember.

    4. Simple BIND is a memory hog, NSD is not - that and NSD uses BIND zone files (which keeps things simple for me).

    Bind running 12 zones:
    116020 VSZ / 31452 RSS (113.3 MB VSZ/30.7 MB RSS)

    NSD running the same 12 zones:

    VSZ RSS
    14168 924
    21032 852
    14340 628

    (48.3 MB VSZ/2.3 MB RSS overall)

    Where RSS is physical memory used, VSZ being the virtual memory used.


    Quote Originally Posted by Dregond Rahl View Post
    Also I would recommend adding an option for Nginx to choose latest development or stable release.
    Done - v1.0.4 released (grab it here), updated the readme.txt, added "NGINX_VERSION" flag (line 23).
    To use the development version instead simply change it to read: NGINX_VERSION='0.8.50'
    Last edited by BTCentral - Ben; 09-16-2010 at 06:34 AM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  11. #11
    Ben, thanks for contributing this script to the community it looks good.
    Unfortunately in my testing both nginx and nsd were not installed correctly in either 32 or 64 bit test runs. Is it just me or has someone else found the same issue? I can only assume it's due to a missing dependency since you're compiling both?

  12. #12
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by RavC View Post
    Ben, thanks for contributing this script to the community it looks good.
    Unfortunately in my testing both nginx and nsd were not installed correctly in either 32 or 64 bit test runs. Is it just me or has someone else found the same issue? I can only assume it's due to a missing dependency since you're compiling both?
    Hi RavC, thanks for the feedback.

    Any chance getting a log of any of the errors? - I have tried it on multiple VPS providers under both 64bit and 32bit environments so the only thing I can think of that would be causing that is as you said, a missing dependency that for whatever reason is not installed on your templates but on all the other minimal templates I have used.

    If you can provide a log, hopefully we can work out what is missing and add it to the development tools list.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  13. #13
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Meant to say - you can log the script output easily this way:
    source centmin.sh 2>&1 | tee centmin.log

    Thanks!
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  14. #14
    Join Date
    Sep 2010
    Posts
    75
    alot of people can make good use of it, especially the starters.

  15. #15
    Join Date
    May 2007
    Location
    God's own country!
    Posts
    654
    Thank you very much for this contribution. I am playing with nginx/php-fpm/bind since a month and I think this will help me.
    I am going to try this now.


    Any chance you could add mail server ?
    SunShell™ Hosting
    Shared, Reseller, Master Reseller,VPS and Dedicated Server Hosting since 2006

  16. #16
    Thank you sharing the script and making it Gpl.
    Now I feel good for buying some cheap vps. I can try the script easily :-)
    Will let you know how it goes..

  17. #17
    Join Date
    Mar 2008
    Location
    Suffolk, England.
    Posts
    646
    Very, very useful script - thanks a lot for sharing it! Testing it out on a few other servers to test compatibility but so far everything's great!
    NetHosted Ltd. - UK Based Web Hosting
    Like us on Facebook!

  18. #18
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by qualityhostings View Post
    Any chance you could add mail server ?
    I am afraid not at this stage - we want to make sure that it is actually working properly for everyone before thinking about expanding the features of it.

    It's open source though, so if you're up to it - feel free to add one yourself

    Quote Originally Posted by nmridul View Post
    Thank you sharing the script and making it Gpl.
    Now I feel good for buying some cheap vps. I can try the script easily :-)
    Will let you know how it goes..
    Best of luck, hope it helps you out!

    Quote Originally Posted by BretW View Post
    Very, very useful script - thanks a lot for sharing it! Testing it out on a few other servers to test compatibility but so far everything's great!
    No problem, and great to hear - let me know if you run into any bugs (preferably via the contact us form on the website, rather than PM) and I will fix them.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  19. #19
    Quote Originally Posted by BTCentral - Ben View Post
    No problem.



    1. Of course - it's been tested on CentOS 5.3, 5.4 and 5.5 (32 and 64bit) - but it should work just fine with all versions of CentOS 5.

    2. Depends on what other services you have running, but on its own, around the 50-60MB RAM mark (it uses 47MB on our Xen PV VPS, where as around 60MB on our OpenVZ VPS in testing) - to disable unneeded services, see here.

    3. OpenVZ (CentOS minimal under Contributed templates), Xen, Dedicated server.
    Alternatively, the following providers I have used have actual minimal templates: ramhost, ThrustVPS, niXcom - I think both Server Complete, and Delimiter do too, but can not remember.

    4. Simple BIND is a memory hog, NSD is not - that and NSD uses BIND zone files (which keeps things simple for me).

    Bind running 12 zones:
    116020 VSZ / 31452 RSS (113.3 MB VSZ/30.7 MB RSS)

    NSD running the same 12 zones:

    VSZ RSS
    14168 924
    21032 852
    14340 628

    (48.3 MB VSZ/2.3 MB RSS overall)

    Where RSS is physical memory used, VSZ being the virtual memory used.




    Done - v1.0.4 released (grab it here), updated the readme.txt, added "NGINX_VERSION" flag (line 23).
    To use the development version instead simply change it to read: NGINX_VERSION='0.8.50'
    Thanks for the information and the update! ill try it out as soon as I get my test VPS ready.

    Personally I think you should also add a MailServer as suggested if its not too much trouble, maybe even phpmyadmin. Either case once I test it out and i'll give you a report.

    Most of the OpenVZ templates are pretty old, but your script updates the OS so it should work out anyways.

    Thanks for this script, i'm surprised no-one has added something similar to WHT sooner!


  20. #20
    Join Date
    Jun 2010
    Posts
    469
    Quote Originally Posted by Dregond Rahl View Post
    Thanks for the information and the update! ill try it out as soon as I get my test VPS ready.

    Personally I think you should also add a MailServer as suggested if its not too much trouble, maybe even phpmyadmin. Either case once I test it out and i'll give you a report.

    Most of the OpenVZ templates are pretty old, but your script updates the OS so it should work out anyways.

    Thanks for this script, i'm surprised no-one has added something similar to WHT sooner!

    Not a WHT exclusive, but the admin of lowendbox.com has made a good Debian script some time ago.

    http://www.lowendbox.com/blog/wordpr...-lowendscript/

  21. #21
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by RavC View Post
    Ben, thanks for contributing this script to the community it looks good.
    Unfortunately in my testing both nginx and nsd were not installed correctly in either 32 or 64 bit test runs. Is it just me or has someone else found the same issue? I can only assume it's due to a missing dependency since you're compiling both?
    RavC noticed after running the script again it was due to not installing the "make" package - most minimal installs already have this it seems, but not all of them.
    This has now been added to the script, and I have tested it on one of their VPS - everything seems to be working fine now

    Just grab v1.0.5 from here if you're having problems.
    Last edited by BTCentral - Ben; 09-17-2010 at 11:34 AM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  22. #22
    Join Date
    Feb 2004
    Location
    Sacramento CA
    Posts
    3,303
    Ben,

    you and RavC working on something could be dangerous! ; ) As soon as I have time I'm going to try running this on my test accounts.

  23. #23
    Quote Originally Posted by BTCentral - Ben View Post
    RavC noticed after running the script again it was due to not installing the "make" package - most minimal installs already have this it seems, but not all of them.
    This has now been added to the script, and I have tested it on one of their VPS - everything seems to be working fine now

    Just grab v1.0.5 from here if you're having problems.


    I'm probably asking too much, but would it be possible to add further security to this script? like a firewall, folder permissions, securing SSH, rkhunter or something?
    Last edited by Dregond Rahl; 09-17-2010 at 12:56 PM.

  24. #24
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by Dregond Rahl View Post
    I'm probably asking too much, but would it be possible to add further security to this script? like a firewall, folder permissions, securing SSH, rkhunter or something?
    I'm looking for more people to report back on if it actually works for them or not first, but I was planning on adding an option to install CSF (as that is something we use on all our servers) too.
    Securing SSH would not be hard, again that is something we do too. rkhunter? Probably... we don't actually use it, but if it doesn't take too long to implement I don't see why not.

    What exactly would you be looking for in the way of folder permissions? It already secures /tmp and /var/tmp.

    I registered the centmin.com domain yesterday, as I figured it might turn into a larger project (though have not done anything with it yet)
    The only thing I would say right now is, bear in mind this is something I am working on in my spare time.
    Last edited by BTCentral - Ben; 09-17-2010 at 03:16 PM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  25. #25
    Quote Originally Posted by BTCentral - Ben View Post
    I'm looking for more people to report back on if it actually works for them or not first, but I was planning on adding an option to install CSF (as that is something we use on all our servers) too.
    Securing SSH would not be hard, again that is something we do too. rkhunter? Probably... we don't actually use it, but if it doesn't take too long to implement I don't see why not.

    What exactly would you be looking for in the way of folder permissions? It already secures /tmp and /var/tmp.

    I registered the centmin.com domain yesterday, as I figured it might turn into a larger project (though have not done anything with it yet)
    The only thing I would say right now is, bear in mind this is something I am working on in my spare time.
    A good combo would be CSF + LFD (Auto whitelist installing user IP?), maybe logwatch but it needs some configuration. chkrootkit and rkhunter are both rootkit checkers, although not very useful usually it doesn't hurt to configure it to run nightly and send an email to report things.

    I'm not sure about DDos protection as I usually use cPanel/Apache, so not to firmilar with what works with Nginx, however Nginx can handle most attacks.

    Hardening SSH and the mailserver would be good too, as for folder permissions, I think it would be hard configuring SElinux and not sure how much memory it will consume, so better scratch that.

  26. #26
    There is this ELS script that is also GPLed. It hardens the sysctl, disables unwanted services (telnet etc),
    Its way outdated, but you may be able to grab some code directly from there.. or implement some of the features..
    http://www.servermonkeys.com/els.php

    Thanks again for the script, it works..

  27. #27
    can nginx be replaced with Apache? Because sometimes you just can't replace it

    Also, is there any option to choose php versions?
    Last edited by Gary4gar; 09-18-2010 at 03:01 AM.

  28. #28
    Quote Originally Posted by Gary4gar View Post
    can nginx be replaced with Apache? Because sometimes you just can't replace it
    I think this script is mostly for fresh installs rather then finished systems. I mean the script can be done to stup Apache, but I think this is for low memory only and Apache is a memory hog. besides most control panels would do similar.

  29. #29
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by nmridul View Post
    There is this ELS script that is also GPLed. [snipped] http://www.servermonkeys.com/els.php
    Thanks - I will take a look, might give me a few ideas.

    Quote Originally Posted by Gary4gar View Post
    can nginx be replaced with Apache? Because sometimes you just can't replace it

    Also, is there any option to choose php versions?
    No, the whole point in this script is to provide a low memory server environment, and giving Apache as a default option instead would completely defeat the object of the script.
    As for PHP versions, again no - it will always include the latest stable release. PHP 5.2.x is no longer being maintained, which is why I chose to do this.

    If you want to install Apache/whatever version of PHP yourself you can of course. Simply edit the configuration and set NGINX_INSTALL=n and PHP_INSTALL=n to stop them from being installed by default.
    But honestly if you want that, you'd likely just be better off installing cPanel instead.
    Last edited by BTCentral - Ben; 09-18-2010 at 05:39 AM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  30. #30
    Currently installing this on BuyVM with 256 RAM with their default CentOS5.4 32bit template. Lets see how this goes =]

  31. #31
    Quote Originally Posted by Dregond Rahl View Post
    Currently installing this on BuyVM with 256 RAM with their default CentOS5.4 32bit template. Lets see how this goes =]
    PHP Code:
    top 10:57:11 up 27 min,  1 user,  load average0.000.000.00
    Tasks
    :  28 total,   1 running,  27 sleeping,   0 stopped,   0 zombie
    Cpu
    (s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem
    :    524288k total,   165180k used,   359108k free,        0k buffers
    Swap
    :        0k total,        0k used,        0k free,        0k cached

      PID USER      PR  NI  VIRT  RES  SHR S 
    %CPU %MEM    TIME+  COMMAND
        1 root      15   0  2148  656  568 S  0.0  0.1   0
    :00.28 init
     7521 root      15   0  2280 1032  824 R  0.0  0.2   0
    :00.01 top
    26175 root      25   0  5808  724  260 S  0.0  0.1   0
    :00.00 nginx
    26176 nginx     15   0  5952 1400  724 S  0.0  0.3   0
    :00.00 nginx
    26177 nginx     18   0  5952 1076  424 S  0.0  0.2   0
    :00.00 nginx
    26179 nginx     18   0  5952 1076  424 S  0.0  0.2   0
    :00.00 nginx
    26180 nginx     18   0  5952 1068  416 S  0.0  0.2   0
    :00.00 nginx
    28234 root      19  
    -4  2240  556  344 S  0.0  0.1   0:00.00 udevd
    30084 root      15   0  1804  576  476 S  0.0  0.1   0
    :00.00 syslogd
    30116 nsd       18   0  3780  784  536 S  0.0  0.1   0
    :00.00 nsd
    30117 nsd       18   0 10644  736  276 S  0.0  0.1   0
    :00.00 nsd
    30119 nsd       15   0  3836  548  228 S  0.0  0.1   0
    :00.00 nsd
    30129 root      18   0  7180 1064  664 S  0.0  0.2   0
    :00.00 sshd
    30138 root      24   0  2824  840  672 S  0.0  0.2   0
    :00.00 xinetd
    30171 root      19   0  3700 1304 1128 S  0.0  0.2   0
    :00.01 mysqld_safe
    30211 mysql     15   0  134m  17m 3672 S  0.0  3.4   0
    :00.21 mysqld
    30248 root      15   0  9284 1692  684 S  0.0  0.3   0
    :00.01 sendmail
    30256 smmsp     25   0  8236 1508  644 S  0.0  0.3   0
    :00.00 sendmail
    30265 root      18   0 20912 2824  868 S  0.0  0.5   0
    :00.02 php-fpm
    30266 nginx     25   0 20912 2700  740 S  0.0  0.5   0
    :00.00 php-fpm
    30267 nginx     25   0 20912 2700  740 S  0.0  0.5   0
    :00.00 php-fpm
    30268 nginx     25   0 20912 2700  740 S  0.0  0.5   0
    :00.00 php-fpm
    30270 nginx     25   0 20912 2700  740 S  0.0  0.5   0
    :00.00 php-fpm
    30287 root      18   0  4488 1112  564 S  0.0  0.2   0
    :00.00 crond
    30295 root      18   0  5664  712  436 S  0.0  0.1   0
    :00.00 saslauthd
    30296 root      18   0  5664  440  164 S  0.0  0.1   0
    :00.00 saslauthd
    32248 root      15   0 10176 2908 2348 S  0.0  0.6   0
    :00.23 sshd
    32456 root      15   0  3704 1476 1244 S  0.0  0.3   0
    :00.10 bash 

    Need to try it on a min template next, have no clue how to do a custom install so going to need to look it up.

  32. #32
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    If you installed it on their default "CentOS 5 32bit" template then that is a minimal one (I also grabbed one of their VPS - though the 128 / 256 MB plan, as I thought $15/year for something we can setup a tertiary DNS server on is pretty good)

    After running the script (with all the default options) on it:

    PHP Code:
    [root@buyvm ~]# free -m
                 
    total       used       free     shared    buffers     cached
    Mem
    :           256         74        181          0          0          0
    -/+ buffers/cache:         74        181
    Swap
    :            0          0          0 
    The fact that the nodes are obviously on Gigabit connections, and come with IPv6 as standard is pretty nice too.

    PHP Code:
    [root@buyvm ~]# wget http://cachefly.cachefly.net/100mb.test -O /dev/null
    --15:24:18--  http://cachefly.cachefly.net/100mb.test
    Resolving cachefly.cachefly.net... 205.234.175.175
    Connecting to cachefly
    .cachefly.net|205.234.175.175|:80... connected.
    HTTP request sentawaiting response... 200 OK
    Length
    104857600 (100M) [application/octet-stream]
    Saving to: `/dev/null'

    100%[======================================>] 104,857,600 44.9M/s   in 2.2s 
    Last edited by BTCentral - Ben; 09-19-2010 at 07:42 AM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  33. #33
    Quote Originally Posted by BTCentral - Ben View Post
    If you installed it on their default "CentOS 5 32bit" template then that is a minimal one (I also grabbed one of their VMs - though the 128 / 256 MB plan, as I thought $15/year for something I can setup a tertiary DNS server on is pretty good

    After running the script with all the default options on it:

    PHP Code:
    [root@buyvm ~]# free -m
                 
    total       used       free     shared    buffers     cached
    Mem
    :           256         74        181          0          0          0
    -/+ buffers/cache:         74        181
    Swap
    :            0          0          0 

    Strange for me i got:

    PHP Code:
    [root@kuro ~]# free -m
                 
    total       used       free     shared    buffers     cached
    Mem
    :           512        168        343          0          0          0
    -/+ buffers/cache:        168        343
    Swap
    :            0          0          0 

    Not running anything yet at all. Only installed CSF

  34. #34
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    You are definitely on the 32bit template, not 64bit right? (64bit uses more memory). If so, are you using it as a live site? (in which case php-fpm may have spawned more processes, which would increase memory usage).
    Either that or CSF may be using it up? I will install CSF myself later and see what the memory usage is like.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  35. #35
    Quote Originally Posted by BTCentral - Ben View Post
    You are definitely on the 32bit template, not 64bit right? (64bit uses more memory). If so, are you using it as a live site? (in which case php-fpm may have spawned more processes, which would increase memory usage).
    Either that or CSF may be using it up? I will install CSF myself later and see what the memory usage is like.
    its not a live site, so im jsut playing around with things, and trying phpmyadmin using nginx

    http://embernix.com/2010/08/setting-...nx-and-centos/

    no luck so far, I set the directories right and the subdomain. But other than that your script installed just fine !

  36. #36
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,323
    Quote Originally Posted by Dregond Rahl View Post
    Only thing I would say when following that is remember that the paths will be different - nginx directory is /usr/local/nginx/ - vhost configuration is /usr/local/nginx/conf/conf.d/virtual.conf (as per the readme).
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  37. #37
    Quote Originally Posted by BTCentral - Ben View Post
    Only thing I would say when following that is remember that the paths will be different - nginx directory is /usr/local/nginx/ - vhost configuration is /usr/local/nginx/conf/conf.d/virtual.conf (as per the readme).
    yupyup, i did that still not working, but don't worry ill try to figure it out. Right now re-intalling CentOS to make sure it wasn't a problem from before. A lot of people were saying Debian 5 seems to use even less memory like 50MB 32bit plus nginx and WordPress and such. using the script from before for lowendbox. I prefer CentOS tho.

  38. #38
    Quote Originally Posted by Dregond Rahl View Post
    yupyup, i did that still not working, but don't worry ill try to figure it out. Right now re-intalling CentOS to make sure it wasn't a problem from before. A lot of people were saying Debian 5 seems to use even less memory like 50MB 32bit plus nginx and WordPress and such. using the script from before for lowendbox. I prefer CentOS tho.
    Okay just finished a fresh install:

    PHP Code:
    [root@kuro ~]# free -m
                 
    total       used       free     shared    buffers     cached
    Mem
    :           512        152        359          0          0          0
    -/+ buffers/cache:        152        359
    Swap
    :            0          0          0 
    PHP Code:

    [root@kuro ~]# ps -auxf | sort -nr -k 4 | head -10
    Warningbad syntaxperhaps a bogus '-'See /usr/share/doc/procps-3.2.7/FAQ
    mysql     8086  0.0  3.5 136892 18500 
    ?        Sl   13:26   0:00  \/usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock
    root      9420  0.0  0.5  20912  2824 
    ?        Ss   13:26   0:00 php-fpm
    root     24006  0.0  0.5  10016  2868 
    ?        Ss   13:33   0:00  \_ sshdroot@notty
    root     12004  0.0  0.5  10176  2932 
    ?        Ss   13:28   0:00  \_ sshdroot@pts/0
    nginx     9430  0.0  0.5  20912  2700 
    ?        S    13:26   0:00  \_ php-fpm
    nginx     9428  0.0  0.5  20912  2700 
    ?        S    13:26   0:00  \_ php-fpm
    nginx     9425  0.0  0.5  20912  2700 
    ?        S    13:26   0:00  \_ php-fpm
    nginx     9424  0.0  0.5  20912  2700 
    ?        S    13:26   0:00  \_ php-fpm
    root      9360  0.0  0.3   9284  1692 
    ?        Ss   13:26   0:00 sendmailaccepting connections
    smmsp     9385  0.0  0.2   8240  1512 
    ?        Ss   13:26   0:00 sendmailQueue runner@01:00:00 for /var/spool/clientmqueue 
    Last edited by Dregond Rahl; 09-19-2010 at 08:39 AM.

  39. #39
    Join Date
    Apr 2007
    Posts
    3,513
    A great script you have got there, going to test it out on some servers tomorrow, hopefully will save me a lot of time in the long run.

    You should get in contact with OnApp/SolusVM/etc... and get a template created with it on
    - Buying up websites, side-projects and companies - PM Me! -

  40. #40
    Nice!

    Code:
    top - 14:08:57 up  1:04,  1 user,  load average: 0.02, 0.26, 0.29
    Tasks:  27 total,   2 running,  25 sleeping,   0 stopped,   0 zombie
    Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:    262144k total,    76816k used,   185328k free,        0k buffers
    Swap:        0k total,        0k used,        0k free,        0k cached
    Code:
                 total       used       free     shared    buffers     cached
    Mem:           256         74        181          0          0          0
    -/+ buffers/cache:         74        181
    Swap:            0          0          0
    Btw, if I add a domain how do I that? (Sorry noob here). Can I just create a new folder inside "/home/nginx/domains/"?
    Last edited by MarlX; 09-19-2010 at 09:17 AM.

Page 1 of 16 1234 11 ... LastLast

Similar Threads

  1. Perfect CentOs Server Setup (Low Memory)
    By skoobi2 in forum VPS Hosting
    Replies: 9
    Last Post: 07-20-2010, 10:16 AM
  2. Replies: 2
    Last Post: 06-12-2009, 11:31 PM
  3. Script Install service, very low rates!
    By Justin in forum Employment / Job Offers
    Replies: 0
    Last Post: 12-17-2006, 07:10 PM
  4. centos:apache,php, yum install or source install?
    By cchere in forum Hosting Security and Technology
    Replies: 2
    Last Post: 08-29-2006, 05:14 PM
  5. How do I install GD on a default CentOS 4.x install?
    By Fabalo.com in forum Hosting Security and Technology
    Replies: 3
    Last Post: 02-12-2006, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •