Web Hosting Talk







View Full Version : Nginx + PHP-FPM + MySQL on CentOS. Works on 64MB RAM.


dmmcintyre3
03-07-2011, 06:04 PM
Run this:
wget http://freevps.us/downloads/nginx-centos.sh
bash nginx-centos.sh

to install nginx, php-fpm and mysql on your CentOS VPS.

RAM usage:
64 bit OpenVZ VPS:
Total Used Free
Kernel: 2048.00M 4.51M 2043.49M
Allocate: 256.00M 69.64M 186.36M (128M Guaranteed)
Commit: 128.00M 30.46M 97.54M (37.3% of Allocated)
32 bit VMWare virtual machine
free -m
total used free shared buffers cached
Mem: 59 54 4 0 1 18
-/+ buffers/cache: 40 18
Swap: 2047 0 2047

32 Bit KVM VPS:
total used free shared buffers cached
Mem: 246 81 165 0 2 46
-/+ buffers/cache: 32 213
Swap: 0 0 0

lxspcby
03-07-2011, 06:56 PM
nice one, will try this shortly after my vps has finished reload :D

no69_2007
03-08-2011, 04:31 AM
I would try niginx this way.

onel0ve
03-09-2011, 08:32 AM
how to create mysql database ???

lxspcby
03-09-2011, 08:41 AM
how to create mysql database ???

you've posted the article about nginx + php + mysql in your blog:

http://smiling-dream.info/latest-stable-version-nginx-0-8-54-with-php-5-3-5.html

but you don't know how to create mysql database? so funny :stickout:

onel0ve
03-09-2011, 08:43 AM
:| that share topic i did not make it

lynxus
03-09-2011, 08:46 AM
how to create mysql database ???

mysql -uroot -pPASSWORD
create database DBname;

Done.

lxspcby
03-09-2011, 08:46 AM
:| that share topic i did not make it

ah, so you're just copying articles from another blog and post it in your blog rite? :stickout:

onel0ve
03-09-2011, 10:26 AM
mysql -uroot -pPASSWORD
create database DBname;

Done.
thanks man
one more question how to park domain
[exp:- i wana park sub1.smiling-dream.info into smiling-dream.info ]

dmmcintyre3
03-13-2011, 03:54 PM
nano /etc/nginx/conf.d/smiling-dream.info.conf

and add it to the end of the server_name line before the ; and then run

service nginx reload

onel0ve
03-14-2011, 12:26 AM
i have been fix it creating another vhost file and config it for same dir
anyway thanks
and if possible give one way to install php 5.2 lots of script yet not capable for 5.3

fshagan
04-08-2011, 05:57 PM
Nice ... I've been playing with this today on a 128MB OpenVZ VPS from BuyVM.

I guess the conf files are in /etc/nginx/conf.d ... is the default.conf file there the main nginx configuration file? The reason I ask is that most of the configuration guides on the 'net say to configure nginx.conf, which I can't seem to find in the usual places cited.

dmmcintyre3
04-09-2011, 11:33 PM
Nice ... I've been playing with this today on a 128MB OpenVZ VPS from BuyVM.

I guess the conf files are in /etc/nginx/conf.d ... is the default.conf file there the main nginx configuration file? The reason I ask is that most of the configuration guides on the 'net say to configure nginx.conf, which I can't seem to find in the usual places cited.

The main config file is /etc/nginx/nginx.conf

newcome11
04-18-2011, 01:21 AM
Cann't install in my fresh install Centos 64 bit. Can you help me?

newcome11
04-18-2011, 02:13 AM
Update info :
CentOS release 5.6 (Final) 64 bit
Kernel Version: 2.6.18-194.el5xen

Thanks

dmmcintyre3
04-18-2011, 08:12 AM
I did make some changes last night, and inbetween saving them and testing it you might have downloaded it. Delete the version you downloaded (rm nginx-centos.sh) and download and run it again.

newcome11
04-18-2011, 12:55 PM
i downloaded the new version, install everything seem fine, but can't get ngix work with php. I tried edit the nginx.conf and the domain added but useless. Can you check again your script?

dmmcintyre3
04-18-2011, 01:02 PM
did you use the script to create the vhost or edit it manually?

newcome11
04-18-2011, 10:08 PM
i use the script, don't work, then try to edit it manually, don't work too :(

dmmcintyre3
04-18-2011, 10:08 PM
are you getting a error message or is it just sending the php to the browser as a download?

newcome11
04-18-2011, 10:15 PM
No error or php file download, just can't access the server via ip or domain (time out or some thing like that, but my server is fine, no down time).

dmmcintyre3
04-18-2011, 10:22 PM
run service nginx start

newcome11
04-18-2011, 10:34 PM
nginx is start, I even tried to reboot the server, restart nginx, restart php, checked with other install script work fine :(

dmmcintyre3
04-18-2011, 10:35 PM
Then it might be iptables. run service iptables stop

newcome11
04-20-2011, 12:36 PM
I tried but no success, thanks for your advice, dmmcintyre3.

newcome11
04-26-2011, 11:08 AM
i install again and try service iptables stop then it worked, thank you very much. But is this command turn the filewall off? is there any security trouble here?

Do we have other solution for this?

Thank you.

dmmcintyre3
04-26-2011, 11:11 AM
It turns off the firewall. If you want to allow port 80 though the firewall, look at this: http://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/

newcome11
04-27-2011, 01:52 PM
Thanks, install csf, allow the port 9000 for nginx then everything is good :D

Lux Newbie
05-18-2011, 11:52 PM
Thank so much for your tutorial. Anyone try to use LNMP - lnmp.org

thomas01155
05-24-2011, 03:52 PM
Does this install the latest version of nginx?
Thanks

dmmcintyre3
05-24-2011, 04:26 PM
Does this install the latest version of nginx?
Thanks

nginx version: nginx/1.0.0

What version it installed depends on what version the epel or webtatic repos have.