docker run -d --hostname my-rabbit --name rabbitmq -p 8080:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password rabbitmq:3-management


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

RabbitMQ on Docker  (0) 2023.06.05
MySQL 8 on docker  (1) 2018.11.04
Redis on docker  (0) 2018.08.13
docker ubuntu apt 미러 서버 교체하기  (1) 2017.07.08

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
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


docker 로 ubuntu를 내려받아 apt-get으로 이것저것 설치 해보려는데 너무 느려서 뭘 할수가 없을 지경에 이르렀다.
docker pull ubuntu 로 받아온 ubuntu는 apt-get에서 다운로드할때 기본적으로 미국서버를 사용하기 때문인데,

/etc/apt/sources.list 의 서버 목록을 한국 미러서버로 모두 바꿔주면 굉장히 빠르게 apt-get이 실행이 된다!

sed -i 's@archive.ubuntu.com@kr.archive.ubuntu.com@g' /etc/apt/sources.list


Dockerfile



미러서버의 목록은 아래 사이트에서 확인할수 있다.


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

RabbitMQ on Docker  (0) 2023.06.05
MySQL 8 on docker  (1) 2018.11.04
Redis on docker  (0) 2018.08.13
Running RabbitMQ on docker  (0) 2017.12.19
wget https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh
chmod +x Berryconda3-2.0.0-Linux-armv7l.sh
./Berryconda3-2.0.0-Linux-armv7l.sh -p /usr/local -b -s -u

github이 너무 느려서 gitlab에다 미러를 하나 만들었다.
https://gitlab.com/herren.lmc/mirror/raw/master/Berryconda3-2.0.0-Linux-armv7l.sh 으로 요청하면 조금더 빠르게 다운로드 할수 있다.

wget https://gitlab.com/herren.lmc/mirror/raw/master/Berryconda3-2.0.0-Linux-armv7l.sh
chmod +x Berryconda3-2.0.0-Linux-armv7l.sh
./Berryconda3-2.0.0-Linux-armv7l.sh -p /usr/local -b -s -u

한글이 깨질경우 간단하게 자바에서 인코딩을 확인해본다.

String originalStr = "Å×½ºÆ®"; // 테스트 
String [] charSet = {"utf-8","euc-kr","ksc5601","iso-8859-1","x-windows-949"};

for (int i=0; i<charSet.length; i++) {
 for (int j=0; j<charSet.length; j++) {
  try {
   System.out.println("[" + charSet[i] +"," + charSet[j] +"] = " + new String(originalStr.getBytes(charSet[i]), charSet[j]));
  } catch (UnsupportedEncodingException e) {
   e.printStackTrace();
  }
 }
}



OutPut

[utf-8,utf-8] = Å×½ºÆ®
[utf-8,euc-kr] = ��쩍쨘�짰
[utf-8,ksc5601] = ��쩍쨘�짰
[utf-8,iso-8859-1] = Å×½ºÆ®
[utf-8,x-windows-949] = 횇횞쩍쨘횈짰
[euc-kr,utf-8] = ?����������
[euc-kr,euc-kr] = ?×½ºÆ®
[euc-kr,ksc5601] = ?×½ºÆ®
[euc-kr,iso-8859-1] = ?¡¿¨ö¨¬¨¡¢ç
[euc-kr,x-windows-949] = ?×½ºÆ®
[ksc5601,utf-8] = ?����������
[ksc5601,euc-kr] = ?×½ºÆ®
[ksc5601,ksc5601] = ?×½ºÆ®
[ksc5601,iso-8859-1] = ?¡¿¨ö¨¬¨¡¢ç
[ksc5601,x-windows-949] = ?×½ºÆ®
[iso-8859-1,utf-8] = �׽�Ʈ
[iso-8859-1,euc-kr] = 테스트
[iso-8859-1,ksc5601] = 테스트
[iso-8859-1,iso-8859-1] = Å×½ºÆ®
[iso-8859-1,x-windows-949] = 테스트
[x-windows-949,utf-8] = ?����������
[x-windows-949,euc-kr] = ?×½ºÆ®
[x-windows-949,ksc5601] = ?×½ºÆ®
[x-windows-949,iso-8859-1] = ?¡¿¨ö¨¬¨¡¢ç
[x-windows-949,x-windows-949] = ?×½ºÆ®

[python] int to bytes


def int2bytes(n):
    result = bytearray()
    while (n):
        result.append(n & 0xff)
        n = n >> 8
    return result[::-1]
>>> list( int2bytes(4132) )
[16, 36]

python의 int 또는 long타입을 빅 엔디안(Big-Endian) 의 byte 로 변환하는 함수이다.
리틀 엔디안(Little-Endian)으로 변환하고 싶은 경우 [::-1]를 빼면 된다.

설정

git config --global user.name "LMC"
git config --global user.email 2_minchul@naver.com
git config --global credential.helper store


새 저장소 만들기

git init
git remote add origin {url}
git add .
git commit -am "first"
git push -u origin master



리모트 저장소에서 복사

git clone {url}


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

Windows10 에서 npm 업데이트  (0) 2019.01.29
MongoDB setup on Ubuntu  (0) 2017.09.10
구글번역 사용시 코드영역 제외하고 번역하기  (1) 2017.02.12
브라우저 header  (0) 2017.02.09
[html] post 방식을 링크 시키는 방법  (3) 2017.01.25

No Translate!


Chrome 확장 프로그램

No Translate!
v 1.0


To not translate code areas of a website when using Google Translate.

구글번역기를 사용할 때 code영역까지 번역되지 않도록 합니다.


link:
https://chrome.google.com/webstore/detail/hajedkmmabmecpcbfcigalbfpnebhego



012



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

MongoDB setup on Ubuntu  (0) 2017.09.10
GIT 초기 최적화  (0) 2017.02.15
브라우저 header  (0) 2017.02.09
[html] post 방식을 링크 시키는 방법  (3) 2017.01.25
자주 쓰이는 mail header  (0) 2017.01.15

+ Recent posts