NSLU2-Linux
view · edit · print · history

Optware.LLMP History

Hide minor edits - Show changes to markup

November 24, 2011, at 12:15 PM by OddballHero -- Plug Additional Packages.
Changed lines 200-201 from:
to:
  • CMSimple - http://www.cmsmadesimple.org/
November 24, 2011, at 12:14 PM by OddballHero -- Plug Additional Packages.
Changed lines 200-201 from:
  • CMS Made Simple - http://www.cmsmadesimple.org/
to:
  • CMSimple? - http://www.cmsmadesimple.org/
  • CMS Made Simple - http://www.cmsimple.org/
Added lines 214-215:
  • Pixie - http://www.getpixie.co.uk/
April 28, 2011, at 01:09 PM by OddballHero -- LLMP for Plug Computers.
Changed lines 200-201 from:
  • CMS Make Simple - http://www.cmsmadesimple.org/
to:
  • CMS Made Simple - http://www.cmsmadesimple.org/
March 22, 2011, at 08:24 AM by OddballHero -- LLMP for Plug Computers.
Added lines 3-4:

(Please be aware that you are responsible for any damage to your hardware, software, or files, so use extreme caution when following guides/instructons on this site. NO warranty is explicitly or implicitly provided. It is assumed that you know what you are doing and if not, get assistance from somebody that does, or do not perform the installation.)

March 22, 2011, at 07:16 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms) (LLMP is in place of LAMP to conserve resources) (Pogoplug specific refers to Pogoplug V1, Pogoplug V2 (gray and pink), Pogoplug Pro, Pogoplug Biz, Seagate devices such as Dockstar and GoFlex?).

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms) (LLMP is in place of LAMP to conserve resources) (Pogoplug specific refers to Pogoplug V1, Pogoplug V2 (gray and pink), Pogoplug Pro, Pogoplug Biz, Seagate devices such as Dockstar and GoFlex).

March 22, 2011, at 07:16 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms) (LLMP is in place of LAMP to conserve resources).

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms) (LLMP is in place of LAMP to conserve resources) (Pogoplug specific refers to Pogoplug V1, Pogoplug V2 (gray and pink), Pogoplug Pro, Pogoplug Biz, Seagate devices such as Dockstar and GoFlex?).

March 11, 2011, at 12:16 AM by OddballHero -- Plug LLMP.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms).

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms) (LLMP is in place of LAMP to conserve resources).

March 10, 2011, at 11:44 AM by OddballHero -- Plug LLMP.
Changed lines 133-134 from:

Test they installation by typing "python2.6", then at the python prompt type "import django" then "print django.get_version()".

to:

Test they installation by typing "python2.6", then at the python prompt type "import django" then "print django.get_version()". Control-d to exit.

March 10, 2011, at 11:42 AM by OddballHero -- Plug LLMP.
Changed lines 146-191 from:
to:

How to use it with Lighttpd "http://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/".

Here is a sample Vhost entry in lighttpd:

$HTTP["host"] == "www.pluggy.com" {
  fastcgi.server = ( "/django.fcgi" =>
                     ( "django" =>
                       (
                         "socket" => "/opt/lib/lighttpd/django-fastcgi.socket",
                         "bin-path" => "/opt/path/to/startfcgi.sh",
                         "check-local" => "disable",
                         "max-procs" => 1,
                       )
                     )
                   )
  alias.url += ( "/media/" => "/opt/path/to/django/media/",
                 "/admin_media/" => "/opt/lib/python2.6/site-packages/django/contrib/admin/media/" )
  url.rewrite-once = ( "^(/media/.*)$" => "$1",
                       "^(/admin_media/.*)$" => "$1",
                       "^(/robots.txt)$" => "$1",
                       "^(/.*)$" => "/django.fcgi$1" )
}

The startfcgi.sh contains:

#!/bin/sh
app_path='/opt/path/to/django/app'
p='/opt/var/run/lighttpd/django-fastcgi.pid'
cd "$app_path"
if [ -f $p ]; then
    kill $(cat -- $p)
    rm -f -- $p
fi

exec /usr/bin/env \
    PYTHONPATH="$app_path/.." python \
    manage.py runfcgi \
    daemonize=false \
    method=prefork \
    maxspare=2 \
    pidfile="$p"
March 10, 2011, at 11:22 AM by OddballHero -- Plug LLMP.
Added line 130:
March 10, 2011, at 11:20 AM by OddballHero -- Plug LLMP.
Added line 135:
Added line 137:
Changed lines 139-141 from:

To listen on all public IPs? (Django only listens to request on localhost by default), use:

to:

To listen on all public IPs (Django only listens to request on localhost by default), use:

Added line 143:
March 10, 2011, at 11:19 AM by OddballHero -- Plug LLMP.
Added lines 127-140:

Django Framework

To install Django and Python:

    Type "ipkg install python26 py26-django"

Test they installation by typing "python2.6", then at the python prompt type "import django" then "print django.get_version()".

By default, the runserver command starts the development server on the internal IP at port 8000. If you want to change the server's port, pass it as a command-line argument. Type this command to start the server on port 8080:

    "python2.6 manage.py runserver 8080"

If you want to change the server's IP, pass it along with the port. To listen on all public IPs? (Django only listens to request on localhost by default), use:

    "python2.6 manage.py runserver 0.0.0.0:8000"

Information for Django is at "http://www.djangoproject.com/".

February 25, 2011, at 07:03 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 141-142 from:
  • MODx? - http://modxcms.com/
to:
  • MODx - http://modxcms.com/
Changed lines 145-147 from:
to:
  • TextPattern - http://www.textpattern.com/
  • WordPress - http://wordpress.org/
February 25, 2011, at 06:58 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 129-147 from:

To be able to access your web site from the internet, you may need to set up a Dynamic DNS updater. If you have a Pogoplug Pro, you may have conflicts with wget and wget-ssl. Just follow the suggestion in the install to place the new wget in /usr/bin and then "ipkg remove wget".

to:

To be able to access your web site from the internet, you may need to set up a Dynamic DNS updater. If you have a Pogoplug Pro, you may have conflicts with wget and wget-ssl. Just follow the suggestion in the install to place the new wget in /usr/bin and then "ipkg remove wget".

Content Management Systems

  • CMS Make Simple - http://www.cmsmadesimple.org/
  • Drupal - http://drupal.org/
  • Joomla - http://www.joomla.org/
  • MediaWiki - http://www.mediawiki.org/wiki/MediaWiki
  • MODx? - http://modxcms.com/
  • Pixelpost - http://www.pixelpost.org/
  • TextPattern? - http://www.textpattern.com/
  • WordPress? - http://wordpress.org/
February 24, 2011, at 10:13 PM by OddballHero -- LLMP for Plug Computers.
Changed line 129 from:

To be able to access your web site from the internet, you may need to set up a Dynamic DNS updater.

to:

To be able to access your web site from the internet, you may need to set up a Dynamic DNS updater. If you have a Pogoplug Pro, you may have conflicts with wget and wget-ssl. Just follow the suggestion in the install to place the new wget in /usr/bin and then "ipkg remove wget".

February 24, 2011, at 10:08 PM by OddballHero -- LLMP for Plug Computers.
Changed lines 125-129 from:

User's Guide is at "http://docs.rubygems.org/read/book/1".

to:

User's Guide is at "http://docs.rubygems.org/read/book/1".

Dynamic DNS

To be able to access your web site from the internet, you may need to set up a Dynamic DNS updater.

February 24, 2011, at 10:58 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms).

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms).

February 24, 2011, at 10:57 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug.

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug (omit Pogoplug specific steps for other platforms).

Changed lines 13-14 from:

2. Configure Lighttpd by editing lighttpd.conf in /opt/etc/lighttpd by typing "cd /opt/etc/lighttpd" and edit lighttpd.conf with your preferred editor (if you use nano, try to invoke it with "nano -w filename" so that long lines are not wrapped). Because Pogoplug based plugs use port 80 for Cloud Engines functionality, a different port such as 8081. You also need to turn on some modules. The web site directory has to be designated.

to:

2. Configure Lighttpd by editing lighttpd.conf in /opt/etc/lighttpd by typing "cd /opt/etc/lighttpd" and edit lighttpd.conf with your preferred editor (if you use nano, try to invoke it with "nano -w filename" so that long lines are not wrapped). Because Pogoplug based plugs use port 80 for Cloud Engines functionality, a different port such as 8081 needs to be used. You also need to turn on some modules. The web site directory has to be designated.

February 24, 2011, at 10:50 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 116-117 from:

Ruby on Rails and RubyGems (credit to Brian Zhou)

to:
February 24, 2011, at 10:48 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 116-117 from:

Ruby on Rails and RubyGems (credit to Brian Zhou)

to:

Ruby on Rails and RubyGems (credit to Brian Zhou)

February 24, 2011, at 10:47 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 116-117 from:

Ruby on Rails and RubyGems (credit to Brian Zhou)

to:

Ruby on Rails and RubyGems (credit to Brian Zhou)

February 24, 2011, at 10:47 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 116-117 from:
to:

Ruby on Rails and RubyGems (credit to Brian Zhou)

Changed lines 121-122 from:
    Type "gem install rails".
to:
    Type "gem install rails --remote --include-dependencies".
    Type "wget http://www.zedshaw.com/downloads/scgi_rails/scgi_rails-0.4.3.gem".
    Type "gem install scgi_rails-0.4.3.gem --include-dependencies".
February 24, 2011, at 10:39 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 118-119 from:

To install Ruby and RubyGems:

    Type "ipkg install ruby rubygems".
to:

To install Ruby on Rails and RubyGems:

    Type "ipkg install rubygems".
February 24, 2011, at 10:33 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 116-118 from:

Ruby on Rails and RubyGems?

To install Ruby and RubyGems?:

to:

Ruby on Rails and RubyGems

To install Ruby and RubyGems:

Changed line 123 from:

User's Guide is at http://docs.rubygems.org/read/book/1.

to:

User's Guide is at "http://docs.rubygems.org/read/book/1".

February 24, 2011, at 10:28 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 1-2 from:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug.

to:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug.

Changed lines 11-12 from:
    Type "ipkg install lighttpd php fcgi php-fcgi mysql phpmyadmin"
to:
    Type "ipkg install lighttpd php fcgi php-fcgi php-pear mysql phpmyadmin"
Added lines 84-85:

You need to initialize pear by typing "pear install DB". Make sure to place "/opt/share/pear" in your php.ini include_path.

Changed lines 112-123 from:

9. Try rebooting your computer to make sure that everything works.

to:

9. Try rebooting your computer to make sure that everything works.

Additional Enhancements

Ruby on Rails and RubyGems?

To install Ruby and RubyGems?:

    Type "ipkg install ruby rubygems".
    Type "gem update --system".
    Type "gem install rails".

User's Guide is at http://docs.rubygems.org/read/book/1.

February 24, 2011, at 09:32 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 84-85 from:
to:
Changed lines 104-105 from:

6. Check to make sure that you can access PHPMyAdmin? by using your web browser with the address "http://your.pogoplug.ipaddress:8081/phpmyadmin/". You are now ready to create databases.

to:

6. Check to make sure that you can access PHPMyAdmin by using your web browser with the address "http://your.pogoplug.ipaddress:8081/phpmyadmin/". You are now ready to create databases.

February 24, 2011, at 09:30 AM by OddballHero -- LLMP for Plug Computers.
Changed lines 92-93 from:
    Next, search for the line $cfg['Servers'][$i]['password'] and fill in your sql root password between the empty quotes without removing them.  Save your changes.
to:

Next, search for the line $cfg['Servers'][$i]['password'] and fill in your sql root password between the empty quotes without removing them. Save your changes.

Changed lines 95-96 from:
    Type "ln -s /opt/share/www/phpmyadmin /default/website/directory/phpmyadmin", where /default/website/directory is the actual one your chose.
to:
    Type "ln -s /opt/share/www/phpmyadmin /default/website/directory/phpmyadmin"

Where /default/website/directory is the actual one your chose.

February 24, 2011, at 09:25 AM by OddballHero -- LLMP for Plug Computers.
Added lines 1-109:

LLMP (Linux, Lighttpd, MySQL, PHP) on a Plug.

Lighttpd

1. Install Lighttpd and PHP after making the root file system accessible and creating /var/run:

    Type "mount -o rw,remount /"
    Type "mv /var /varold".  If you stop using optware, you can restore the old var with "mv /varold /var"
    Type "mkdir /opt/var".  You might not need this if /opt/var already exists.
    Type "mkdir /opt/var/run"
    Type "ln -s /opt/var /var"
    Type "ipkg install lighttpd php fcgi php-fcgi mysql phpmyadmin"

2. Configure Lighttpd by editing lighttpd.conf in /opt/etc/lighttpd by typing "cd /opt/etc/lighttpd" and edit lighttpd.conf with your preferred editor (if you use nano, try to invoke it with "nano -w filename" so that long lines are not wrapped). Because Pogoplug based plugs use port 80 for Cloud Engines functionality, a different port such as 8081. You also need to turn on some modules. The web site directory has to be designated.

Make sure "mod_access", "mod_auth", "mod_fastcgi", and "mod_accesslog" and any other modules you choose are uncommented.

server.modules              = (
#                               "mod_rewrite",
#                               "mod_redirect",
#                               "mod_alias",
                               "mod_access",
#                               "mod_cml",
#                               "mod_trigger_b4_dl",
                               "mod_auth",
#                               "mod_status",
#                               "mod_setenv",
                               "mod_fastcgi",
#                               "mod_proxy",
#                               "mod_simple_vhost",
#                               "mod_evhost",
#                               "mod_userdir",
#                               "mod_cgi",
#                               "mod_compress",
#                               "mod_ssi",
#                               "mod_usertrack",
#                               "mod_expire",
#                               "mod_secdownload",
#                               "mod_rrdtool",
                                "mod_accesslog" )

The default web site directory has to be designated. The default is "/opt/share/www". Change this to your preference.

    server.document-root        = "/opt/share/www/"

The port has to be set and if you are using my.pogoplug.com services, you cannot use port 80. So change the port to 8081 (which is not typically used).

    server.port                = 8081

Save you changes and then type "cd /opt/etc/lighttpd/conf.d" and check if 10-php-fcgi.conf exists. You can verify its contents:

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" =>
                   ( "localhost" =>
                     ( "socket" => "/tmp/php-fcgi.sock",
                       "bin-path" => "/opt/bin/php-fcgi",
                       "max-procs" => 1,
                       "bin-environment" =>
                         ( "PHP_FCGI_CHILDREN" => "2",
                           "PHP_FCGI_MAX_REQUESTS" => "1000" )
                     )
                   )
                 )

3. Test lighttpd by starting it and look for any error messages:

    Type "/opt/etc/init.d/S80lighttpd start"

Fix any errors that show up and try to access it by using your web browser with the address "http://your.pogoplug.ipaddress:8081". You should see the lighttpd default web page.

PHP

You can test php by creating the file "php-info.php" in you web site directory with the contents:

    <html>
    <head>
    <title>PHP Test Page</title>
    </head>
    <body>
    <?php phpinfo(); ?>
    </body>
    </html>

And then accessing it with your web browser with the address "http://your.pogoplug.ipaddress:8081/php-info.php". This should give you the PHP configuration. You may want to rename or remove this file if you do not want other people to know your configuration.

MySQL (with PHPMyAdmin?)

1. Time to set up your MySQL root password which should probably be different from your system password"

    Type "/opt/bin/mysqladmin -u root password 'sqlrootpassword'"

Where sqlrootpassword is the password you chose and should remember because you need it also for the next step.

2. Change to the phpmyadmin directory with "cd /opt/share/www/phpmyadmin" and edit config.inc.php with your favorite editor (if you use nano, make sure you use it as "nano -w filename" which is important here).

    Next, search for the line $cfg['Servers'][$i]['password'] and fill in your sql root password between the empty quotes without removing them.  Save your changes.

3. If you used a different default web site directory other than "/opt/share/www" then phpmyadmin has to be place there. You can do this with a symbolic link"

    Type "ln -s /opt/share/www/phpmyadmin /default/website/directory/phpmyadmin", where /default/website/directory is the actual one your chose.

4. At this point, it is time to start MySQL and fix any errors:

    Type "/opt/etc/init.d/S70mysqld start"

5. Restart Lighttpd:

    Type "/opt/etc/init.d/S80lighttpd restart"

6. Check to make sure that you can access PHPMyAdmin? by using your web browser with the address "http://your.pogoplug.ipaddress:8081/phpmyadmin/". You are now ready to create databases.

7. You can now insert "/opt/etc/init.d/S70mysqld start" and "/opt/etc/init.d/S80lighttpd start" in your rcS or mount_optextX file so they can be called at system start up.

8. You can type "mount -o ro,remount /" to return your root file system to read only.

9. Try rebooting your computer to make sure that everything works.

view · edit · print · history · Last edited by OddballHero.
Originally by OddballHero.
Page last modified on November 24, 2011, at 12:15 PM