Example #1
0
 def install_binary_rpm_64(self):
     "Install using the binary RPM (it'll download you don't have the file)"
     url = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=39488'
     filename = '/tmp/jre-6u20-linux-x64-rpm.bin'
     filename_on_system = ask_or_download(url, filename)
     if not filename_on_system:
         return False
     sh_io('chmod +x %s' % filename_on_system)
     return sh_io(filename_on_system)
Example #2
0
 def install_binary_rpm_64(self):
     "Install using the binary RPM (it'll download you don't have the file)"
     url = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=39488'
     filename = '/tmp/jre-6u20-linux-x64-rpm.bin'
     filename_on_system = ask_or_download(url, filename)
     if not filename_on_system:
         return False
     sh_io('chmod +x %s' % filename_on_system)
     return sh_io(filename_on_system)
Example #3
0
    def install_apt(self):
        'Install using aptitude'
        distribution = get_operating_system()[0]
        if distribution == 'Debian':
            self.add_nonfree_repository()

        #TODO: trust untrusted packages: read aptitude output and say yes
        return sh_io('aptitude -y install sun-java6-jre')
Example #4
0
    def install_apt(self):
        'Install using aptitude'
        distribution = get_operating_system()[0]
        if distribution == 'Debian':
            self.add_nonfree_repository()

        #TODO: trust untrusted packages: read aptitude output and say yes
        return sh_io('aptitude -y install sun-java6-jre')
Example #5
0
 def install_binary_32(self):
     'Install with the binary 32bit (without RPM)'
     url = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=39485'
     filename = '/tmp/jre-6u20-linux-i586.bin'
     filename_on_system = ask_or_download(url, filename)
     if not filename_on_system:
         return False
     print2('Installing JRE ... ')
     sh_io('chmod +x %s' % filename_on_system)
     java_install = sh(filename_on_system, finalize=False)
     ask_agree = 'Do you agree to the above license terms? [yes or no]\n'
     while java_install.stdout.readline() != ask_agree:
         pass #Read the Java License carefully: line by line
     java_install.stdin.write('yes\n') #As I've read I can accept
     out, err = java_install.communicate()
     java_install.wait()
     #TODO: now it is unpacked on ./jre1.6.0_20/. What should I do?
     # Move to /opt and create symlinks on /usr/bin?
     if java_install.returncode == 0:
         print('OK')
         return True
     else:
         print('FAILED')
         return False
Example #6
0
 def install_binary_32(self):
     'Install with the binary 32bit (without RPM)'
     url = 'http://javadl.sun.com/webapps/download/AutoDL?BundleId=39485'
     filename = '/tmp/jre-6u20-linux-i586.bin'
     filename_on_system = ask_or_download(url, filename)
     if not filename_on_system:
         return False
     print2('Installing JRE ... ')
     sh_io('chmod +x %s' % filename_on_system)
     java_install = sh(filename_on_system, finalize=False)
     ask_agree = 'Do you agree to the above license terms? [yes or no]\n'
     while java_install.stdout.readline() != ask_agree:
         pass  #Read the Java License carefully: line by line
     java_install.stdin.write('yes\n')  #As I've read I can accept
     out, err = java_install.communicate()
     java_install.wait()
     #TODO: now it is unpacked on ./jre1.6.0_20/. What should I do?
     # Move to /opt and create symlinks on /usr/bin?
     if java_install.returncode == 0:
         print('OK')
         return True
     else:
         print('FAILED')
         return False
Example #7
0
 def install_yum(self):
     'Install using YUM'
     return sh_io('yum install -y java-1.6.0-openjdk')
Example #8
0
 def install_apt(self):
     'Install using aptitude'
     #We need to answer debconf for root password
     return sh_io('aptitude -y install mysql-server')
Example #9
0
 def install_yum(self):
     'Install using YUM'
     return sh_io('yum install -y mysql-server.x86_64')
Example #10
0
 def install_yum(self):
     'Install using YUM'
     return sh_io('yum install -y java-1.6.0-openjdk')
Example #11
0
 def install_apt(self):
     'Install using aptitude'
     #We need to answer debconf for root password
     return sh_io('aptitude -y install mysql-server')
Example #12
0
 def install_yum(self):
     'Install using YUM'
     return sh_io('yum install -y mysql-server.x86_64')