Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How to install PHP5 and Nginx in a 32MB VPS?

WorldWorld Veteran
edited December 2013 in General

Hello,i want to install PHP5 and Nginx in a 32MB VPS,but i don't know how to install them.
EDIT:Only need install PHP5 and Nginx.

Comments

  • There was a script and even a guide in LEB wiki, now it looks all messed up..

    http://wiki.lowendbox.com/

  • sudo apt-get get install nginx php5-fpm
    
  • WorldWorld Veteran
    edited December 2013

    @budi1413 said:

    > sudo apt-get get install nginx php5-fpm
    > 

    EDIT:And then,how to do?Install nginx and php5-fpm done,and then i can use PHP with Nginx?Don't any set?
    Sorry for bad English.

  • yes ub debian, but you have to fine tune the config files of fpm. Otherwise you will have memory issues

  • @praveenbhat said:
    yes ub debian, but you have to fine tune the config files of fpm. Otherwise you will have memory issues

    How to config?

  • # wget http://www.dotdeb.org/dotdeb.gpg 
    # cat dotdeb.gpg | apt-key add -
    # apt-get update -y && apt-get upgrade -y
    # apt-get -t squeeze-backports install nginx-extras
    # apt-get install php5 php5-fpm php5-common php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-memcache php5-mysql php5-pspell php5-snmp php5-sqlite php5-xmlrpc php5-xsl php-pear libssh2-php php5-cli
    # /etc/init.d/nginx start
    # /etc/init.d/php5-fpm restart
    
  • @Edo said:
    Sorry for bad English.

    You have to config the nginx.conf for using php-fpm . Also the php-fpm.conf have to be configured . Adding a new config file for your website whatever you want .

    Then /etc/init.d/nginx restart for restarting nginx and /etc/init.d/php5-fpm restart for restarting php-fpm .

    If you have problems use google there are many tutorials about this .

  • Edo said: How to config?

    Google "configure php5-fpm"; "How to config?" is too much generic, IMO, to receive an answer.
    "How can I fine tune it for a 32mb vps?" require at least to know how to configure it.

  • budi1413budi1413 Veteran
    edited December 2013

    Edo said: EDIT:And then,how to do?Install nginx and php5-fpm done,and then i can use PHP with Nginx?Don't any set? Sorry for bad English.

    Here you go. Just don't install MariaDB.

    http://lowendbox.com/blog/an-introduction-to-nginx-php-fpm-and-mariadb-on-ubuntu/

    And additional config

    nano /etc/php5/fpm/pool.d/www.conf

    pm = dynamic
    pm.start_servers = 1
    pm.max_children = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 2
    

    service php5-fpm restart

  • http://32mb.org

    Have a look at that site, maybe you can try minstall too

  • budi1413budi1413 Veteran
    edited December 2013

    Also

    nano /etc/nginx/nginx.conf

    Change the "number of worker" with the number of your vps cpu core.

  • Yeah as budi1413 said even Nginx workers has to be reduced. I think that would be 1 anyhow.

  • I would recommend you to use minstall, and auto-config it for minimal use but you can't host "big" php scripts like wordpress with 32mb ram.

  • take a look at this site: http://32mb.org/

Sign In or Register to comment.