Setup via Linux Shell

This method is for advanced users who are comfortable with running commands from the Linux shell.  For a web based installer see Setup Wizard.

As with the web based installer, we strongly recommend that users create an EBS volume for data storage, as this greatly improves reliability and eases backup.  Note that if you deviate from the steps below, iPOV may not be able to fully assist you in trouble shooting and maintenance.

Once you have launched the CoSolvent instance, then attach the EBS volume as a Linux device (e.g. /dev/sde).  Now login to your instance using your EC2 SSH Key and the user “ubuntu”.  Amazon provides more details on this, including how to configure the Windows program “Putty” to use your EC2 Key.  See http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/

First, mount your EBS volume.  You may also wish to use the LUKS tools to enable pass through encryption to better protect your data, we’ll show the commands, but you show read up on LUKS to fully understand its implications (including the fact that if you loose your pass phrase you will be unable to access your data).

In this example we use the LVM2 manager to create Logical Volumes.  This will enable us to span multiple EBS volumes if needed and make them look like one huge disk to the operating system.  In the following examples we’ll assume our EBS volume is mounted as /dev/sde.  We’ll end up creating a Logical Volume Group, aka ‘vg’ named “vgdata” and a single Logical Volume, aka ‘lv’ named “lvdatat”.  When created the Logical Volume should show up as /dev/mapper/vgdata-lvdata

sudo fdisk /dev/sde
fdisk> l  #lists partions
fdisk> n  #create partion.
fdisk>... p, 1  (create primary partion #1), use whole 'disk;
fdisk> w  #write changes and exit
sudo pvcreate /dev/sde1
sudo pvdisplay
sudo vgcreate vgdata /dev/sda21
sudo vgdisplay
sudo lvcreate -l 90%FREE -n lvdata vgdata

Now you’ll format the raw EBS volume using the LUKS tools (optional), where EBS_DEV is the device name you attached the EBS volume as (e.g. /dev/sde)

sudo luksformat -t ext3 /dev/mapper/vgdata-lvdata
sudo cryptsetup luksOpen /dev/mapper/vgdata-lvdata cryptmnt

At this point you’ll have an entry /dev/mapper/cryptmnt which you can mount and use:

sudo mkdir /mnt/data
sudo mount /dev/mapper/cryptmnt /mnt/data

You’re now ready to download the CoSolvent file packages. We provide a script to assist this process.

sudo cp /bin/installer/ccs_get_latest.sh .
sudo chown ubuntu ccs_get_latest.sh
./ccs_get_latest.sh YOUR_PID_CODE

You get your PID code when you register your CoSolvent Subscription. The download will produce 2 files, which you will need to extract:

sudo mkdir /mnt/data/ccs
sudo tar xvjf ccs_core_latest.tar.bz2 /mnt/data/ccs
sudo tar xvjf ccs_theme_latest.tar.bz2 /mnt/data/ccs/themes

Now, you need to create a data directory, which must be owned by the Apache user, and create an empty MySQL database. To access MySQL, you’ll need to account password for the ‘installer’ user, this is autogenerated on first boot and stored in the file /etc/installer.pw , supply it when mysql prompts you for the password.

sudo mkdir /mnt/data/ccs-data
sudo chown -R www-data:www-data /mnt/data/ccs-data
sudo mysql -u installer -p
mysql>CREATE DATABASE ccs;
mysql>GRANT ALL PRIVILEGES ON ccs.* TO "ccs-user"@"localhost" IDENTIFIED BY "%password%";
mysql>FLUSH PRIVILEGES;
mysql>quit;

The final step is to reconfigure Apache.

sudo mv /home/ubuntu/ccs-ec2-setup-utils/command_out/ccs.conf /etc/apache/sites-available/ccs
sudo nano /etc/apache/sites-available/ccs    #make any adjustments you need, most everything should be preconfigured.
sudo a2dissite default
sudo a2dissite default-ssl
sudo a2ensite ccs
sudo /etc/init.d/apache restart

Note that we do NOT ship a HTTPS configuration. You can follow standard HTTPS configuration steps for Ubuntu if you wish to enable this, and copy the contents of the ccs site to a ccs-ssl. For production sites we highly recommend setting up HTTPS. On servers which iPOV manages we can either supply and install a HTTPS certificate to a YOURNAME.cosolvent.com OR install a HTTPS certificate that you have purchased.

Share