[How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

Postby rty » Tue Feb 19, 2013 7:34 am

Just an update....

Using MariaDB I am now able to execute my own PHP script that parses 8000+ lines of a .aiml file and then inserts 5000+ rows into a MySQL table without any problem in less than 30 seconds. Previously with MySQL, this same script would always time out with "Bad Gateway" error whenever the .aiml file contains more than 500 lines. For those who gave up or are turned off by the slow performance of MySQL 5.x, I would recommend giving MariaDb a try.
Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
rty
 
Posts: 75
Joined: Sun Jun 03, 2012 8:57 am
Location: Singapore

Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

Postby winestock » Wed Feb 20, 2013 11:49 pm

$this->bbcode_second_pass_quote('rty', 'J')ust an update....

Using MariaDB I am now able to execute my own PHP script that parses 8000+ lines of a .aiml file and then inserts 5000+ rows into a MySQL table without any problem in less than 30 seconds. Previously with MySQL, this same script would always time out with "Bad Gateway" error whenever the .aiml file contains more than 500 lines. For those who gave up or are turned off by the slow performance of MySQL 5.x, I would recommend giving MariaDb a try.


Glad you were able to get it to work. Are you using the INNODB storage engine? If you are try using the myisam stoarge engine instead. You might be surprised at how quicker access you get. At least that is what I found. Also, with myisam you can probably tweak the memory usage to be lower. The innodb engine uses a fair amount of memory.
$this->bbcode_second_pass_code('', '
default_storage_engine = myisam
')
These two scripts are great at tuning mysql (mariadb) usage:
$this->bbcode_second_pass_code('', '
wget mysqltuner.sh
wget tuning-primer.sh
')
By the way, have you looked at Monkey HTTP yet. The performance is suppose to be faster then Nginx: http://monkey-project.com/benchmarks/ra ... nkey_nginx. I am using it on my PPv4 and it works very well.
Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
winestock
 
Posts: 134
Joined: Mon Nov 05, 2012 12:03 am

Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

Postby rty » Thu Feb 21, 2013 5:42 am

Yes, I am still using the default INNODB engine. I only read about Myisam a couple days ago. Since I am not running any business or mission critical application with it, I can easily switch it to Myisam this weekend. :)

I haven't yet tried Monkey and I am not sure if it will work well with PHP, MySQL and PhpMyAdmin. I guess I'll have to make it as my weekend experiment. :)
Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
rty
 
Posts: 75
Joined: Sun Jun 03, 2012 8:57 am
Location: Singapore

Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

Postby moonman » Thu Feb 21, 2013 6:34 am

Are you using Monkey with php or just plain html
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

Postby winestock » Thu Feb 21, 2013 3:34 pm

$this->bbcode_second_pass_quote('rty', 'Y')es, I am still using the default INNODB engine. I only read about Myisam a couple days ago. Since I am not running any business or mission critical application with it, I can easily switch it to Myisam this weekend. :)

I haven't yet tried Monkey and I am not sure if it will work well with PHP, MySQL and PhpMyAdmin. I guess I'll have to make it as my weekend experiment. :)


Since I am not using PHP with Monkey HTTP, for my purposes, I was curious about using PHP in Monkey HTTP. The FastCGI plug-in needs to be used in order to use PHP: http://lists.monkey-project.com/piperma ... 01725.html.

I have been in contact with one of the developers of Monkey HTTP, Eduardo Silva <edsiper@gmail.com>, and I had a few questions that he answered:
$this->bbcode_list('1')
  • Will FastCGI be experimental in Monkey 1.2? Is FastCGI going to be included as one of the standard plug-in?
    Answer: In Monkey 1.2, FastCGI becomes a stable and standard plugin distributed by default.
  • Does the Monkey HTTP website use Monkey HTTP as a webserver? If so, is PHP being used?
    Answer: Yes, its used for http://monkey-project.com/ and http://duda.io/, but we use NginX for proxy reverse to handle monkey and other stuff that requires Apache.
  • Does Monkey HTTP support embedded in HTML PHP?
    Answer: Through FastCGI, you can do whatever you do with PHP in any web server.
  • Can PhpMyAdmin be used with Monkey running FastCGI?
    Answer: I think it should work without problems.
  • When is Monkey HTTP v1.2 going to be released?
    Answer: 3-4 weeks, we are in the last road of minor changes and improvements.

  • moonman,

    Could you build monkey with the fastcgi plugin and place it in the package repro?
    Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
    winestock
     
    Posts: 134
    Joined: Mon Nov 05, 2012 12:03 am

    Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

    Postby rty » Thu Feb 21, 2013 3:53 pm

    Alarm + Samba + NginX + Php+ MySQL + phpMyAdmin on Raspberry Pi 3, Pogoplug 4, Pogoplug E02, Seagate Goflex Home
    rty
     
    Posts: 75
    Joined: Sun Jun 03, 2012 8:57 am
    Location: Singapore

    Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

    Postby winestock » Thu Feb 21, 2013 5:46 pm

    $this->bbcode_second_pass_quote('rty', 'H')ope this helps:

    http://lists.monkey-project.com/piperma ... 01725.html


    You posted the same link as I did previously.
    Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
    winestock
     
    Posts: 134
    Joined: Mon Nov 05, 2012 12:03 am
    Top

    Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

    Postby moonman » Fri Feb 22, 2013 1:07 am

    Done. Should be built and in repo soon.
    Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
    -----------------------------------------------------------------------------------------------------------------------
    [armv5] Updated U-Boot | [armv5] NAND Rescue System
    moonman
    Developer
     
    Posts: 3387
    Joined: Sat Jan 15, 2011 3:36 am

    Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

    Postby winestock » Fri Feb 22, 2013 2:16 am

    $this->bbcode_second_pass_quote('moonman', 'D')one. Should be built and in repo soon.


    Thanks for doing that.
    Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
    winestock
     
    Posts: 134
    Joined: Mon Nov 05, 2012 12:03 am
    Top

    Re: [How-To]Install Nginx, PHP, MySQL (LEMP) and phpMyAdmin

    Postby winestock » Sat Feb 23, 2013 2:46 am

    $this->bbcode_second_pass_quote('moonman', 'D')one. Should be built and in repo soon.


    There is one small issue that people should be aware when installing monkey http and attempting to "systemctl start monkey". It will fail on you because the directory /var/run/monkey is not getting created. You will need to create the directory with "sudo mkdir /var/run/monkey". Also, it seems that whenever monkey gets updated via pacman, the /var/run/monkey directory is deleted.
    Pogoplug Series 4 / Linux-Kirkwood 3.10.10-2
    winestock
     
    Posts: 134
    Joined: Mon Nov 05, 2012 12:03 am
    Top

    PreviousNext

    Return to Marvell Kirkwood

    Who is online

    Users browsing this forum: No registered users and 2 guests