BitNami AMP Stacks

    BitNami AMP Stacks greatly simplify the development and deployment of PHP applications. A BitNami stack is a preconfigured environment that is available as native installers, virtual machines and cloud images . AMP stands for Apache-MySQL-PHP and is the generic name for platform specific stacks, as described below. 

    How do I download and install AMP Stack?

    The name of the Stack depends on the platform. It is called WAMP for Windows, MAMP for OS X and LAMP for Linux. You can download the specific stack for your operating system at the following links:

    wampstack-stack-icon.png  mampstack-stack-icon.png  lampstack-stack-icon.png

     

     

     

     

    If you are interested in working with the PostgreSQL database instead of MySQL, there are also Stacks available that include PostgreSQL in place of MySQL:

    wappstack-stack-icon.png  mappstack-stack-icon.png  lappstack-stack-icon.png

     

     

     

     

    Which components are installed with AMP Stacks?

    The BitNami AMP Stack ships the components listed below. If you want to know which specific version of each component is bundled in the stack you are downloading, check the README.txt file in the download page or in the Stack installation directory. You can also find more information about each component using the links below.

    Main components:

    • PHP scripting languange
    • Apache Web server
    • MySQL database server
    • phpMyAdmin web application management tool for MySQL database
    • PostgreSQL database sever (optional)
    • phpPgAdmin web application management tool for PostgreSQL (optional)

    Optional frameworks for development:

    Dependencies and additional components:

    • Varnish proxy cache server
    • ImageMagick tool
    • SQLite database
    • ModSecurity module
    • XDebug module
    • Xcache module
    • OAuth module
    • Memcache module
    • FastCGI module
    • APC module
    • GD library
    • OpenSSL library
    • CURL library
    • OpenLDAP library
    • PEAR and PECL package manager tools

    How do I log in into my virtual machine or AMI?

    BitNami AMP Stacks can also be deployed as virtual machines. If you are using the virtual machine, please see our Virtual Appliances documentation for instructions on logging into the machine.

    The Stacks can be also deployed as AMIs in the Amazon cloud. Please take a look at our Amazon Cloud Images quick guide to see how to connect to the instance from your machine.

    BitNami AMP Stacks are distributed free of charge under the Apache 2.0 license.

    What is the default installation directory?

    When using native installers the default installation directory depends on the platform and can be changed during the installation:

    win_platform.png On Windows: C:\BitNami\wampstack-VERSION (On previous versions, the default installation directory was C:\Program Files\BitNami WAMP Stack)

    mac_platform.png On OS X: /Applications/mampstack-VERSION

    linux_platform.png On Linux: /home/user/lampstack-VERSION

    If you are using a virtual machine or the AMI, the default installation directory is "/opt/bitnami".

    How do I start and stop the servers?

    Each AMP Stack ships several servers that must be started before you will be able to work with them. By default, MySQL database and Apache servers are started after the installation.

    Graphical tool

    The Stacks include a graphical tool to manage the servers easily. You can find the "manager-windows.exe", "manager-osx" or "manager-linux" tool in your installation directory. Using this tool, you can Start, Stop or Restart the servers and check the log files. You can click on the icon to start it.

    manager-servers.png

     

    manager-osx.png

     

     

     

     

     

     

     

     

     


    win_platform.png

    On Windows: You can also start the Manager tool from shortcuts: Start -> Program Files -> BitNami Stack -> Manager tool

    Command line tool

    If you prefer, you can use the "ctlscript.sh" utility from the command line. This script is in the installation directory.

    linux_platform.png

    On Virtual Machines and Cloud images:

    $ sudo /opt/bitnami/ctlscript.sh start

    A native installer on Linux:

    $ cd ~/application-version
    $ ./ctlscript.sh start
    

    mac_platform.png

     

    On OS X: You can start the Manager tool from the installation directory or you can use the "ctlscript.sh" utility from a Terminal.

    host:~ user$ cd /Applications/application-version
    host:~ user$ ./ctlscript.sh start

    How can I check the PHP configuration with phpinfo?

    Once the installation or deployment finishes, you can access the welcome page from your browser. If you have installed the stack on a local machine as a regular user, you can access it at http://localhost on Windows or http://localhost:8080 on OS X and Linux. If not, you can specify the IP address of the server where you installed the Stack.

    You should see something similar to this page:

    welcome-lamp.png

     

    In recent versions of AMP Stacks, there is a "docs" folder in the installation directory that contains some PHP examples. There is a "phpinfo.php" script file that shows the current PHP configuration and is typically used to check that PHP was installed correctly. In order to be able to access it, you first need to place it in a publicly accessible location. Copy the installdir/docs/phpinfo.php file into the installdir/apache2/htdocs folder and go to your browser to check the enabled PHP modules. by accessing http://localhost/phpinfo.php (or http://localhost:8080/phpinfo.php if running in port 8080) You should see something similar to this page:

    phpinfo.png

    How can I add applications on top of AMP?

    BitNami Native Installers come in two formats: stand-alone Stacks and Modules. If you only want to install one BitNami-packaged application, then just download and install the Stack. It will contain everything you need to run the application.

    If you want to run more than one application, you can install several application Modules on top of it. That way, all of the BitNami-packaged applications you want to run will share a single instance of Apache, MySQL and PHP, which will save space and improve performance.

    nuevo_php_stacks.jpg 

    You can download and install any PHP-based BitNami application (For example: WordPress, Joomla!, Drupal, SugarCRM...) on top of an existing BitNami AMP stack deployment. Depending on your platform, you can download modules from:

    WAMP: http://bitnami.com/stack/wamp/modules

    LAMP: http://bitnami.com/stack/lamp/modules

    MAMP: http://bitnami.com/stack/mamp/modules

    Once you have downloaded the module, click on it to start the installation process. During the installation process, you will need to specify the  installation directory of your installed AMP stack. If you are using the virtual machine or AMI, the default installation directory is "/opt/bitnami".

    module-installdir.png

    You will also need to specify the MySQL root password. This password is the same as the one that you specified in your AMP installation. If you are using the virtual machine or AMIs, the default password is "bitnami".

    module-password.png

    After the installation process is complete, you can access the installed application from your browser. For example, if you have installed WordPress, you can access it at http://localhost/wordpress on Windows or http://localhost:8080/wordpress on OS X or Linux. Substitute localhost for the right IP address or domain name if you are using a virtual machine or cloud server. The username and password is specified during the installation of the module. You will see something similar to:

    module-link.png

    If you are using a BitNami AMP Stack in a machine without a graphical interface, you can run the module installer in text mode. You can use the following command to download and install any BitNami module from the command line:

    $ wget http://bitnami.com/... (Link to the module)
    $ chmod 755 bitnami-*
    $ ./bitnami-*
    

    What are the "development" and "production" modes?

    Some applications are able to be configured in different ways:

    - Production:  File permissions and configuration settings will be set with security and performance in mind. Installing certain plugins, themes and updates may require manual changes or installing additional services like FTP.  Recommended if this stack will be deployed on a public server.

    We configured applications using the "production" mode for Bitnami Virtual Machines and Cloud Images by default. These servers already include a local FTP server (vsftpd) that it is only available for local connections (not remote connections). Some applications like WordPress, Joomla!, Magento or Drupal are configured to use this server to download and install plugins, themes or any extension.

    If you install a module or a stack and you select the "production" mode, these applications will request a FTP account in order to download any extension. If you already have configured a FTP server in your machine you can use this mode.

    - Development: Enables changes to file permissions and configuration settings that make it easy to install plugins, themes and updates for certain applications, but that are not optimal from a security standpoint. Recommended if you are using this stack for development purposes or within your company.

    If you want to develop locally, this mode is easier for you so do not want to worry about permissions in your installation.

    How can I create a custom PHP application?

    Many users run BitNami AMP stacks as development environments for their own PHP projects (as opposed to running third-party applications such as Joomla! or WordPress). If you want your PHP application to be accessible at the root URL ( http://localhost/ ), you can simply copy your PHP files into the installdir/apache2/htdocs folder. For an example, take a look at phpinfo.

    If you want to have several applications running on top of AMP Stack, we suggest that you create the same structure that we use when installing BitNami PHP applications. Recent versions of AMP Stack ship a demo application with this structure that can help you get started. Simply copy the installdir/docs/demo folder into the installdir/apps directory and add the following line at the end of the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf file:

    Include "installdir/apps/demo/conf/httpd-prefix.conf"
    

     

    Substitute installdir with the actual installation directory for your deployment.

    Once you are done with the above, restart the Apache server. If you are running the stack in your desktop or laptop, you can use the bundled graphical Manager tool that is included in your installation directory.

    You should be able to access the demo application at http://localhost/demo or http://localhost:8080/demo. You should see a "Hello world" message in your browser.

    You can learn more about the BitNami PHP application structure here.

    How can I access phpMyAdmin or phpPgAdmin?

    phpMyAdmin and phpPgAdmin are popular web-based management tools for the MySQL and PostgreSQL databases.

    phpMyAdmin and phpPgAdmin

    How can I run a command in the AMP Stack?

    All of the Native Installers for BitNami Stacks are completely self-contained and run independently of the rest of the software or libraries installed on your system. To work correctly, certain environment variables need to be set when you want to invoke commands to access different binaries, as explained below. Note that in virtual machines or AMIs, the environment is already loaded for the "bitnami" user automatically and the below is not necessary.

    BitNami console is a script to load the Stack environment. This console is useful to run any command included in the Stack: mysql, php, openssl, ruby, rake among others. 

    linux_platform.png On Linux:

    $ cd installdir
    $ ./use_application
    

    For instance, in Wordpress Stack:

    $ cd /opt/wordpress-3.0
    $ ./use_wordpress
    

    win_platform.png On Windows:

    There is a shortcut in Start -> BitNami Application Stack -> "Application console" or "Use Application Stack"

    mac_platform.png On OS X:

    Open a Terminal and type the following:

    hostname:~ user$ cd /Applications/application-version
    hostname:~ user$ ./use_application
    

    For instance, in Wordpress Stack:

    hostname:~ user$ cd /Applications/wordpress-3.0
    hostname:~ user$ ./use_wordpress
    

    Note: If you are using BitNami Cloud Hosting, a virtual machine or a Cloud image the Stack environment is loaded by default and you don't need to start the console.

    How to run a system command without the stack environment?

    Bitnami stacks ship all the requirements and libraries necessary for deploying a web application. All the binaries in the stack are linked to these libraries and they require to use that version. It is usual the same libraries but different version are already installed in your system, f.e. libjpeg.so or libpng.so. 

    If you want to run a system command that is not included in the stack, it is possible that this binary requires to use the system library instead of the stack library version. It is possible you see a similar error like the following:

    Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /opt/local/lib/libJPEG.dylib

    or

    Can't load '/opt/bitnami/perl/lib/5.8.8/x86_64-linux/auto/File/Glob/Glob.so' for module File::Glob: /opt/bitnami/perl/lib/5.8.8/x86_64-linux/auto/File/Glob/Glob.so: undefined symbol: PL_sv_undef at /opt/bitnami/perl/lib/5.8.8/x86_64-linux/XSLoader.pm line 70.

    In this case it is useful to run the command using "env -i" to clear the environment. For example, if you want to run a system command from a PHP application (f.e. "sendmail"):

    sendmail_path = "env -i /usr/sbin/sendmail -t -i"

     


     

    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    648892 view(s), 38 edit(s) and 16839 character(s)

    Comments

    You must login to post a comment.