Friday, June 21, 2013

Linux Run a .sh File


git submodule update Permission Denied

git submodule update

fatal: Needed a single revision
Unable to find current revision in submodule path 'cookbooks/R'
  • rm -rf cookbooks/R

Permission denied (publickey)
fatal: The remote end hung up unexpectedly


Wednesday, June 19, 2013

Show Web Folder Contents (Apache Directory Listing)

GOAL: To allow internet access/permission of folder contents.  To solve, we have to edit the Apache configuration file.  Post specific to:  Linux, Ubuntu, Bitnami

1.  Find Apache Configuration File: apache2.conf or httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /opt/bitnami/apache2/conf/httpd.conf

2.  nano /etc/apache2/apache2.conf

3.  Add code & Save:
<Directory /var/www/>
Options Indexes FollowSymLinks
4.  sudo /etc/init.d/apache restart 
OR  sudo sh /opt/bitnami/ restart apache2
FollowSymLinks  |  Multiviews

Thursday, June 13, 2013

Monday, June 10, 2013

Set User as Admin / View All Admins [Ubuntu Linux]

PROBLEM:  I want to add see if a user in ubuntu linux is an administrator.

  • Ultimate Administrator in Linux = root
  • Administrator Group in Linux = sudo


Set Admin:

adduser <username> sudo

View Admins:

sudo apt-get install members
members --all <sudo>

Check if Specific User is an Admin:

groups <user>
if "sudo" shows up, this user is an admin

Increase Size of Amazon Instance


  1. ssh into instance
  2. df -h
    1. This command shows a human readable version of space used.  More info about Linux/Unix Free Disk Space
    2. /dev/xvda1 = your Elastic Block Storage
  1. AWS Management Console > EC2
  2. Instances > Right Click Instance that needs resized > Stop
  3. Volumes > Select Instance Volume > Actions > Create Snapshot (note the snapshot name & description)
    1. see newly created snapshot in Snapshots
  4. Volumes > Note Availability Zone & Attachment Information (e.g. /dev/sda1) of Existing Instance
  5. Right Click Existing, smaller size, Volume > Detach Volume
  6. Volumes > Create Volume
    1. Type: standard
    2. Size:  choose desired larger size
    3. Availability Zone:  choose same as noted in 4
    4. Snapshot:  choose created snapshot in 3
    5. Yes, Create
  7. Right Click New, larger sized, Volume > Attach Volume
    1. Instance desired (note that instance will not show up if volume was not setup in the same Availability Zone are original)
    2. Device:  e.g. /dev/sda1/ (your's may be different) under Attachment Information from above (if not correct, you will get an error when trying to restart instance)
  8. Instances > Right Click Instance that needs resized > Start
  9. Reassign IP of Instance
    1. Elastic IPs > Associate Address

Mac: Screenshot then Highlight part of it

SKITCH by Evernote = best way to take a screenshot then highlight part of it on Mac

Part of Screen:  Shift + Cmd + 5
Fullscreen:  Shift + Cmd + 6

(best mac equivalent of Window's Snipping Tool)