Installing Shares |
[root] $ /etc/init.d/nginx stop [root] $ /etc/init.d/delayed_job stop
[root] $ rpm -Uvh aspera-shares-version.rpm
The following is an example of the instructions displayed when the rpm command finds a version of Shares prior to 1.5.
[root] $ rpm -Uvh aspera-shares-1.9.2.107140-1.x86_64.rpm Preparing... ########################################### [100%] You appear to be upgrading from a version that is too old. The currently installed version appears to be 1.0.3.69382-1 To upgrade, you must first back up your data and uninstall the old version. To back up your data: [root]$ /opt/aspera/shares/script/rake.sh backup DIR=/tmp This will create a backup directory with a name like /tmp/20130101012345 You can import the contents of that directory during installation. [root]$ cp /opt/aspera/shares/conf/cert.key /opt/aspera/shares/conf/cert.pem /tmp/20130101012345 ## Stop the application [root]$ /etc/init.d/aspera_shares_nginx stop [root]$ /etc/init.d/aspera_shares_delayed_job stop ## Remove the service scripts that cause the application to start on server boot: First, use the distribution-specific tool to uninstall the service script from all runlevels: A. For RHEL, CentOS, or SUSE: [root]$ chkconfig --del aspera_shares_nginx [root]$ chkconfig --del aspera_shares_delayed_job B. For Debian or Ubuntu: [root]$ update-rc.d -f aspera_shares_nginx remove [root]$ update-rc.d -f aspera_shares_delayed_job remove Next, remove the service scripts: [root]$ rm /etc/init.d/aspera_shares_nginx [root]$ rm /etc/init.d/aspera_shares_delayed_job ## Uninstall the rpm: [root]$ rpm -e aspera-shares ## Back up any remaining files: [root]$ mv /opt/aspera/shares /opt/aspera/shares.bak ## Stop the system MySQL unless otherwise needed aspera-shares-1.9.1.100746 no longer uses the system-provided MySQL. To stop: [root]$ /etc/init.d/mysqld stop [root]$ chkconfig mysqld off --- You are ready to install the new version and restore your backup. ## Install the rpm [root]$ rpm -Uvh aspera-shares-1.9.2.107140-1.x86_64.rpmc ## Run the install script [root]$ /opt/aspera/shares/u/setup/bin/install ## Restore your backup [root]$ /opt/aspera/shares/u/setup/bin/restore /tmp/20130101012345 error: install: %pre scriptlet failed (2), skipping error: %pre(aspera-shares-1.9.1.100746-1.x86_64) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping aspera-shares-1.9.1.100746-1
Upgrading from Shares 1.5+: If the rpm command finds Shares 1.5+ already installed on the system, it displays instructions like the following:
[root] $ rpm -Uvh aspera-shares-1.9.2.107140-1.x86_64 Preparing... ########################################### [100%] Switching to the down runlevel ... runsvchdir: down: now current. Switched runlevel Checking status of aspera-shares ... Status is running Stopping aspera-shares ... Stopped 1:aspera-shares ########################################### [100%] To complete the upgrade, please run this script as the root user: [root]$ /opt/aspera/shares/u/setup/bin/upgrade
[root] $ /opt/aspera/shares/u/setup/bin/upgrade
Starting aspera-shares ... Started Waiting for MySQL server to answer mysqld is alive Migrating the Shares database ... Initializing the Shares database ... Clearing background jobs ... Migrating the stats collector database ... Done
[root] $ /opt/aspera/shares/u/setup/bin/restore directory
Checking status of aspera-shares ... Status is running mysqld is alive Restoring the Shares database ... Migrating the Shares database ... Initializing the Shares database ... Configuring the stats collector to poll all nodes ... Done
Run the following commands to restart all Shares services at once. # service aspera-shares stop # service aspera-shares start