AWS試したこと
EC2でReactを動かす
EC2でDjangoを動かす
yum -y install python-pip
sudo yum install -y python3
pip install -U pip
ec2-user@ip-172-31-11-226 shiftan-v2$ pip install -r requirements.txt
shiftan上で (python3 -m venv .)
shiftan上で source ./bin/activate
ここでmysqlを入れる
sudo yum remove mariadb-*
sudo yum install mysql-community-server
sudo yum install python-devel mysql-devel
sudo yum install python3-devel
sudo yum install gcc
pip install -r requirements.txt
sudo systemctl start mysqld //mysqlを起動
「django」というユーザーを作る
migrateする
python3 manage.py makemigrations shiftan
python3 manage.py migrate
起動
source ./bin/activate
python3 manage.py runserver 0.0.0.0:8000