Posts

getCurrentPosition() 적용해봄 -> 실패 (https가 아니라서)

아래와 같이 html문서에 넣어봤으나, https가 아니라서 실패.  var centPos =[ 37.566513 , 126.9783039 ]; if ( navigator . geolocation ){ navigator . geolocation . getCurrentPosition (( curPos ) => { centPos = [ curPos . coords . latitude , curPos . coords . longitude ]; }); } else { console . log ( "geolocation is not supported" ); }

Opentopomap tile server 를 docker로 만들기

Image
 일종의 나도 보고, 관심있는 분들도 잠깐 훑어보는 보고서 같은거.  1.Opentopomap을 로컬서버에 설치해서 로컬 장비에서 지도를 표시하게 하는 일이 필요해짐.  2. 기존의 방식은 https://github.com/der-stefan/OpenTopoMap/blob/master/mapnik/README.md 을 읽고, 정확히는 각 버젼별로 설치방법이 나온 텍스트를 읽고 그냥 따라함.  3. 그리고 나니 docker로는 큰 사이즈인 50GB 이미지를 만듬.  4. 처음에 하는 apt-get update만 하고 apt-get upgrade를 안하니 30GB로 만들 수 있었음.  5. postgresql 데이터에서 otm-isolation error가 자꾸 떠서 50GB짜리 이미지에서 /var/lib/postgresql 데이터를 압축해서 따로 가져와서 다시 30GB짜리 이미지에 덮어쓰기로 실행.  6. CORS 부분은 /var/www/html/index.html에서 지도 tile map server를 localhost:88로 하냐, fl2.me:88 로 하나 부분으로 해결. 도메인 이름이 있는것과 localhost는 안에는 안에꺼만 도메인은 도메인외부에서 오는것만 하는듯.  7. postgresql 은 잘 깨져서 docker이미지에서는 실행시키지 않고, docker 컨테이너로 실행시킨후에 sudo service postgresql status / sudo service apache2 status로 각각 두 서비스를 실행되었는지 확인후 실행시켜준다.  8. su gis로 renderd -f -c /usr/local/etc/renderd.conf & 로 실행. 

몽고DB에 새 DB만들고 새계정 등록하기 / How to create new DB of mongoDB and how to create account for that DB

 1. mongoDB에 접속 mongo -u mongodbadmin -p password > use newDB > db.createUser({ user: "newdbuser", pwd: "password", roles: [ "readWrite" ] }) Successfully added user: { "user" : "pusangpruser", "roles" : [ "readWrite" ] } > db.createUser({ user: "newdbadmin", pwd: "password", roles: [ "dbAdmin" ] }) Successfully added user: { "user" : "pusangpradmin", "roles" : [ "dbAdmin" ] } 후에 mongodb url로 접속 mongodb://newdbuser:password@127.0.0.1:27017/newDB

Windows 11 to log in using local account not Microsoft account/윈도11 마이크로소프트 계정 로그인 안하는법

Image
 요즘 컴퓨터 윈도우 11 로그인이 로컬계정이 안된다길래 확인해보니,  마이크로소프트 계정 로그인전에 네트워크를 끊으면 된다고 하네요.  SHIFT+F10으로 시도를 해봤으나 잘 안되서 저는  WIFI잡고 설정 다한후에, 걍 WIN+R 누르고 ipconfig /release 를 입력하고 엔터를 누르니,  바로 로컬계정으로 설정가능하네요.  걍 이메일에 abc 암호에 123 눌러도 됨.  Recently,  I got Windows 11 tablet and tried to set up local account.  But, there are lots of ways to make local account log-in.  So, I connect Windows 11 tablet to my Wifi and when I got into microsoft log-in page,  Coneect USB keyboard(USB A to USB-C converter) and press WIN+R, then type ipconfig /release to disconnect all network.  So, now I can get local account log-in page.  Or just type abc in email and 123 for password.  Then it will be changed to local account.   

docker로 osm tile server실행하기 팁(한글폰트 수정)

1. docker exec -it [container-id] bash 로 실행 중인 docker 컨테이너에 접속 2. nano /home/renderer/src/opnstreetmap-carto/mapnik.xml 로 수정 준비 참고로 없을 경우, apt-get install nano로 실행해서 설치해준다.  3. CTRL+\ 를 눌러서 단어 바꾸기 실행 JP -> KR로 수정 후 저장 4. nan o  / usr /local/ etc / renderd.conf font_dir가 /usr/share/fonts 로 수정. (truetype에는 NOTO-SANS KR이 없음. ) docker run -p 8080:80 -v openstreetmap-data:/var/lib/postgresql/12/main -d sanghkim/openstreetmap-tile-server:latest run 로 실행 중. 그런데 해보니, image를 commit명령으로 새로 저장해줘야. 위에 수정된 게 저장됨.  실행 중에 빠져 나와서 docker commit  openstreetmap-tile-server openstreetmap-tile-server 혹은 docker ps 로 container ID를 얻은 후에 docker commit [containerID] openstreetmap-tile-server 로 저장해준다. 나중에 이거를 클라우드에 업로드 해도 되고, 기존대로 저장한걸 써도 된다.  

centos7 sshd 접속안될때 ssh서버 ssh server

Recently, I installed sshd on centos7.  But somehow, sshd is working okay but sometimes cannot connect ssh server.  Company use static IP address for this centos server.  As I spent 3 days for trying every methods, I finally get REAL cause why this happens.  It was IP address conflict.  As IP address conflict happens, centos7 is not connected to internet.  Anyway, I assign static different IP address, it works like a charm. If you got an error to connect ssh server, make sure server IP address is conflicted or not.  Have a nice server administrations!!! ------------------------------------------------- 최근에 CENTOS7 서버에 SSH서버(SSHD)를 설치했는데, 어느날은 접속이 되고, 어느날은 접속이 안되는 현상 발견.  3일간의 헛짓 이후 알아낸건 IP주소 충돌이었다.  알고보니, CENTOS7이 IP충돌이 발생하는데, 인터넷이 연결안되는거 외에는 현상이 없음.  결국은 새로운 IP설정하는 잘 되더라구요.  그럼 서버관리들 잘하시길..