Frequently Asked Questions (Linux)

What is a Bitnami native installer?

A Bitnami native 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 Bitnami native installers 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.

What is the difference between a Bitnami stack and a Bitnami module?

Bitnami installations 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 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.

To download a Bitnami stack or module, visit the Bitnami download page, select the application you want to install and then click on the download link for your operating system icon (Windows, Linux, or Mac OS X).

What are the system requirements for native installers?

To install a Bitnami stack using a native installer, you will need:

  • Intel x86 or compatible processor
  • Minimum of 512 MB RAM for PHP and Python applications and 1024 MB RAM for Ruby and Java applications.
  • Minimum of 150 MB hard drive space
  • TCP/IP protocol support
  • One of the following compatible operating systems:
    • A Linux operating system.
    • A Windows operating system such as Windows Server 2008, Windows Server 2012, Vista, Windows 7, Windows 8 or Windows 10.
    • An OS X operating system.

How to download and install a Bitnami stack?

Native installers for Bitnami stacks are distributed as binary executables. They can be downloaded from the Bitnami website.

The downloaded file will be named bitnami-APPNAME-VERSION-linux-installer.run.

To begin the installation process, give the installer executable permissions and then execute the installation file, as shown below:

    $ chmod 755 bitnami-APPNAME-VERSION-linux.run
    $ ./bitnami-APPNAME-VERSION-linux.run
NOTE: The same binary file will work on any Linux distribution.

How to install a 32-bit stack on a 64-bit operating system?

Bitnami stacks support 32-bit and 64-bit Linux operating systems. To install a 32-bit stack on a 64-bit operating system, it is necessary to also install the compatibility libraries for your operating system.

  • On Linux distributions based on Debian (Ubuntu, Linux Mint, etc.), install the ia32-libs package:

    $ sudo apt-get install ia32-libs
    
  • On Linux distributions based on Red Hat (CentOS, Fedora, etc.), install the glibc.i686, libgcc.i686, libstdc++.i686 and glibc-devel.i686 packages:

    $  yum install glibc.i686 libgcc.i686 libstdc++.i686 glibc-devel.i686
    
NOTE: For best performance, it is strongly recommended to use the native installer version appropriate for the operating system architecture.

Where is the installation directory?

The default installation path will be a sub-directory of your home directory if you are running the installer as a regular user, or /opt/APPNAME-VERSION if you are running the installer as the root user.

What are the default ports?

A port is an endpoint of communication in an operating system that identifies a specific process or a type of service. Bitnami stacks include several services or servers that require a port.

The defaults ports for the main servers are the following:

Apache 80 or 8080
MySQL or MariaDB 3306
PostgreSQL 5432
Tomcat 8080

When installing the stack as a non-privileged user (that is, a user apart from the root user or the system administrator), the default Apache port is 8080.

If these ports are already in use by other applications, the installer will prompt for alternate ports to use during the installation process.

NOTE: To run applications as a non-privileged user, select port numbers above 1024.

What are the installation modes?

There are multiple installation modes:

  • Graphical mode: The default mode.
  • X-Window mode: The is an alternative graphical mode. This mode can be explicitly requested with the –mode xwindow command-line switch to the installer.
  • Command line mode: This mode is used by default when a graphical environment is not available or by passing the –mode text command-line switch to the installer.
  • Unattended mode: Unattended or silent installations can be performed by passing using the –mode unattended command line option to the installer.

For all modes, available installer options can be obtained by passing the –help command-line switch to the installer.

What is the directory structure?

The installation process will create several sub-directories under the installdir directory:

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

Application files are stored in the installdir/apps/APPNAME/htdocs directory. The configuration file for the Apache Web server is stored in the installdir/apps/APPNAME/conf/ directory.

How to uninstall the stack?

As part of the installation process, an uninstaller executable or script will be created in the installation directory. Uninstallation can be performed in graphical, text and unattended modes.

To begin the uninstallation process in command-line mode, execute the uninstallation script as shown below:

$ installdir/uninstall

How to start or stop the servers?

Bitnami native installers include a graphical tool to manage services. This tool is named manager-linux-x64.run on Linux and is located in the installation directory. To use this tool, double-click the file and then use the graphical interface to start, stop or restart servers. Server log messages can be checked in the "Server Events" tab.

Management tool

The native installer also includes a command-line script to start, stop and restart applications, named ctlscript.sh. This script can be found in the installation directory and accepts the options start, stop, restart, and status. To use it, log in to the server console and execute it following the examples below:

  • Call it without any arguments to start all services:

    $ installdir/ctlscript.sh start
    
  • Use it to restart a specific service only by passing the service name as argument - for example, mysql or apache:

     $ installdir/ctlscript.sh restart mysql
     $ installdir/ctlscript.sh restart apache
    
  • Obtain current status of all services:

     $ installdir/ctlscript.sh status
    

The list of available servers varies depending on the required components for each application.

How to create a full backup of a stack?

Bitnami stacks are self-contained and the simplest option for performing a backup 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 continuously.

Follow these steps:

  • Change to the directory in which you wish to save your backup.

     $ cd /your/directory
    
  • Stop all servers.

     $ sudo installdir/ctlscript.sh stop
    
  • Create a compressed file with the stack contents.

     $ sudo tar -pczvf application-backup.tar.gz installdir
    
  • Restart all servers.

     $ sudo installdir/ctlscript.sh start
    
  • Download or transfer the application-backup.tar.gz file to a safe location.

How to restore a stack?

Bitnami stacks are self-contained, so to restore a stack, you only need to uncompress the backup file in the same location. It is important to use the same path that was used when the stack was originally installed.

How to upgrade a Bitnami stack?

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

There are two different ways to upgrade a Bitnami stack.

  • You can upgrade the application only without modifying any other stack components. To do this, refer to the application pages.

  • You can upgrade the application and all stack components, such as PHP, Ruby, MySQL and Apache. Follow the instructions below:

    • Download the latest native installer for the stack.

    • Stop existing stack services using the graphical manager.

    • Depending on whether the Bitnami stack uses MySQL or PostgreSQL, backup the existing database as described on the MySQL component page or the PostgreSQL component page.

    • Install the new stack to a different installation directory.

    • Run the Bitnami Console script as described in the Bitnami Console page.

    • Restore the database from backup as described on the MySQL component page or the PostgreSQL component page

    • Copy any uploaded files or configuration files. It may also be necessary to run migration scripts to update the database schema; however, this varies per application. Refer to the application pages for more information on application-specific upgrade steps.

    • Restart the servers using the graphical manager.

You should now be able to access your new stack.

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

Edit the file located at installdir/apache2/htdocs/index.html.

How to open ports for remote access?

In many cases, it is necessary to open additional ports for your application(s) to function correctly.

If you are using iptables, use the following command to open port 21:

$ iptables -A INPUT -p tcp --dport 21 -j ACCEPT

If you are using ufw, use the following command to achieve the same result:

$ sudo ufw allow 21

How to close ports and deny remote access?

In some cases, it is necessary to close ports for your application(s) to increase security.

If you are using iptables, use the following command to close port 21:

$ iptables -A INPUT -p tcp --dport 21 -j DROP

If you are using ufw, use the following command to achieve the same result:

$ sudo ufw deny 21

How to start the stack automatically on boot?

NOTE: You will need root account privileges to perform the steps below.

To make the Bitnami stack servers start automatically at boot time, install the ctlscript.sh script as a service. Follow the steps below, replacing the APPNAME placeholder in all the commands that follow with the actual application name.

Debian-like Distributions (Debian, Ubuntu, …)

  • If the stack was installed as the root user, copy the installdir/ctlscript.sh script to the /etc/init.d directory. It's advisable to rename this script to something more specific, such as bitname-APPNAME. Use the following command:

     $ sudo cp installdir/ctlscript.sh /etc/init.d/bitnami-APPNAME
    

    If the stack was installed as a different user, create the script below at /etc/init.d/bitnami-APPNAME, replacing USERNAME with the name of the user account that the stack was installed under:

     #!/bin/bash
     su USERNAME -c "installdir/ctlscript.sh $@"
    

    Then, make the script executable:

     $ sudo chmod +x /etc/init.d/bitnami-APPNAME
    
  • Add or modify the following lines at the beginning of the installdir/ctlscript.sh/etc/init.d/bitnami-APPNAME script. Remember to update the Provides line to reflect the actual name of the script.

     ### BEGIN INIT INFO
     # Provides:          bitnami-APPNAME
     # Required-Start:    $remote_fs $syslog
     # Required-Stop:     $remote_fs $syslog
     # Default-Start:     2 3 4 5
     # Default-Stop:      0 1 6
     # Short-Description: Start daemon at boot time
     # Description:       Enable services provided by daemon.
     ### END INIT INFO
    
  • Add the script to the default runlevels and enable it, following the example below:

     $ sudo update-rc.d -f bitnami-APPNAME defaults
     $ sudo update-rc.d -f bitnami-APPNAME enable
    

Reboot your system and the servers should start automatically.

To revert the changes, use the commands below:

$ cd /etc/init.d
$ sudo update-rc.d -f bitnami-APPNAME remove

RedHat-like Distributions (Red Hat, Fedora Core, CentOS, Suse, …)

  • If the stack was installed as the root user, copy the installdir/ctlscript.sh script to the /etc/init.d directory. It's advisable to rename this script to something more specific, such as bitname-APPNAME. Use the following command:

     $ sudo cp installdir/ctlscript.sh /etc/init.d/bitnami-APPNAME
    

    If the stack was installed as a different user, create the script below at /etc/init.d/bitnami-APPNAME, replacing USERNAME with the name of the user account that the stack was installed under:

     #!/bin/bash
     su USERNAME -c "installdir/ctlscript.sh $@"
    
  • Add or modify the following lines at the beginning of the installdir/ctlscript.sh/etc/init.d/bitnami-APPNAME script.

     #!/bin/sh
     #
     # chkconfig: 2345 80 30
     # description: Bitnami services
    

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

  • Install the script as a service.

     $ sudo chkconfig --add bitnami-APPNAME
    

Reboot your system and the servers should start automatically.

To revert the changes, use the command below:

$ sudo chkconfig --del bitnami-APPNAME

How to increase the available memory?

Bitnami stacks for web applications install servers like Apache, MySQL, PostgreSQL and others. Some of these requires more than 1 GB of memory. If you have less than 1 GB of total memory, create a swap file to increase the available system memory.

What is swap?

Linux swap files allow a system to harness more memory than was originally physically available (RAM). Swap space is the area on the hard drive that holds memory pages that are inactive, freeing up physical memory for other uses.

It is recommended to have swap space in your system. Check your current swap space with the free command:

$ free -m
             total       used       free     shared    buffers     cached
Mem:           491        144        346          0          2         25
-/+ buffers/cache:        117        374
Swap:          975         81        894

From the output, the system has 419 MB of RAM and 975 MB of swap space.

How to create a swap file?

It's recommended that swap space should be equal to or bigger than the amount of physical memory (RAM). If you have less than 1 GB of RAM, create at least 1 GB of swap space. Follow these steps:

  • Identify a partition for the swap file and create it. If you have an ephemeral partition, that's ideal:

     $ sudo dd if=/dev/zero of=/mnt/swap.0 bs=1024 count=1048576
     $ sudo mkswap /mnt/swap.0
    
  • Switch to using the root account and activate the swap area:

     $ sudo su 
     $ echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab
     $ swapon /mnt/swap.0
    
  • Check if the swap space was properly enabled with the free command or the command below:

     $ sudo swapon -s
    

What is the minimum version of glibc needed for Bitnami stacks?

The GNU C library is the C library used in GNU systems and most other systems with the Linux kernel. Most Bitnami stacks require at least glibc v2.5 to work. If the version of glibc in your system is lower than the minimum version required, update it or install a more recent operating system.

The version of glibc in your system can be obtained with the command below:

$ ldd --version

Here are the glibc versions included in the most popular distributions at the time they were released:

  • Ubuntu 8.04: 2.7
  • Ubuntu 10.04: 2.11
  • Ubuntu 12.04: 2.15
  • Ubuntu 14.04: 2.19
  • Debian 5 (Lenny): 2.7
  • Debian 6 (Squeeze): 2.11
  • Debian 7 (Wheezy): 2.13
  • Debian 8 (Jessie): 2.19
  • RHEL 5: 2.5
  • RHEL 6: 2.12
  • RHEL 7: 2.17

Find more information about glibc.

What is the minimum version of libstdc++ needed for Bitnami stacks?

The Standard C++ Library is the C++ library used in the GNU systems and most systems with the Linux kernel. Some software require a minimun version of this library to be compiled. This way, in order to being executed, the system would need to have the same version or higher of this library.

Most of the Bitnami stacks require at least glibcxx 3.4.9 to work. If the compatible versions of glibcxx in the libstdc++ installed in your system is lower than the minimun version required you will need to update the libstdc++ package or install a more recent operating system. The compatible versions of glibcxx in your system can be obtained with the command below:

$ /sbin/ldconfig -p | grep libstdc | awk '{print $4}' | xargs grep -aoE 'GLIBCXX_([0-9]+)\.([0-9]+)\.([0-9]+)'
  • GLIBCXX_3.4.1
  • GLIBCXX_3.4.2
  • GLIBCXX_3.4.3
  • GLIBCXX_3.4.4
  • GLIBCXX_3.4.5
  • GLIBCXX_3.4.6
  • GLIBCXX_3.4.7
  • GLIBCXX_3.4.8
  • GLIBCXX_3.4.9
  • GLIBCXX_3.4.10
  • GLIBCXX_3.4.11
  • GLIBCXX_3.4.12
  • GLIBCXX_3.4.13
  • GLIBCXX_3.4.14
  • GLIBCXX_3.4.15
  • GLIBCXX_3.4.16
  • GLIBCXX_3.4.17
  • GLIBCXX_3.4.18
  • GLIBCXX_3.4.19

In this example we can see that all the glibcxx versions compatible with the libstdc++ installed in the system.

How to skip the validation of the minimum version of libstdc++?

The tools we use for checking the version of glibcxx could fail in certain environments. If this happens, you can still proceed with the installation.

  • Execute the command below and ensure the output is greater or equal than 3.4.9:

    $ /sbin/ldconfig -p | grep libstdc | awk '{print $4}' | xargs grep -aoE 'GLIBCXX_([0-9]+)\.([0-9]+)\.([0-9]+)' | tail -n 1 | grep -oE '([0-9]+)\.([0-9]+)\.([0-9]+)'
    
  • Launch the installer with the option –disable_glibcxx_version_check 1 to skip the validation.

How to set the machine hostname for local name resolution?

Some Java-based applications need to be able to resolve the machine hostname to an IP address in order to run. If unable to do so, the application may report the following error:

The installer was not able to resolve the machine hostname. 
Java-based applications require to solve the hostname. 

To fix this, add an entry mapping the machine host name to the IP address 127.0.0.1. Edit the /etc/hosts file and add the line below to it, replacing the HOSTNAME placeholder with the actual host name of the machine.

127.0.0.1 HOSTNAME

How to configure your application to use a third-party SMTP service for outgoing email?

Bitnami applications can be configured to use a third-party SMTP service for outgoing email. Examples of such third-party SMTP services are SendGrid and Mandrill. Instructions for using both these are provided below.

SendGrid

SendGrid's SMTP service can be accessed using your SendGrid account credentials. These credentials can be obtained by logging in to the SendGrid website and visiting the "Account Details" page.

SendGrid configuration

To configure your application to send email through SendGrid's SMTP service, use the settings below. Replace USERNAME with your SendGrid account username and PASSWORD with your SendGrid account password.

  • SMTP host: smtp.sendgrid.net
  • SMTP port: 25 or 587 for unencrypted/TLS email, 465 for SSL-encrypted email
  • SMTP username: USERNAME
  • SMTP password: PASSWORD

Here's an example of configuring WordPress to use SendGrid:

WordPress with SendGrid

More information is available in the SendGrid documentation.

Mandrill

Mandrill's SMTP service requires an API key for access. To obtain this key, log in to the Mandrill website, navigate to the "SMTP & API" section and create an API key. Note the SMTP server name, username and API key, as these serve as your credentials for accessing the Mandrill SMTP server.

Mandrill configuration

To configure your application to send email through Mandrill's SMTP service, use the settings below. Replace USERNAME with your SMTP username and API-KEY with the generated API key.

  • SMTP host: smtp.mandrillapp.com
  • SMTP port: 25, 587 or 2525 for unencrypted/TLS email, 465 for SSL-encrypted email
  • SMTP username: USERNAME
  • SMTP password: API-KEY

Here's an example of configuring WordPress to use Mandrill:

WordPress with Mandrill

More information is available in the Mandrill documentation.

Similar steps can be followed for other third-party SMTP services as well. Consult your service provider's documentation to obtain details on authentication credentials and available ports.