Native Installers Quick Start Guide

    Overview

    What is a BitNami Stack?

    A BitNami Native Stack Installer includes everything you need to run your BitNami-packaged application of choice. Once downloaded, you can launch it and it will provide a step-by-step wizard. The installation and configuration of all of the software included in the Stack is completely automated, making it easy for everyone, including those who are not very technical, to get them up and running. 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. This means that you don't have to worry about installing any other software on your system to make the new application work. They also won't interfere with any software already installed on your system, so everything you're already running will continue to work normally.

    Features
    • Easy to Install: BitNami Stacks are built with one goal in mind: to make it as easy as possible to install open source software. Our installers completely automate the process of installing and configuring all of the software included in each Stack, so you can have everything up and running in just a few clicks.
    • Independent: BitNami Stacks are completely self-contained, and therefore do not interfere with any software already installed on your system. For example, you can upgrade your system's MySQL or Apache without fear of 'breaking' your BitNami Stack.
    • Integrated: By the time you click the 'finish' button on the installer, the whole stack will be integrated, configured and ready to go.
    • Relocatable: BitNami Stacks can be installed in any directory. This allows you to have multiple instances of the same stack, without them interfering with each other.

     

    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 may want to download a base LAMP, MAMP or WAMP Stack, which will enable you to 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. Our blog post on Modules explains how they work in greater detail.

    To download a BitNami Stack or Module, visit our download page, select the application you want to install and then click on the download link beneath your operating system icon (Windows, Linux, or Mac OS X).

    What is a BitNami module?

    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 

    Installation

    Requirements

    To install BitNami Stacks you will need:

    • Intel x86, Power PC or compatible processor
    • Minimum of 512 MB RAM
    • Minimum of 150 MB hard drive space
    • TCP/IP protocol support
    • Compatible operantig systems:
      • An x86 Linux operating system.
      • A 32-bit Windows operating system such as Windows 2000, XP, Server 2003, Server 2008, Vista or 7.
      • An OS X operating system (Power PC or x86).

    How can I download and install a BitNami Stack?

    The BitNami Stacks is distributed as a binary executable installer. It can be downloaded from: http://bitnami.com/stacks

    The downloaded file will be named something similar to:

    bitnami-application-version-linux-installer.run on Linux or
    bitnami-application-version-windows-installer.exe on Windows or
    bitnami-application-version-osx-x86-installer.dmg on OS X 32-bit,
    bitnami-application-version-osx-x86_64-installer.dmg on OS X 64-bit.

    The same binary file will work on any Linux distribution. On Linux, you will need to give it executable permissions:

    $ chmod 755 bitnami-application-version-linux.run
    

    To begin the installation process, double-click on that file, and you will be greeted by the 'Welcome' screen. Pressing 'Next' will take you to the Component Selection screen, where you can select the phpMyAdmin component.

    How to install a 32 bit stack in a 64 bit operating system?

    BitNami stacks support 32 bit and 64 bit Linux operating systems. You can download any 32 bit or 64 bit stack from http://bitnami.com. We strongly suggest to use the specific version for your operating system architecture. In case you want to install a 32 bit stack in a 64 bit operating system, it is necessary to install the compatibility libraries for your operating system. On Linux distributions based on Debian (Ubuntu, Linux Mint, etc) it is necessary to install the "ia32-libs" package:

    $ sudo apt-get install ia32-libs

    If you are using a distro based on Red Hat (CentOS, Fedora, etc) the required packages are the following:

    $  yum install glibc.i686 libgcc.i686 libstdc++.i686 glibc-devel.i686
     

    How to install phpMyAdmin component?

    phpMyadmin is a tool intended to handle the administration of MySQL database over the web. If you select to install this component, you can access to this application from your browser at 'http://localhost:8080/phpmyadmin' or 'http://localhost/phpmyadmin' by default.

    For security reasons it is password protected and only accessible when using 127.0.0.1 or localhost as the hostname.  The phpMyAdmin administrative user is 'administrator' and the password is the same that you set during the installation.

     

    Where is the installation directory?

    linux_platform.png On Linux: The default installation path will be a folder on your home directory if you are running the installer as a regular user, or "/opt/application-version", if you are running the installation as root.

    win_platform.png On Windows:  The default installation directory is "C:\BitNami\application-version" (In previous versions was "C:\Program Files\BitNami Application Stack")

    mac_platform.png On OS X:  The default installation directory is "/Applications/application-version"

    If the destination directory does not exist, it will be created as part of the installation.
     

    What are the default ports?

    After selecting the installation directory you will be asked for the password to the initial MySQL root and anonymous accounts. This password cannot be empty.  The defaults ports for the main servers are the following:

    - Apache 8080, MySQL 3306, PostgreSQL 5432 and Tomcat 8080. There are some differences depending on the platform:

    linux_platform.png On Linux: If you install the Stack as root user, the default Apache port is 80.

    win_platform.png On Windows: The default Apache port is 80.

    mac_platform.png On OS X: If you install the Stack as root user, the default Apache port is 80.

     

    If the ports are already in use by other applications, you will be prompted for alternate ports to use. Remember that if you plan to run both applications as a regular user you should select port numbers above 1024.

    What are the installation modes?

    There are multiple installation modes:

    • Graphical mode (by default).
    • X-Window: It will be started when the GTK mode is not available or can be explicitly requested with the "--mode xwindow" command line switch.
    • Command line: This installation mode is started by default when a graphical environment is not available or by passing the "--mode text" command line option to the installer.
    • Unattended Installation: It is possible to perform unattended or silent installations using the "--mode unattended" command line option.

    For all modes, you can check all installer options by passing the "--help" command line option to the installer.

     

    What is the directory structure?

    The installation process will create several subfolders under the main installation directory:
                      

    • server and tools: apache2, mysql, postgresql, apache-tomcat, openoffice, subversion, etc.
    • languages: php, python, ruby, tcl, etc.
    • apps/: Application files: phpMyAdmin, drupal, joomla, redmine, etc
    • common/: common libraries.
    • licenses/: Licenses of the components included in LAMPStack.

     

    The application files are under "apps/application_name/htdocs" folder and the config file for Apache server is in "apps/application_name/conf/application_name.conf" file.

    How can I uninstall the Stack?

    As part of the installation, an uninstall program will be created in the installation directory. The uninstallation can also be performed in graphical, text and unattended modes. You can run the uninstaller by double-clicking on the uninstall application or through the command line:

    $ /installdir/uninstall
    

    How can I start or stop the servers?

    Since June 28th 2011, we are including a graphical tool to manage the servers easily. You can find the "manager-windows.exe", "manager-osx" or "manager-linux" tool in the installation directory. Using this tool, you can Start, Stop or Restart the servers. Also you can check the server log messages in the "Application log" tag:

    You can also continue using the script from a Terminal.

    linux_platform.png On Linux:

    To start/stop/restart application on Linux you can use the included "ctlscript.sh" utility, as shown below:

           ./ctlscript.sh (start|stop|restart|status)
           ./ctlscript.sh (start|stop|restart|status) mysql
           ./ctlscript.sh (start|stop|restart|status) apache
           
      start      - start the service(s)
      stop       - stop  the service(s)
      restart    - restart or start the service(s)
      status     - show the status of the service(s)
    

    The server list could vary depending on the required components for each application. Examples:

    $ ./ctlscript.sh restart apache  <- Restart the Apache server
    $ ./ctlscript.sh stop mysql <- Stop the MySQL database
    $ ./ctlscript.sh status <- Status of all servers
    $ ./ctlscript.sh start <- start all servers
    

    win_platform.png On Windows:

    You can start and stop BitNami Stacks using the shortcuts created in the Start Menu, under Programs -> BitNami Application Stack -> BitNami Service

    Another option is to manage the servers from the windows service panel. You can open it at Start -> Execute -> services.msc. The service names are "applicationApache", "applicationMySQL". For instance, the Wordpress services are "wordpressApache" and "wordpressMySQL".

    These services will be automatically started during the boot. If you want to modify this to not start automatically you can do the following: go to the services panel and click with the right button in the application service and select "Properties" -> "Startup Type" -> "Manual".

    mac_platform.png On OS X:
     

    You can also use the "ctlscript.sh" utility which is in the installation directory. You should open a "Terminal" and type the following commands:

    hostame:~ user$ cd /Applications/your_application-*
    hostame:~ user$ ./ctlscript.sh start 

    How can I create a full backup of a Stack?

    Because BitNami stacks are self-contained, the simplest option for performing your backups is to copy or compress the BitNami Stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continously.

    linux_platform.png On Linux and OS X:mac_platform.png

    $ cd installdir
    $ ./ctlscript.sh stop
    $ cp -r installdir application-backup
    

    Or you can create a tarball:

    $ tar -czvf application-backup.tar.gz installdir
    

    Or a zip file:

    $ zip -r application-backup.zip installdir/*

    To restore this backup you only need to uncompress the backup in the same location. It is important to use the same path that was used when the stack was originally installed.

    For example if you have a backup in a Red Hat machine, you can copy it to an Ubuntu Linux machine (a different distro!) in the same location. Then start the servers and that’s all.

    $ cd installdir
    $ ./ctlscript.sh start
    

    You just need to be carefull to keep the same permissions for the files and folders. If you installed as root make sure that in the new machine you copy the files also as root. And this case, if you are also moving MySQL or PostgreSQL, you will need to create those users in the new machine (if they don't exist yet).

    win_platform.png On Windows:

    On Windows, you should follow the same process. Stop the servers using the shortcuts and copy the whole installation directory. To restore the system, copy the directory to a different Windows machine in the same location and follow these steps from a command prompt:

    $ cd installdir
    $ serviceinstall.bat INSTALL
    

    You can access your BitNami Application at the usual URL.

    If you want to create only a database backup, check the following link for MySQL /Components/MySQL#How_to_create_a_database_backup or for PostgreSQL /Components/PostgreSQL#How_to_create_a_database_backup.3f

    How to upgrade a Stack?

    It is strongly recommended that you create a backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

    There are two different ways to upgrade your application.

    1. If you want to upgrade the application and all Stack components PHP, Ruby, MySQL, Apache… You can follow the steps described at How to upgrade the full Stack migrating the data?
    2. In case you only want to upgrade the application code without modifying any other Stack components,  you should follow the guide which is in the application page itself.

    How to upgrade the full Stack migrating the data?

    First, you have to download the new Stack or Virtual Appliance or start a new Amazon Machine Image (AMI) for your platform.

    Stop and uninstall previous Stack services:

    linux_platform.png mac_platform.png On Linux and OS X:

    $ cd installdir
    $ ./ctlscript.sh stop
    

    win_platform.png On Windows:

    $ cd installdir
    $ serviceinstall.bat REMOVE
    

    Install new Stack on a different path, or start the new Virtual Appliance or Amazon Machine Image (AMI).

    Once it has been installed, you should recover the database from the backup. Remember to start the bitnami_console script or the shortcut on Windows before typing the following commands. If the application uses MySQL database:

    $ mysql -u root -p bitnami_application < backup.sql
    

    If the application uses PostgreSQL database:

    $ psql -U postgres bitnami_application < backup.sql
    

    You should also copy any uploaded files and configuration files. It also could be necessary to run migration scripts to update the database. This depends on the application itself.

    Restart the servers and you can access your new Stack version:

    linux_platform.png mac_platform.png On Linux and OS X:

    $ cd installdir
    $ ./ctlscript.sh restart
    

    win_platform.png On Windows:

    $ cd installdir
    $ servicerun.bat STOP
    $ servicerun.bat START
    

    How to change the default page that appears when accessing the installation?

    You can edit the index.html file located at installdir/apache2/htdocs/

    How to migrate the application installed on your machine to your hosting provider?

    If you are considering moving to a hosting provider, you may want to consider BitNami Hosting. It makes it easy to deploy and manage BitNami applications in the cloud. Whether or not you are using BitNami Cloud Hosting, here are the steps to migrate your machine:

    1. Create a backup of the database.

    $ installdir/mysql/bin/mysqldump -u root -p your_database > backup.sql
    

    2. Find the application configuration file and see the database credentials. This depends on the application itself. By default the username is "bitnami" and the passwrod is a random string.

    3. Go to your hosting account and populate the database. If you have full access to the machine you can do the following:

    $ mysql -u root -p
    
    Welcome to MySQL!
    mysql> drop database your_database;
    mysql> create database your_database;
    mysql> grant all privileges on your_database.* to 'database_user'@'localhost' identified by 'database_password';
    mysql> flush privileges
    
    $ mysql -u root -p your_database < backup.sql
    

    4. Copy the application files to your hosting machine. If you have a BitNami LAMPStack in your hosting:

    $ scp -r installdir/apps/your_application user@hosting_machine:installdir/apps
    

    5. Add the following line in the Apache configuration file:

    Include "installdir/apps/your_application/conf/your_application.conf"
    

    6. Check that the path is correct in the "installdir/apps/your_application/conf/your_application.conf" file and restart the Apache server.

    7. maybe you should modify the file privileges. If you have installed the Stack as a root user in your computer you can check the files permissions. If you are running the application for development purposes you can run the following command. Important, do not run this command if you are getting your application into production.

    $ sudo chown -R daemon:daemon installdir/apps/your_application/htdocs

    If you have any problem we will be glad to help you at http://answers.bitnami.com

    How to start automatically the Stack on Linux?

    You can find below how to make the BitNami Stack servers start at boot time. To do that it is necessary to install the main "ctlscript.sh" as a service.  It is important that you installed the Stack as root user and you will need root privileges to do it.

    Debian-like distribution (Debian, Ubuntu, etc)

    1. Copy the installdir/ctlscript.sh file to /etc/init.d . It is advisable to rename this script to something more specific, like “bitnami-drupal”.

    $ sudo cp ${installdir}/ctlscript.sh /etc/init.d/bitnami-drupal
    

    If you have not installed the Stack as root, another approach is to use the following script to copy in the "/etc/init.d" folder. You should replace "user" with the user that installed the stack.

    #!/bin/bash
    su user -c "/your_installdir/ctlscript.sh $@"
     

    2. We will use rc-update.d to add the script to the desired runlevels.

    $ sudo update-rc.d -f bitnami-drupal start 80 2 3 4 5 . stop 30 0 1 6 .
    

    As you can see, we define the priority (80 for start and 30 for stop) and the runlevels in which the script will be executed. The result of this command will be something like

    Adding system startup for /etc/init.d/bitnami-drupal ...
     /etc/rc0.d/K30bitnami-bitnami-drupal -> ../init.d/drupal
     /etc/rc1.d/K30bitnami-bitnami-drupal -> ../init.d/drupal
     /etc/rc6.d/K30bitnami-drupal -> ../init.d/bitnami-drupal
     /etc/rc2.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
     /etc/rc3.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
     /etc/rc4.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
     /etc/rc5.d/S80bitnami-drupal -> ../init.d/bitnami-drupal
    

    And that’s it, the servers will be loaded at boot time. To revert the changes, just type

    $ sudo update-rc.d -f bitnami-drupal remove
    
    RedHat-like distribution (Red Hat, Fedora Core, CentOS, Suse, etc)

    1. Copy the installdir/ctlscript.sh file to /etc/init.d . It is advisable to rename this script to something more specific, like “bitnami-drupal”.

    $ sudo cp ${installdir}/ctlscript.sh /etc/init.d/bitnami-drupal

    If you have not installed the Stack as root, another approach is to use the following script to copy in the "/etc/init.d" folder. You should replace "user" with the user that installed the stack.

    #!/bin/bash
    su user -c "/your_installdir/ctlscript.sh $@"
     

    2. You have to modify the script a little bit to make it work at boot time. Just add the following lines at the beginning of the file

    #!/bin/sh
    #
    # chkconfig: 2345 80 30
    # description: BitNami Service
    

    This means that the script will be executed in runlevels 2, 3, 4 and 5, with priority 80 to start, and 30 to stop.
     

    3. Now, you only need chkconfig to install the script as a service.

    $ sudo chkconfig --add bitnami-drupal

    And you’re done. To revert the changes, we will use chkconfig again

    $ sudo chkconfig --del bitnami-drupal
    

    How to install the Stack on OS X as root?

    To install the Stack as administrator you should click in the .dmg file. Once the disk is mounted in your system, you can open a Terminal and go to the folder:

    $ cd /Volumes/Your BitNami Stack
    

    Then you can run the following command from a Terminal:

    $ sudo ./bitnami-application-version-osx-x86-installer.app/Contents/MacOS/installbuilder.sh
    

    How to start automatically the Stack on OS X?

    On OSX, launchd is the tool for installing services on OS X. launchd is invoked by the kernel while booting the system and takes care of managing the processes, just as init does. To interact with launchd there is a tool called launchctl, which will be used in this tutorial. It is important that you installed the Stack as administrator user and you will need root privileges to do it.

    The daemon scripts are located at /Library/LaunchDaemons. Only the system administrator has the permissions to write there, so take into account that you will need admin rights to follow the next steps.

    Write a properties file (which is a type of file with .plist extension that Apple uses for configuration), in /Library/LaunchDaemons. For example, let’s say we want the Drupal Stack to be started at boot time. We would create the file /Library/LaunchDaemons/com.bitnami-drupal.apache.service.plist. The following example is a script for starting Apache. It is necessary to create a different one for MySQL database.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <dict>
        <key>Label</key> 
      <string>com.bitnami-drupal.services</string>
        <key>ProgramArguments</key>
        <array>
          <string>INSTALLDIR/ctlscript.sh</string>
          <string>start</string>   
          <string>apache</string>    
        </array>
        <key>UserName</key>
        <string>root</string>
        <key>RunAtLoad</key>
        <true/>
    
        <key>OnDemand</key>
        <false/>
      </dict>
    </plist>
    

    Remember to substitute INSTALLDIR with your current installation path! We would create the file /Library/LaunchDaemons/com.bitnami-drupal.mysql.service.plist. In this case it is necessary to specify the command to start the server directly.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>Label</key>
            <string>ctlscript-mysql</string>
            <key>ProgramArguments</key>
            <array>
                    <string>/INSTALLDIR/mysql/bin/mysqld_safe</string>
                    <string>--defaults-file=/INSTALLDIR/mysql/my.cnf</string>
                    <string>--port=3306</string>
                    <string>--socket=/INSTALLDIR/mysql/tmp/mysql.sock</string>
                    <string>--datadir=/INSTALLDIR/mysql/data</string>
                    <string>--log-error=/INSTALLDIR/mysql/data/mysqld.log</string>
                    <string>--pid-file=/INSTALLDIR/mysql/data/${machine_hostname}.pid</string>
           </array>
            <key>RunAtLoad</key>
            <true/>
            <key>UserName</key>
            <string>_mysql</string>
            <key>GroupName</key>
            <string>_mysql</string>
    </dict>
    </plist>
    

    When you reboot the machine, the servers will be automatically started. Man, that was easy! If you prefer not to reboot, just use launchctl tool to start the service

    launchctl load -w /Library/LaunchDaemons/com.bitnami-drupal.service.plist
    

    To uninstall the service, type

    launchctl unload -w /Library/LaunchDaemons/com.bitnami-drupal.service.plist
    

    and delete the properties file

    /Library/LaunchDaemons/com.bitnami-drupal.service.plist

    so that it isn’t launched at boot time.
     

    How to disable auto-start services on Windows?

    By default, Bitnami Installers set the services to be automatically started on startup. But you maybe prefer to avoid this behaviour. In this section, you will learn how to disable auto-start services on Windows.

    First of all, go to your Start menu, and look for services.exe. There, you will find all the services installed in your computer, and you should look for the ones that you want to disable.The Bitnami services are installed with the following kind of name: appnameService. For example, if you have installed Wordpress, you will find the following services:

    • wordpressApache
    • wordpressMySQL

    To disable auto-start, you just need to right-click on the service that you want to be disabled, choose Properties -> Startup Type. This is set to Automatic right now, but you should change it to Manual if you want it not to be auto-started. Try to avoid setting it to Disabled, because if you do so, Windows will not be able to start it and will give some error messages.

    Once you have selected the Startup Type you prefer, click on Apply and Accept, and it will be changed after the next Restart.

    How to install and make public any BitNami Stack?

    In this section we will explain how to deploy any BitNami Stack in your own computer and how to publish and access it from anywhere. In this case, we will create a photo album with Gallery to share your videos and photos directly from your computer, so you can avoid having to upload videos to an unknown server and and be able to save as many photos as your computer has space for.

     

    gallery-screenshot.jpg

     

    To access to your application from anywhere, you need a public IP. Your internet service provider (ISP) will give you this IP when you access to internet. You can check your IP at http://www.whatismyip.com/. The problem with this IP is that it is difficult to remember and your internet provider may change it often.

    To avoid this problem, there are several service providers on the Internet which allow you to associate a name with an IP address. This name is called a “domain name” and the Internet DNS servers are in charge of converting the web page “www.example.com” to a public IP address such as “208.77.188.166”.


    One of the most popular services is dyndns.org. You can get a free account and a domain name similar to this: yourwebpage.dyndns.org. Remember your domain name to give it to your friends :)

     

    dyndns2b.jpg

     

    Now it is time to configure your network. Simplifying things, there are two ways to connect to the Internet: using a modem or a router. If you have a modem, your computer uses the public IP given to you by your Internet service provider so you only can connect one computer to the Internet. If you have a router, you must configure the network so that you can access it from anywhere. The router uses the public IP and gives your computers private IPs, so you can connect several computers to the Internet because the router translates public IPs to private IPs.

    In this case, you need to configure your router to redirect external requests to your server. Normally, the router has a configuration panel where you can modify the properties. You should add a NAT entry (Network Address Translation) to your router so it knows where your server is enabled. For that, you need to know your private IP and the port where is your Stack running (usually 80 or 8080).

    Once you have a DNS and the router configured, install the BitNami platform to run BitNami-packaged applications. Download BitNami AMP Stack for your platform (WAMP for Windows, LAMP for Linux and MAMP for OS X). Once downloaded, double-click on the installer to start the installation wizard, which will ask you a few simple questions and then do all of the installation and configuration for you.

    When the installation finishes, you can access the main BitNami web page at http://127.0.0.1 or at http://yourdns.dyndns.org. It is possible that your router will not let you access it from your own computer using your DNS name. In this case, you can use a free public proxy server to confirm that you can access from other computer to your BitNami Stack. For example, go to www.zend2.com and then write your DNS name. If everything is working properly, you will be able to see your main BitNami web page.

    Now, install the application on BitNami that you would like to run. Be sure to download the Module, rather than the Stack, for the application you want to install. The Module will automatically install and configure the application to run on top of the BitNami Platform that you installed in the previous step. In this case, we have decided to install Gallery to share our photos and videos with friends.

     

    gallery-screen-dyn.jpg

    Three more clicks and that is all – Gallery will be installed, configured and ready to go! To learn how to use Gallery itself, visit the Gallery project website. Do not hesitate to post any question or suggestion in our forums, we will be glad to help you. Enjoy your own video and photo server!

    Tag page (Edit tags)
    Pages that link here
    Page statistics
    496187 view(s), 113 edit(s) and 37861 character(s)

    Comments

    You must login to post a comment.