hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : VPS Tutorials : Centmin - a low memory CentOS install script
Reply

Forum Jump

Centmin - a low memory CentOS install script

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #61  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Also, just found that my.conf is world writable by default, i'm pretty sure that can't be right, maybe change its permissions after MySQL is setup ?

Sponsored Links
  #62  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
Quote:
Originally Posted by Dregond Rahl View Post
Also, just found that my.conf is world writable by default, i'm pretty sure that can't be right, maybe change its permissions after MySQL is setup ?
It should not be, just checked on a server that we used the script on:

PHP Code:
[root@montreal ~]# ls -la /etc/ | grep my.cnf
-rw-r--r--  1 root root     454 Sep 16 11:13 my.cnf 
Edit: Just noticed you said my.conf - it should be my.cnf, not my.conf - are you sure you did not make a typo when editing things and create the file yourself?

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


Last edited by BTCentral - Ben; 09-21-2010 at 09:32 AM.
  #63  
Old
WHT Addict
 
Join Date: Apr 2010
Posts: 160
Thanks for sharing this script Ill try it out later on my test server

Sponsored Links
  #64  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by BTCentral - Ben View Post
It should not be, just checked on a server that we used the script on:

PHP Code:
[root@montreal ~]# ls -la /etc/ | grep my.cnf
-rw-r--r--  1 root root     454 Sep 16 11:13 my.cnf 
Edit: Just noticed you said my.conf - it should be my.cnf, not my.conf - are you sure you did not make a typo when editing things and create the file yourself?
Actually I made a typo here, sorry. But yes that file had 777 permission, may have been after I installed phpmyadmin. When I was restarting mysqld it gave a warning that its world writable so I checked it. I'll confirm it next time I run the script.

  #65  
Old
Premium Member
 
Join Date: Oct 2003
Location: The Netherlands
Posts: 1,211
Quote:
Originally Posted by Dregond Rahl View Post
I think it would, depending on what is being run, sites running Joomla and WordPress usually work well with Nginx and APC/xCache handling more requests and lowering memory usage per request. I know for sure that APC and xCache properly configured can improve page load times too, that's why with PHP6 they wanted to have APC integrated by default.

There are 100's of benchmarks proving it, but I don't think there has been any recent benchmarks with Nginx + PHP-FPM + xCache/APC on any low end system. I would do it myself if i knew how. haha T.T

Also speaking of WordPress, it seems it won't update, or get plugins unless it has FTP access, so currently trying to configure vsftpd which seems to love to eat memory.
That's generally because the webserver can't write to wordpress_install/wp-content/
Each php-fpm configuration needs to run as the user that owns the wordpress install.

edit: or you could of course give more privileges like 777, but I really recommend you run this as the proper user because it's way more secure in a multiuser setup.

  #66  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
Both PHP-FPM and Nginx run under a user/group created by the script - funnily enough, called nginx.

If the webserver can not write to the directory (as barry suggested - and it sounds like that to me too from what you described) then simply do a:
PHP Code:
chown -R nginx:nginx /home/nginx 
This will set the correct user/group on all the files/folders under it - and hopefully that should sort it out for you.

More updates coming soon, I worked on it a bit a few days back - but have not had the chance to test the changes. Will definitely spend some time on it over the weekend.

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

  #67  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by BTCentral - Ben View Post
Both PHP-FPM and Nginx run under a user/group created by the script - funnily enough, called nginx.

If the webserver can not write to the directory (as barry suggested - and it sounds like that to me too) then simply do a:
PHP Code:
chown -R nginx:nginx /home/nginx 
Hopefully that should sort it out for you.

More updates coming soon, I worked on it a bit a few days back - but have not had the chance to test the changes. Will definitely spend some time on it over the weekend.
It still refuses, its something to do with WP3.0 and being more safer by allowing updates to happen by FTP/SFTP/FTPS i decided ill go with SFTP much easier.

I also did a benchmark of the Nginx setup using

PHP Code:
ab -kc 1000 -n 10000 http://www.domain.info/test.php 
Strangely I found many requests failed:
http://pastebin.com/0kqQq8jd

I tried static images too 'nginx-logo.png' and it had high failed requests too. I looked into the logs and found this error:

PHP Code:
2010/09/24 10:36:33 [crit28301#0: *3180 open() "/home/nginx/domains/domain.info/public/nginx-logo.png" failed (24: Too many open files), client: 199.19.224.168, server: www.domain.info, request: "GET /nginx-logo.png HTTP/1.0", host: "www.domain.info" 
I'm not sure what the problem is.

  #68  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
What version of Nginx are you using? Stable or Devel? Might be a bug (with Nginx).

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

  #69  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by BTCentral - Ben View Post
What version of Nginx are you using? Stable or Devel? Might be a bug.
Stable:

[root@kuro ~]# nginx -v
nginx version: nginx/0.7.67

  #70  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
And are you testing it locally (as in running ab via SSH on your VPS), or on another machine? If the latter it may be connectivity issues between the two.

Just updated the kernel on my test VPS and am waiting for it to reboot, I'll try to do the same and see if I have any failures.

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

  #71  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by BTCentral - Ben View Post
And are you testing it locally (as in running ab via SSH on your VPS), or on another machine? If the latter it may be connectivity issues between the two.

Just updated the kernel on my test VPS and am waiting for it to reboot, I'll try to do the same and see if I have any failures.
SSH(Putty) on my VPS from BuyVM

Edit: doesn't happen with .html files however.


Last edited by Dregond Rahl; 09-24-2010 at 06:46 AM.
  #72  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
Just tried it myself.

PHP Code:
Failed requests:        962
   
(Connect0Length962Exceptions0
I found out why though:

PHP Code:
2010/09/24 12:13:59 [alert1539#0: *20413 socket() failed (24: Too many open files) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /test.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1" 
Note the: (24: Too many open files)

No failures for nginx-logo.png however, perhaps that was a memory constraint?

Edit: Ahha, the magic of Google provided a potential solution .

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


Last edited by BTCentral - Ben; 09-24-2010 at 07:21 AM.
  #73  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Quote:
Originally Posted by BTCentral - Ben View Post
Just tried it myself.

PHP Code:
Failed requests:        962
   
(Connect0Length962Exceptions0
I found out why though:

PHP Code:
2010/09/24 12:13:59 [alert1539#0: *20413 socket() failed (24: Too many open files) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /test.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "127.0.0.1" 
Note the: (24: Too many open files)

No failures for nginx-logo.png however, perhaps that was a memory constraint?

Edit: Ahha, the magic of Google provided a potential solution .

Thanks! i'm trying out the solution right now, will update on if it works.

  #74  
Old
WHT Addict
 
Join Date: Jun 2010
Posts: 100
Well so far:

PHP Code:
[root@kuro ~]# su - nginx
This account is currently not available
So i modified the /etc/security/limits.conf to:

PHP Code:
nginx       soft    nofile   10000
nginx       hard    nofile  30000 
When i rebooted the images were being served fine, then i tired PHP and the socket() error came, after that i tried image again and it started to give errors too. I'm going to reboot again and see if it will help.

  #75  
Old
[ VPS Enthusiast ]
 
Join Date: Nov 2009
Location: Cheltenham, UK
Posts: 1,323
Quote:
Originally Posted by Dregond Rahl View Post
PHP Code:
[root@kuro ~]# su - nginx 
su - nginx will not do anything, reason being that the nginx user is setup with the "/sbin/nologin" shell, therefore you can not use it to login .

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

Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perfect CentOs Server Setup (Low Memory) skoobi2 VPS Hosting 9 07-20-2010 10:16 AM
Looking for a sysadmin - install debian/centos + dtc-xen + dtc/images (centos etc) Ron D Employment / Job Offers 2 06-12-2009 11:31 PM
Script Install service, very low rates! Justin Employment / Job Offers 0 12-17-2006 07:10 PM
centos:apache,php, yum install or source install? cchere Hosting Security and Technology 2 08-29-2006 05:14 PM
How do I install GD on a default CentOS 4.x install? Fabalo.com Hosting Security and Technology 3 02-12-2006 11:43 AM

Related posts from TheWhir.com
Title Type Date Posted
Service Providers Push Updates to Fight OpenSSL Heartbleed Bug Web Hosting News 2014-05-01 08:31:27
Red Hat Takes Active Role in CentOS Project to Drive New Technology Adoption Web Hosting News 2014-01-08 12:00:22
Web Hosting Sales and Promos Roundup - December 6, 2013 Web Hosting News 2014-05-23 15:42:37
OpenStack and the AWS API Debate Web Hosting News 2014-05-09 12:40:29
Solar VPS Becomes Official Mirror for Centos and Ubuntu Web Hosting News 2013-04-16 11:03:34


Tags
centmin, centos install script, centos installation, centos script, mysql, nginx, nginx install, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?