Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sechiro/fc534933d623ca0d6863 to your computer and use it in GitHub Desktop.
Save sechiro/fc534933d623ca0d6863 to your computer and use it in GitHub Desktop.
Amazon Linux上でCode CommitのR/Wの設定をして、Scrapyをインストール
#!/bin/bash
set -ue
script_dir=$(cd $(dirname $0);pwd)
# Code commit setting
# インスタンスロールでコードコミットのR/W権限をつけていることが前提
sudo yum install git
git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
# Install Scrapy
sudo yum groupinstall "Development tools"
sudo yum install python-devel libffi-devel openssl-devel libxml2-devel libxslt-devel
sudo pip install virtualenvwrapper
echo "Add virtualenv setting:"
cat <<EOL | tee -a ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
EOL
. ~/.bashrc
pip install scrapy
sudo yum install mosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment