Page 2 of 25 FirstFirst 1234512 ... LastLast
Results 26 to 50 of 603
  1. #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..

  2. #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.

  3. #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.

  4. #29
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    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.

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

  6. #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.

  7. #32
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    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.

  8. #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

  9. #34
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    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.

  10. #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 !

  11. #36
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    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.

  12. #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.

  13. #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.

  14. #39
    Join Date
    Apr 2007
    Posts
    3,531
    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
    BotWars.io - Code the AI of your Battle Bot!

  15. #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.

  16. #41
    Quote Originally Posted by MarlX View Post
    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

    Default Nginx version right? if so i think my stats maybe because i installed 0.8.50

  17. #42
    Join Date
    Sep 2010
    Location
    United States
    Posts
    11
    Hello,

    Thank you very much.

    This will come in handy for vps customer's

  18. #43
    Quote Originally Posted by Dregond Rahl View Post
    Default Nginx version right? if so i think my stats maybe because i installed 0.8.50
    I think so, as I did not change anything on the script.

  19. #44
    Join Date
    Aug 2008
    Posts
    81
    great script Ben

  20. #45
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    Quote Originally Posted by iTom View Post
    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
    Any providers/software developers etc. are more than welcome to use this script to create templates for their customers if they wish to, but it's not we are going to be contacting providers/developers about

    Quote Originally Posted by Dregond Rahl View Post
    Default Nginx version right? if so i think my stats maybe because i installed 0.8.50
    Ahh, that could definitely explain the memory differences. I've always been using the stable version in my testing.
    As for your phpMyAdmin issues, are you trying to access it via the IP? If so you could modify the "localhost" section to look like this and then put phpMyAdmin in the /usr/local/nginx/html folder.

    Quote Originally Posted by MarlX View Post
    Btw, if I add a domain how do I that? (Sorry noob here). Can I just create a new folder inside "/home/nginx/domains/"?
    The easiest way would probably be (via SSH):
    PHP Code:
    mkdir -/home/nginx/domains/yourdomain.com/{public,private,log,backup
    (obviously, change yourdomain.com to whatever your domain is - without the www.)

    Uploading your site to the created "public" folder, then duplicating the "demo.com" configuration in /usr/local/nginx/conf/conf.d/virtual.conf for your new domain - in which case your config might look something like this.

    At some point I will likely get round to creating some "addon" scripts to allow you to do things like add new domains to your configuration automatically - just a matter of finding some spare time
    Last edited by BTCentral - Ben; 09-19-2010 at 10:50 AM.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  21. #46
    Quote Originally Posted by BTCentral - Ben View Post
    Uploading your site to the created "public" folder, then duplicating the "demo.com" configuration in /usr/local/nginx/conf/conf.d/virtual.conf for your new domain - in which case your config might look something like this.

    At some point I will likely get round to creating some "addon" scripts to allow you to do things like add new domains to your configuration automatically - just a matter of finding some spare time
    Got it! Thanks!

  22. #47
    Quote Originally Posted by BTCentral - Ben View Post

    Ahh, that could definitely explain the memory differences. I've always been using the stable version in my testing.
    As for your phpMyAdmin issues, are you trying to access it via the IP? If so you could modify the "localhost" section to look like this and then put phpMyAdmin in the /usr/local/nginx/html folder.
    Its quite strange how its using much more memory than the stable one, i guess a lot more features or default modules are being loaded. I'll be trying the stable release on another VPS later.

    Also i found the problem was that I forgot to add the A record to the NSD zone file for the subdomain phpmyadmin.

    PHP Code:
    phpmyadmin        14400    IN    A    192.192.192.192 

    This is what i used for the nginx configuration

    PHP Code:

    server 
    {
            
    listen   80;
            
    server_name phpmyadmin.domain.com;

            
    access_log /home/nginx/domains/domain.com/log/pma.access.log;
            
    error_log /home/nginx/domains/domain.com/log/pma.error.log;

            
    location / {
                
    root   /usr/share/phpMyAdmin;
                
    index  index.php;
            }

            
    location ~ \.php$ {
                
    root           /usr/share/phpMyAdmin;
                
    fastcgi_pass   127.0.0.1:9000;
                
    fastcgi_index  index.php;
                
    fastcgi_param  SCRIPT_FILENAME  /usr/share/phpMyAdmin$fastcgi_script_name;
                
    fastcgi_intercept_errors  on;
                include        /
    usr/local/nginx/conf/fastcgi_params;
            }

    Also I found it strange that yum installs phpmyadmin now as phpMyAdmin which for some reason had a little trouble with Nginx unless it was specific that some words were in CAPS. But its easy to setup so it would be good to add it to centmin script.

    CSF however is not too easy to configure, at least i'm not sure what im doing. need to find tutorials on it. It really feels more suited for cPanel.
    Last edited by Dregond Rahl; 09-19-2010 at 02:36 PM.

  23. #48
    Join Date
    Nov 2009
    Location
    Cheltenham, UK
    Posts
    1,416
    Quote Originally Posted by Dregond Rahl View Post
    Also I found it strange that yum installs phpmyadmin now as phpMyAdmin which for some reason had a little trouble with Nginx unless it was specific that some words were in CAPS. But its easy to setup so it would be good to add it to centmin script.

    CSF however is not too easy to configure, at least i'm not sure what im doing. need to find tutorials on it. It really feels more suited for cPanel.
    You can install phpMyAdmin through yum? Must admit I did not know that - I have always downloaded and installed it manually.
    And yes, webservers are generally case sensitive (at least on Linux, Mac etc. - not always the case on Windows).

    CSF is pretty easy to configure when you know what you are doing, when I get the chance to look into adding that I will be sure to provide a default configuration that is suitable for most people.
    Ben Thomas, Director - BTCentral Web Development Services
    http://www.btcentral.org.uk - Need a custom Web App? Visit us online.

  24. #49
    Quote Originally Posted by BTCentral - Ben View Post
    You can install phpMyAdmin through yum? Must admit I did not know that - I have always downloaded and installed it manually.
    And yes, webservers are generally case sensitive (at least on Linux, Mac etc. - not always the case on Windows).

    CSF is pretty easy to configure when you know what you are doing, when I get the chance to look into adding that I will be sure to provide a default configuration that is suitable for most people.
    Yeah I was pretty surprised too!

    PHP Code:
    yum install phpmyadmin 
    And that's it, it installs everything and just asks confirmation on password I think.

  25. #50
    Join Date
    Oct 2003
    Location
    The Netherlands
    Posts
    1,270
    Nice work, installing this on a test machine.

    While my goal is usually not minimal memory consumption, I have been toying with a lot of the same components and am looking to do a form of shared hosting using Nginx.

    Also a vote for CSF or maybe we can make a "hook" script that is called by your script to add extra actions during certain points of your script?

Page 2 of 25 FirstFirst 1234512 ... 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
  •