Advertisement
blsimpson

post_install

Oct 21st, 2016
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # !!This must be run as root!! #
  4. # The USB drive at this point should be manually mounted to /media/cdrom #
  5.  
  6. # Create post_install directory in users home directory
  7. mkdir /home/admin/post_install
  8.  
  9. # Copy post_install archive to home directory
  10. cp /media/cdrom/post_install/snapshot.tar /home/admin/post_install/
  11.  
  12. # Untar snapshot.tar archive
  13. cd /home/admin/post_install
  14. tar xvf snapshot.tar
  15.  
  16. # Add local repo to apt-get sources.list and update apt database
  17. echo "deb file:/home/admin/post_install/apt_install/archives /" | tee -a /etc/apt/sources.list
  18. apt-get update
  19.  
  20. # Install required packages
  21. apt-get install -y --allow-unauthenticated build-essential nginx postgresql python python-dev python-pip upstart-sysv python-psycopg2
  22.  
  23. # Install python modules using PIP
  24. pip install --no-index --find-links /home/admin/post_install/pip_install/ uwsgi
  25. pip install --no-index --find-links /home/admin/post_install/pip_install/ flask
  26. pip install --no-index --find-links /home/admin/post_install/pip_install/ flask_restful
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement