Personal tools
     DOCUMENTATION

Appliance:LAMP Appliance

From rPath Wiki

Jump to: navigation, search

Contents

float

The LAMP Appliance brings the best of breed Web application tools together in one easily-deployable form factor. From the Apache Web server, to your choice of databases (MySQL and PostgreSQL), to the three preeminent scripting languages (Perl, PHP, and Python), the Linux-based LAMP Appliance gives you the foundation for the database-backend Web application of your choice.




Image:Bulbgraph.png   The LAMP Appliance is suitable for developers who are familiar with the various component tools - including Apache, MySQL or PostgreSQL and one of the three development languages. It is not a pre-built-appliance that "does" everything out of the box other than start Apache. You must add your own application code and content.
Image:Bulbgraph.png   The content of this appliance can also be used as the "base" for a number of "mashup" appliances built on the LAMP stack via the rBuilder Online service. See the MediaWiki appliance for an example.

Download

Download page on rBuilder Online.

Installation

The fastest way to get started is to download one of the virtual appliance images and boot it. Alternatively, you can download the ISO images and complete the graphical installation to install the LAMP appliance on a dedicated system.

Image:Bulbgraph.png   Note: For more information on using rPath-based appliances with various virtual machine technologies, see Using rBuilder Images with Virtual Machines

Configuration

  • Once you've booted your appliance, use the IP address displayed in the rPath Platform Agent's console to login to the Agent's web interface. Use admin and password as your initial credentials and complete the wizard. The IP for the agent should be https://<your_ip>:8003/ or http://<your_ip>:8004/.
  • Set a new password for the web account, as it will be used to access your site by ftp/sftp and to access the web-interface to your databases.
  • If you need a database, configure one as described below.
  • sftp or ftp your content using the user name web and the password you set in the Agent's wizard.
  • The Apache service (httpd) starts automatically upon first boot, and no additional configuration is required.

Configuring MySQL

  • Point your browser to http://<your_ip>/phpMyAdmin/, and login with the user name web and the password you set in the Agent's wizard.

Configuring PostgreSQL

  • Point your browser to http://<your_ip>/phpPgAdmin/, login with the user name web and the password you set in the Agent's wizard.
  • After logging in, you will need to login to PostgreSQL with user name postgres and a blank password.

Installed services and tools

  • Apache 2.0.59
  • PHP 5.2.2, including gd, iconv, ldap, mysql, openssl, pgsql, xml/xmlrpc extensions
  • Perl 5.8.7, including DBI, HTML::Parser, XML, libwww, libxml modules
  • Python 2.4, including mod_python 3.1.4
  • MySQL 5.0.x
  • PostgreSQL 8.0
  • openssh, including sftp/scp support
  • vsftpd 2.0.3
  • sendmail 8.13.7
  • bind (named) 9.3.2_P1 *
  • snmpd 5.2.1.2 *
Image:Bulbgraph.png   * These services are not started by default and can be managed using the Agent's Manage Services plugin.

Administration

While this appliance is designed to be self-contained and requires minimal maintenance, some basic administrative tasks that you may want to perform are documented below:

Configure networking

By default, this appliance is set to use DHCP to obtain its network address automatically.

To change the network configuration for this appliance, you can use the Agent's Networking configuration plugin. See the rPath Appliance Platform User Guide for detailed instructions.

Passwords

purpose username default password how to change
console access root empty
  • either use the Agent's Root Password plugin to change the root user's password
  • or execute the following command in the console: passwd root
Agent access admin password
  • use the Agent's Change Password plugin to change the admin user's password
website access,
phpMyAdmin/phpPgAdmin access
web not set
  • execute the following command in the console: passwd web
ftp web needs to be set
  • execute the following command in the console: passwd web
MySQL super-user root empty do not change since this user can access MySQL from localhost only and is used by phpMyAdmin
PostgreSQL super-user postgres empty use the phpPgAdmin web-interface or psql commandline to manage the PostgreSQL users

Accessing your site

You site resides in the /srv/www/html directory on your appliance. You can upload files to this directory with the ftp, sftp or scp commands using the web user's credentials. Newly uploaded files and directories are owned by the web user and apache group.

CGI scripts reside in /srv/www/cgi-bin directory on your appliance.

PHP scripts should have .php extensions.

Security Tips

  • Use secure https protocol instead of plain http to access the Agent's web interface, phpMyAdmin and phpPgAdmin.
  • If an application's installation guide asks you to make a file or directory world-writable, you can actually make it group-writable with the ftp client.

Updating your appliance using the rPath Platform Agent

Unlike many other so-called software appliances based on "snapshot" techniques, rPath appliances have built-in the capability to be incrementally updated as new features are added by the development team. Updating your appliance is as simple as login to the web based Agent's interface and using the Update plugin.

See the rPath Appliance Platform User Guide for full instructions.

   Please note that if you have added additional packages using the conary command via the command line, these packages will be removed by the Agent's update function. To preserve your customization of the appliance software, do not use the Agent. Instead, use the conary updateall command via the command line as discussed below. Alternatively, you can change the Agent's default behavior by modifying the /etc/raa/prod.cfg file and changing the line updatetroves.migrate = True to updatetroves.migrate = False

Updating without using rAA

If you have downloaded an earlier release, don't download a new appliance! Instead, login to your appliance as root via the console and issue the command:

conary updateall

This will grab the latest changes for you. If you have customized the appliance software by adding any additional packages using conary, these will be preserved.

Support

LAMP Appliance is a community supported project. Questions about LAMP Appliance should be raised on the LAMP Appliance discussion list

You can also discuss the project using the discussion tab in this wiki.

Developers