https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Install MongoDB

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

# Ubuntu 12.04
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

# Ubuntu 14.04
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

# Ubuntu 16.04
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

apt-get update
apt-get install -y mongodb-org

Conf file

/etc/mongod.conf

Start MongoDB

service mongod start

Stop MongoDB

service mongod stop

Restart MongoDB

service mongod restart

Remove MongoDB

# Stop MongoDB
service mongod stop

# Uninstall MongoDB
apt-get purge mongodb-org*

# Remove confing and log file
rm -r /var/log/mongodb
rm -r /var/lib/mongodb

'개발' 카테고리의 다른 글

Pyinstaller decompile  (0) 2019.10.24
Windows10 에서 npm 업데이트  (0) 2019.01.29
MongoDB setup on Ubuntu  (0) 2017.09.10
GIT 초기 최적화  (0) 2017.02.15
구글번역 사용시 코드영역 제외하고 번역하기  (1) 2017.02.12
브라우저 header  (0) 2017.02.09

sudo apt-get install python3-dev libffi-dev openssl
sudo apt-get install default-libmysqlclient-dev # for debian stretch
pip3 install mysqlclient

컴파일과 빌드에 필요한 패키지 설치

sudo apt-get install build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y

파이썬 다운로드, 컴파일&빌드

sudo -s
cd /tmp
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
# wget https://npm.taobao.org/mirrors/python/3.6.8/Python-3.6.8.tar.xz
tar xvf Python-3.6.8.tar.xz
./Python-3.6.8/configure --prefix=/usr/local --enable-optimizations && make altinstall

(간혹 python.org 서버에 장애가 있다면 타오바오에서 호스팅하는 미러 서버를(https://npm.taobao.org/mirrors/python) 이용할 수 있다.)



심볼릭 링크 걸기

sudo ln -sf /usr/local/bin/python3.6 /usr/local/bin/python3
sudo ln -sf /usr/local/bin/pip3.6 /usr/local/bin/pip3

다운로드&빌드한 파일 삭제

rm -rf /tmp/*



설치 완료 후 파이썬 버전 확인

python3 --version


+ Recent posts