Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. def ll():
  2. run("ls -lah")
  3.  
  4.  
  5. def aptup():
  6. run("apt-get update")
  7.  
  8.  
  9. def aptinstall(package):
  10. run("apt-get install -y %s" %package )
  11.  
  12.  
  13. def inscomposer():
  14.  
  15. run("wget %s" % composerBin)
  16.  
  17.  
  18. def composer(args=''):
  19.  
  20. run("php ~/composer.phar %s" % args)
  21.  
  22.  
  23. def pokapoka():
  24. run("curl ifconfig.co")
  25. #
  26.  
  27. def install_mysql():
  28.  
  29. # with settings(hide('warnings', 'stderr'), warn_only=True):
  30. # result = sudo('dpkg-query --show mysql-server')
  31. # if result.failed is False:
  32. # warn('MySQL is already installed')
  33. # return
  34.  
  35. # mysql_password = prompt('Please enter MySQL root password:')
  36.  
  37. sudo('echo "mysql-server-5.0 mysql-server/root_password password ' \
  38. '%s" | debconf-set-selections' % mysql_root_password)
  39. sudo('echo "mysql-server-5.0 mysql-server/root_password_again password ' \
  40. '%s" | debconf-set-selections' % mysql_root_password)
  41. aptinstall('mysql-server')
  42.  
  43.  
  44.  
  45.  
  46. def prepareenv():
  47. aptup()
  48. aptinstall('php5')
  49. inscomposer()
  50. aptinstall('git')
  51. aptinstall('mc')
  52. aptinstall('htop')
  53. aptinstall('strace')
  54. aptinstall('zip')
  55. aptinstall('unzip')
  56. aptinstall('curl')
  57. aptinstall('mysql-common')
  58. aptinstall('php5-mysql')
  59. aptinstall('php5-curl')
  60. install_mysql()
  61. aptinstall('phpmyadmin')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement