# disk의 rw 유무 확인 / 혼자 ro일 가능성 높음
cat /proc/mounts | grep /dev
fsck -f /dev/vda1
reboot
# 그래도 안되면
umount /dev/vda1
e2fsck /dev/vda1
This file contains hidden or 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
def send_msg(msg): | |
req = requests.post(url=f'https://api.telegram.org/bot{token}/sendMessage', | |
json={'chat_id': chat_id, | |
'text': msg}) | |
return req.text |
- pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
This file contains hidden or 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
current_dir = os.path.dirname(os.path.abspath(__file__)) | |
project_root = os.path.dirname(sys.modules['__main__'].__file__) |
This file contains hidden or 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
sudo apt-get install mongodb-clients | |
mongo --host {host} -u admin -p --authenticationDatabase admin | |
27017 | |
1. 계정 생성하기 | |
db.createUser({user: "계정이름", | |
pwd: "비밀번호", |
This file contains hidden or 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
``` | |
sudo apt-get update | |
sudo apt-get install nginx -y | |
``` | |
- 기본 호스트 path : `/var/www/html` | |
- Config path : `/etc/nginx` |
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
NewerOlder