Virtual Appliances Quick Start Guide

    BitNami Virtual Machine Images, also known as virtual appliances, contain a minimal Linux operating system and a fully installed and configured BitNami application Stack. This allows you to run the application without actually installing it on your computer’s operating system. Using a virtualization platform, you can simply start and stop the BitNami Virtual Machine Image whenever you want to use the application. This allows you to keep it completely isolated from software installed on your machine.

    After you download and extract a BitNami Virtual Machine Image (the file is compressed to reduce the download size), it will be ready to be deployed in your virtualization infrastructure. If you don’t already have a virtualization platform, or ‘hypervisor’, installed, you can download either VMware Player or VirtualBox free of charge. Once you have one installed, you’ll be able to run a BitNami Virtual Machine Image.

     

    BitNami provides free virtual machines for popular open source applications. Visit our download page, select your application of choice and then click on the download link.

    bitnami-stack-drupal.pngbitnami-stack-joomla.pngbitnami-stack-redmine.pngbitnami-stack-sugarcrm.pngbitnami-stack-wordpress.png

    How to start your BitNami Virtual Appliance?

    We currently offer BitNami Virtual appliances as VMware virtual machines. In order to run them you need to have virtualization software from VMware already installed, such as VMware Server or VMware Player. You can download them for free at www.vmware.com.

    BitNami appliances are distributed inside a compressed file, and you will need to extract them before being able to run them. After that, simply launch your VMware server-console or your VMware Player and open the .vmx image that you can find into the extracted folder.

    VMware ESX or ESXi

    If you want to run on VMware ESX or ESXi you can use the "vmkfstool" command line that you can find in your server host to import/export the machine:

    $ vmkfstools -i original.vmdk new.vmdk

    Another option is to use the VMware vCenter Converter Tool to convert the machine to the .OVF format. Download a version previous of 4.3, after this version the VMware Converter does not include this feature.

    1. Choose the .vmx file from the uncompresed folder.
    2. Select the destination type "Virtual appliance" and the distribution format "Folder of files".
    3. Edit the Product Information and set the Product Name.

    Virtual Box

    BitNami virtual appliances ship an OVF file which makes it easy to import the machine in VirtualBox 3 or previous versions. If you are using Virtual Box 4 or later,  you would like to import the Virtual Appliance manually. You can do it following these steps:

    1. Create a new Virtual Machine and set that it is a Linux Ubuntu 64bit machine.
    2. Configure RAM to 512 or higher. For Ruby-based or Java-based applciations (f.e. Liferay, Alfresco, GitLab), we recommend more than 1Gb RAM.
    3. Choose "existing hard disk" and select the BitNami "vmdk" file. Be sure that you select the main one (without s00X in the file name, not any of the other vmdk files: s001.vmdk, s002.vmdk, etc).
      If you are using a previous VMware image with Ubuntu 10.10, go to Settings -> System -> Processor -> Enable PAE. For Ubuntu 12.04 images it is not necessary.
    4. Check that the Network configuration is "Bridged Adapter" to have access from remote machines in your network.
    5. Start your machine

     

    virtualbox.png

    virtualbox-2.png

    virtualbox-bridge.png

    How to log into the BitNami Virtual Machine?

    BitNami applications are started by default upon boot, but you will still need to log into the operating system to stop or restart the servers, edit configuration files and so on. Once you have started your BitNami Virtual Machine you will get an username prompt. The default user is "bitnami" and the password is "bitnami" by default. This info is shown during the first boot. If you want to run any command as root user you can use the "sudo" command.

    Once you have logged in the first time, the machine will request a new user password automatically and you should modify it for security reasons. If you want remote shell access to the virtual machine, you will need to enable the SSH server, which is disabled by default. You can find how to enable it in the Virtual_Appliances_Quick_Start_Guide#How_to_enable_sshd.3f section.

    What is the password for root?

    It is not necessary to have a known password for the root in the Virtual Appliances. You can run any command as root user with the "sudo" command. For example to check the servers status:

    $ sudo /opt/bitnami/ctlscript.sh status
    

    You have to specify the password for the "bitnami" user. You can also change to root user in the command prompt:

    $ sudo su
    # /opt/bitnami/ctlscript.sh status
    

    If you want to specify a known root password for the Virtual Appliance, you can change follow these steps:

    $ sudo su
    # passwd
    

    How to access the BitNami Virtual Appliance?

    The bundled BitNami application is automatically started upon boot. You can access it from your browser at http://aaa.bbb.ccc.ddd/. You will need to substitute 'aaa.bbb.ccc.ddd' with the actual IP address picked up by your machine. This address is typically assigned to it by a DHCP server in your network. The IP address will be displayed on screen at the end of the boot process.

    Regarding the web application itself, the default user and password for the administrator of your application is "user" and the password "bitnami" in most cases. The exact username and password are provided at the end of the boot process and it is recommended that you change these values. You can do so from the application itself, as it varies from program to program.

    You can also see your IP address by typing "ifconfig" in the command prompt after login in. If the machine does not show any IP logging in address try to force reloading the IP:

    $ sudo /etc/init.d/networking force-reload

    If your machine can not get a valid IP it is possible that you do not have a DHCP address or it is not configured to give IP addresses to unknown machines. In this case you have two options: you can use the VMware DHCP server, or you can configure the network manually.

    If you want to use the VMware DHCP server, you can stop the machine, change the network settings to "NAT" instead of "BRIDGE" and start the machine. This IP is internal so you have only access to the application from the same computer where the Virtual Machine is running.

    If you prefer to configure the network manually you can run the following commands in the Virtual Machine:

    1. Your local network uses one of the following IP addresses:
        192.168.X.X
        172.X.X.X
        10.X.X.X
      
    2. Depending on your network configuration you should use a different netmask. If you know a free IP address in your local network that the Virtual Machine could use, you can configure the network manually, for example:
      $ sudo ifconfig eth0 192.168.1.234 netmask 255.255.255.0 up 
      
    3. You can access the web application from any computer of your network at 192.168.1.234.

    How to change the user password?

    It is recommended that you change the default user password in the Virtual Machine. This password is automatically requested when you log into the virtual machine for the first time so it is likely that you have already changed it. You can also do so by logging into the console and typing "passwd" at the shell prompt.

    How to enable sshd?

    Some applications like GitLab or Gitorious require to have SSH access to import the repositories. The "ssh" server is disabled by default for Virtual Machines. You can enable the "ssh" server from the machine console as follows:

    • For Ubuntu
      $ sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
      $ sudo start ssh

    Now you can login from a different machine using "ssh" and the IP address of your Virtual Machine.

    If you want to disable it you can use the reverse method:

    • For Ubuntu
      $ sudo stop ssh
      $ sudo mv /etc/init/ssh.conf /etc/init/ssh.conf.back

    IMPORTANT: Before enabling the sshd server you should modify your default user password for security reasons. In the next section, you can find more information on how to increase the server security.

    How to copy files in the Virtual Appliance?

    There are several ways to do that. You can install a FTP server in the virtual appliance using the package manager but this could not be easy and it is not secure neither. We encourage to use SCP (Secure Copy Protocol) to move your files to the Virtual Appliance.

    This protocol requires to enable SSH in the machine which is not enabled for security reasons by default. You can find more info about how to do that atVirtual_Appliances_Quick_Start_Guide#How_to_enable_sshd.3f

    Then you can connect to the Virtual Appliance using the "bitnami" user credentials.

    Try to use the following tools:

    How to configure your sshd server to support key based authentication?

    You need to create the pair of keys (public and private keys) using the following command in the Virtual Machine:

      $ ssh-keygen
      Generating public/private rsa key pair.
      Enter file in which to save the key (/home/bitnami/.ssh/id_rsa):
      Enter passphrase (empty for no passphrase):
      Enter same passphrase again:
      Your identification has been saved in /home/bitnami/.ssh/id_rsa.
      Your public key has been saved in /home/bitnami/.ssh/id_rsa.pub.
      The key fingerprint is:
      XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX bitnami@linux
    

    We strongly recommend that you set a long passphrase. Once you have executed this command, you can check that there are two files in the /home/bitnami/.ssh/ folder:

      $ ls /home/bitnami/.ssh
      id_rsa  id_rsa.pub
    

    Save your private key (id_rsa file) in a secure location and do not share it with anybody.

    Once you have the key pair ready, you need to enable access to the machine. It is only necessary to write the public key into the /home/bitnami/.ssh/ file.

     
      $ cd /home/bitnami/.ssh
      $ cat id_rsa.pub >> /home/bitnami/.ssh/authorized_keys
    

    Now edit the "/etc/ssh/sshd_config" file using the vi editor and uncomment (or add if not already present) the following lines:

      RSAAuthentication yes
      PubkeyAuthentication yes
    

    To disable the basic authentication it is necessary to configure the following lines:

      ChallengeResponseAuthentication no
      PasswordAuthentication no
      UsePAM no
    

    Then reload the server configuration:

    • For Ubuntu
        $ sudo /etc/init.d/ssh force-reload
      
    • For openSUSE
        $ sudo /etc/init.d/sshd force-reload
      

    copy your private key "id_rsa" file in the client machine from which you will access the server.

      $ mkdir /home/user/.ssh
      $ cp /path/to/id_rsa /home/user/.ssh
      $ chmod 0600 -R /home/user/.ssh
    

    and try to access to the Virtual Machine:

      $ ssh bitnami@IP_address
      Enter passphrase for key '/home/user/.ssh/id_rsa':
    


    And that's all. If you do not want to repeat the passphrase you can run ssh-agent and ssh-add commands to save it during the session.

    How to increase the RAM memory?

    You can increase the RAM memory for the Virtual Machines using the settings tools in your VMware application. All machines have 512 MB by default but it is recommended that you increase it depending of the number of users and the application performance. Recent versions of the Virtual Appliances include PAE kernel, which allows you to increase assigned RAM memory to more than 4Gb. The optimal setting will also depend on the host machine capabilities and the number of Virtual Machines running at the same time. A good practice is to share the RAM memory between the host and the Virtual Machine. For example, if your host machine has 2 GB of RAM and you are only running one virtual machine, you can increase the RAM of the Virtual Machine to 1 GB. It is not advisable to increase it more because at one point the host machine may run out of physical memory and use swap, decreasing overall performance.

    How to configure the Firewall?

    The SuSe Firewall is enabled by default and the only ports open are 80, 443 and 22. In the RubyStack and JRubyStack virtual appliances port 3000 is also open for development purposes by default.

    In order to open a different port:

    • For Ubuntu
      You should run:
        $ sudo ufw allow $port
      
      If you need to modify the firewall configuration you can find more information about it at https://help.ubuntu.com/community/UFW.
       
    • For openSUSE
      You should include the port in the following line in the "/etc/sysconfig/SuSEfirewall2" file:
        FW_SERVICES_EXT_TCP="22 80 443"
      

      Then it is necessary to restart the firewall:
        $ sudo /etc/init.d/SuSEfirewall2_init restart
        $ sudo /etc/init.d/SuSEfirewall2_setup restart
      

      You can find more information about firewall configuration at http://en.opensuse.org/SuSEfirewall2.

    How to enable phpMyAdmin or phpPgAdmin?

    You can the info at "How to enable_phpMyAdmin_or_phpPgAdmin_to_be_accessed_remotely"

    How to ensure that my BitNami Virtual Appliance is accessible from other machines?

    Some BitNami applications require you to reconfigure the IP/hostname if it changes during the boot.

    If your Virtual Appliance seems to not be accessible from other machines, you should configure the application IP/hostname using the 'updateip' tool.


      $ sudo /opt/bitnami/bnconfig
    

    How to configure the application IP/hostname?

    By default, BitNami applications update their internal IP/hostname at boot time. However you may want to change it manually if the Virtual Machine has changed its IP. For doing that, execute:

      $ sudo /opt/bitnami/bnconfig --machine_hostname <ip or hostname>
    

    or if you want the tool setting the current Virtual Machine IP you can type only:

      $ sudo /opt/bitnami/bnconfig
    

    Then try to access from a remote machine. Please ensure that your Virtual Machine network configuration is "Bridged". You can see the /Virtual_Appliances_Quick_Start_Guide#How_to_access_the_BitNami_Virtual_Appliance.3f.

    How to increase the size of a virtual disk?

    IMPORTANT: We recommend that you back up your virtual machine before increasing the size of virtual disks. Note that all snapshots should be removed and the virtual machine stopped.

    The approach to resize the disk could be different depending on the VMware product that you are using:

    Workstation, Player or Server

    These products ships a command line tool to resize the disk size: vmware-vdiskmanager. To resize the disk go to the folder where you have your virtual machine and run the following command. The example below resizes the machine to 50Gb.

    $ vmware-vdiskmanager -x 50Gb bitnami-wordpress-3.8.1-0-ubuntu-12.04.vmdk
    ESX or vSphere

    The comman line tool to resize the disk size is vmkfstools. Log in the ESX server and run the following command with your installed machine:

    $ vmkfstools -X 50G -d eagerzeroedthick /vmfs/volumes/cs-ee-symmlun-001A/bitnami-wordpress-3.8.1-0-ubuntu-12.04.vmdk

     

    Extending a virtual disk only extends the virtual machine's disk. It is necessary to increase the size of the file Linux system within the guest. To do this, it is necessary to boot the machine using a Live CD Linux so you are able to mount the root partition and resize it. You can use an GParted Live CD.

    - Download latest version of GParted Live CD http://gparted.org/livecd.php

    - Change the boot order for your Virtual Machine and move the CD/DVD to the first one

    - Configure the CD/DVD option to load the previous downloaded iso

    - Start the machine

    Now you can run the GParted tool and you can resize the Linux system partition. Apply the changes and reboot your machine. Note that you can disable the CD/DVD to do not boot the GParted distribution.

    How to install VMware tools on BitNami Virtual Appliances?

    Before starting your Virtual Appliance, you should add a cdrom device to the machine if this device does not exist. If you have VMware Workstation, VMware Player or you simply are using a web interface you can add easily a new cdrom device from your Control Panel. The commands below are specific for openSUSE Virtual Appliances.

    You should install the latest kernel, in case a new one has been released since the virtual machine was created. You can do so issuing the following command:

    $ sudo zypper update kernel-default
    

    If no newer version is found, the command will not take effect. If the zypper package tool installed a new kernel, you will need to reboot the machine:

    $ sudo reboot
    

    Once the machine is started using the new Linux kernel, you can access the VMware tools. In the version of VMware that we tested there is an option in the Control Panel: VM -> Install VMware tools

    This action simulates mounting a cdrom that includes the tools. Now it is necessary to mount the cdrom to install them:

    $ sudo mkdir /mnt/cdrom
    $ sudo mount /dev/cdrom /mnt/cdrom
    $ cd /mnt/cdrom
    $ sudo rpm -i VMwareTools-*.rpm 
    

    Before running the VMware configuration tool it is necessary to install some dependencies:

    $ sudo zypper install gcc make tar kernel-source 
    

    Finally you can configure the VMware tools installed in the BitNami Virtual Appliance.

    $ sudo vmware-config-tools.pl 
    

     

    These steps are specific for openSUSE based appliances. If you are using the Ubuntu Virtual Appliance, there is no "rpm" tool installed by default. Instead of using "rpm", you can uncompress the tarball: 

    $ sudo tar -xzvf VMwareTools*.tar.gz -C /tmp

    Check your current kernel version:

    $ uname -a
    Linux linux 2.6.35-28-virtual #32-Ubuntu SMP Fri Mar 28 08:10:02 UTC 2011 i686 GNU/Linux
    

    Then install the same packages using the "apt-get" command:

    $ sudo apt-get update
    $ sudo apt-get install gcc make tar linux-source linux-headers-kernel_version
    $ cd /tmp/VMware*
    $ sudo ln -s /lib/modules/kernel_version/build/include/generated/utsrelease.h /lib/modules/kernel_version/build/include/linux/utsrelease.h
    $ sudo ln -s /lib/modules/kernel_version/build/include/generated/autoconf.h /lib/modules/kernel_version/build/include/linux/autoconf.h
    $ sudo ./vmware-config-tools.pl
    

    How to install VirtualBox Guest Additions on BitNami Virtual Appliances?

    Before starting your Virtual Appliance, you should add a cdrom device to the machine if this device does not exist. You can add easily a new cdrom device from the menu Machine -> Settings -> System on your virtual machine. The commands below are specific for Ubuntu Virtual Appliances.

    You should install some packages before installing VirtualBox guest additions. To do this, at first, check your current kernel version:

    $ uname -a
    Linux linux 3.2.0-23-virtual #36-Ubuntu SMP Tue Apr 10 22:29:03 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Then, install the packages with the proper kernel_version shown by the previous command:

    $ sudo apt-get -y install dkms build-essential linux-headers-kernel_version
    

    After that, the virtual machine must be restarted:

    $ sudo reboot
    

    Once the machine is started again, you can access the Virtualbox guest additions. There is an option in the menu: Devices -> CD/DVD Devices -> Choose a virtual CD/DVD disk file... Then, select the VBoxGuestAdditions.iso file (located in /usr/share/virtualbox/ if you are using Linux or in C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso in case you are using Windows).

    This action simulates inserting a cdrom that includes the tools. Now it is necessary to mount the cdrom to install them:

    $ sudo mkdir /mnt/cdrom
    $ sudo mount /dev/cdrom /mnt/cdrom
    $ cd /mnt/cdrom
    $ sudo sh ./VBoxLinuxAdditions.run --nox11
    

    Because the last command is being running with the --nox11 option, the following minor error will appear, after a while:

    Installing the Window System drivers ...fail!
    (Could not find the X.Org or XFree86 Window System.) 
    

    If the other tasks were completed with "done", VirtualBox Guest Additions have been successfully installed. You can check this in the example below:

    Verifying archive integrity... All good.
    Uncompressing VirtualBox 4.1.22 Guest Additions for Linux.........
    VirtualBox Guest Additions installer
    Removing existing VirtualBox DKMS kernel modules ...done.
    Removing existing VirtualBox non-DKMS kernel modules ...done.
    Building the VirtualBox Guest Additions kernel modules ...done.
    Doing non-kernel setup of the Guest Additions ...done.
    
    Installing the Window System drivers ...fail!
    (Could not find the X.Org or XFree86 Window System.)

     

    How to install a FTP server?

    Some applications use a FTP connection to download and install modules. IMPORTANT: This server should not be used to copy files into the machine, for remotely connection it is advisable to connect through SFTP or SCP for security reasons. Most of the Virtual Appliances already included the "vsftpd" server configured to be accessed locally.

    If you want to use it from your application these are the setting that you should use:

    Hostname: 127.0.0.1
    Username: bitnami
    Password: the bitnami user password
    Connection method: FTP
    

    If your Virtual Appliance does not include FTP, you can install vsftpd server following these steps:

    On Ubuntu:

    $ sudo apt-get update
    $ sudo apt-get install vsftpd
    

    On openSuSE:

    $ sudo zypper update
    $ sudo zypper install vsftpd
    

    Now the FTP server is running on your machine. For security reasons you should modify the configuration file to only listen requests from the local machine. Add the following line at the end of the configuration file "/etc/vsftpd.conf". You can add it running the following command:

    $ echo -e "write_enable=YES\nlisten_address=127.0.0.1" | sudo tee -a /etc/vsftpd.conf
    

    Then restart the service and that is all.

    On Ubuntu:

    $ sudo restart vsftpd
    

    On openSuSE:

    $ sudo /etc/init.d/vsfptd restart
    

    The FTP credentials for the application will be the following:

    Hostname: localhost
    Port: 21
    Username: bitnami
    Password: bitnami user password in your machine
    FTP Root: /opt/bitnami/apps/your_application/htdocs

    How to install Webmin?

    Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more.

    The steps below walk you through the process of installing and configuring Webmin in a Virtual Appliance or an AMI.

    $ wget http://downloads.sourceforge.net/project/webadmin/webmin/1.550/webmin-1.550.tar.gz
    
    • Install the dependencies and uncompress the tarball by doing the following:
    $ sudo apt-get install perl5 libnet-ssleay-perl
    $ tar -xzvf webmin-*
    $ cd webmin-*
    
    • Run the installer and follow the installation steps. To start the installer:
    $ sudo sh setup.sh
    
    • Once Webmin is installed, you can access it with the user/password that you set during the installation at http://YOUR_URL:10000 by default. Note that if you are running a Virtual Appliance, you should open the 10000 port in the firewall by doing the following:
    $ sudo ufw allow 10000
    
    • If you are installing Webmin on a cloud instance using a BitNami AMI, you should also enable this port in the Amazon firewall. You can find more info in the BitNami Cloud Hosting FAQ.


    Once you can access the Webmin application, you must configure it to manage the BitNami servers. These are the configuration files for MySQL and Apache servers:

    /etc/webmin/mysql/config

    date_subs=0
    max_text=1000
    perpage=25
    stop_cmd=/etc/init.d/bitnami stop mysql >/dev/null 2>&1
    mysqldump=/opt/bitnami/mysql/bin/mysqldump
    nodbi=0
    mysql_libs=/opt/bitnami/mysql/lib
    max_dbs=50
    start_cmd=/etc/init.d/bitnami start mysql >/dev/null 2>&1 &
    mysql_data=/var/lib/mysql
    mysqlimport=/opt/bitnami/mysql/bin/mysqlimport
    access=*: *
    style=0
    my_cnf=/opt/bitnami/mysql/my.cnf
    mysqlshow=/opt/bitnami/mysql/bin/mysqlshow
    mysql=/opt/bitnami/mysql/bin/mysql
    nopwd=0
    add_mode=1
    passwd_mode=0
    blob_mode=0
    mysqladmin=/opt/bitnami/mysql/bin/mysqladmin
    

    /etc/webmin/apache/config

    link_dir=/opt/bitnami/apache2/conf/sites-enabled
    test_manual=0
    show_list=0
    mime_types=/opt/bitnami/apache2/conf/mime.types
    access_conf=/opt/bitnami/apache2/conf/access.conf
    auto_mods=1
    stop_cmd=/etc/init.d/bitnami stop apache
    virt_file=/opt/bitnami/apache2/conf/sites-available
    test_apachectl=1
    max_servers=100
    srm_conf=/opt/bitnami/apache2/conf/srm.conf
    httpd_dir=/opt/bitnami/apache2
    start_cmd=/etc/init.d/bitnami start apache
    show_order=0
    test_always=0
    httpd_conf=/opt/bitnami/apache2/conf/httpd.conf
    defines_file=/opt/bitnami/apache2/bin/envvars
    apachectl_path=/opt/bitnami/apache2/bin/apachectl
    show_names=0
    test_config=1
    apply_cmd=/opt/bitnami/bin/apachectl graceful
    httpd_path=/opt/bitnami/apache2/bin/httpd

    You can then access the Webmin application and click the "Refresh Modules" button. You can now see the "Apache Webserver" and "MySQL Database Server" in the Servers tag.

     webmin.png 

    </wbr>


    How to change the keyboard layout

    You can use the dpkg-reconfigure tool to change the keyboard layout.

    sudo dpkg-reconfigure keyboard-configuration
    

    Comments

    You must login to post a comment.

    Attach file

    Attachments

    FileSizeDateAttached by 
     bitnami-stack-drupal.png
    No description
    5.02 kB08:28, 15 May 2013AdminActions
     bitnami-stack-joomla.png
    No description
    6.16 kB08:29, 15 May 2013AdminActions
     bitnami-stack-redmine.png
    No description
    4.32 kB08:29, 15 May 2013AdminActions
     bitnami-stack-sugarcrm.png
    No description
    4.26 kB08:30, 15 May 2013AdminActions
     bitnami-stack-wordpress.png
    No description
    4.96 kB08:30, 15 May 2013AdminActions
     converter1.png
    converter1
    57.98 kB12:49, 24 Oct 2011AdminActions
     converter2.png
    converter2
    49.75 kB12:49, 24 Oct 2011AdminActions
     converter3.png
    converter3
    56.61 kB12:49, 24 Oct 2011AdminActions
     virtualbox-2.png
    BitNami VirtualBox
    107.28 kB17:58, 4 Mar 2013AdminActions
     virtualbox-bridge.png
    Bridge
    52.41 kB11:16, 30 Mar 2013AdminActions
     virtualbox.png
    BitNami VirtualBox
    96.58 kB17:58, 4 Mar 2013AdminActions
     vmware_converter.jpg
    VMWare Converter
    36.78 kB11:38, 8 Sep 2011AdminActions
     webmin.png
    webmin
    59.13 kB12:52, 30 Jun 2011AdminActions