Essential installation script for Amazon Linux 2023
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################### | |
# Initialization Script for Amazon Linux 2023 | |
############################################### | |
# Set the Timezone to KST | |
sudo rm /etc/localtime | |
sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime | |
# Change hostname | |
sudo hostnamectl set-hostname chatbaker-www1 | |
# Yum update & Install essential packages | |
sudo yum update -y | |
sudo yum install htop gtk3 docker git -y | |
# Docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user | |
sudo chmod 666 /var/run/docker.sock | |
# docker-compose | |
sudo curl -L https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
# Anaconda | |
curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh | |
bash Anaconda3-2023.07-2-Linux-x86_64.sh -b -p $HOME/anaconda3 | |
# New environment with Python 3.10 | |
source anaconda3/bin/activate | |
conda init bash | |
conda create -y -n chatbaker python=3.10 | |
bash -c 'echo " | |
conda activate chatbaker | |
" >> ~/.bashrc' | |
# Reconnect to AWS | |
######################## | |
# Development Tools | |
######################## | |
$ sudo yum groupinstall "Development Tools" -y | |
# for AWS Elastic Inference | |
$ source activate amazonei_tensorflow_p36 | |
######################## | |
# nodejs & gnomon | |
######################## | |
$ sudo yum install -y gcc-c++ make | |
$ curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash - | |
$ sudo yum install -y nodejs | |
$ sudo npm install -g gnomon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment