original source : https://youtu.be/Xjdv31k-Kf4

이 동영상은 1시간 분량인데 굉장히 설명이 잘되있으며 단계별 정리가 되어있다.

digitalocean 에 프로젝트 올릴때 사용했다. 위 동영상은 새로 시작하는setting 작업이고 이미 있는 프로젝트의 deploy는 https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04#create-and-configure-a-new-django-project 를 따라 할수 있다. 이를 기반으로 한 동영상은 https://youtu.be/BrVHwQ-SJUA 이며 이는 apache가 아닌 Gunicorn wsgi를 이용했다. 

image
image
image

위는 ubuntu 처음 시작전 update와 upgrade를 하는 과정이다. 

image

동영상 게시자가 추천하는 구조이다.꼭 따라야 하는 것은 아니다. 

image
pip install -r /path/to/requirements.txt

requirements.txt에 있는 libraries들을 설치하는 방법

git clone, fetch, pull의 차이점 설명

https://stackoverflow.com/questions/3620633/what-is-the-difference-between-pull-and-clone-in-git

image
image

위에서 호스트 주소가 바뀐것을 유심히 볼것

image

mysql_secure_installation는 보안성을 높이는 과정이다. 

https://stackoverflow.com/q/20760908/3151712 참조

image

데이터베이스 연결정보 화일을 외부에 두는 방법이다. (옵셥사항)

image

최초 migrate을 통해 admin tables생성및 django superuser만드는법

image

아이피주소뒤에 붙는 port 주소를 없애기위해서는 apache server가 필요하다.그리고 설정수정을 한다.

image

python-path =  이값은 manage.py가 있는 경로

python-hom =  이값은 virtual env가 있는 경로

image
image

static화일 경로 설정이 필요하다. 

we need little setting up process for using dome siren with smartthings.

first, we have download device handler and upload to smartthings ide, and specified the device as dome siren at device page 

details for setting up 

https://community.smartthings.com/t/release-dome-siren-official/75499/173

changing device as dome siren at “my devices” tab 

https://community.smartthings.com/t/release-dome-siren-official/75499/265?u=darkstar

when i can’t find my devices at webcore

follow instruction below

https://community.smartthings.com/t/presence-sensor-not-listed-in-devices/103093/5?u=darkstar

Open the SmartThings app
Go to the WebCoRe smartapp
Click into it
Then settings
Then available devices and you add it in there.

we need little setting up process for using dome siren with smartthings.

first, we have download device handler and upload to smartthings ide, and specified the device as dome siren at device page 

details for setting up 

https://community.smartthings.com/t/release-dome-siren-official/75499/173

changing device as dome siren at “my devices” tab 

https://community.smartthings.com/t/release-dome-siren-official/75499/265?u=darkstar

when i can’t find my devices at webcore

follow instruction below

https://community.smartthings.com/t/presence-sensor-not-listed-in-devices/103093/5?u=darkstar

Open the SmartThings app
Go to the WebCoRe smartapp
Click into it
Then settings
Then available devices and you add it in there.

original source : https://developer.android.com/training/wearables/apps/debugging.html

실제 기기들을 이용해서 하는 debug 설정

mobile은 usb로 개발용 컴퓨터에 연결, wear는 bluetooth를 통해 mobile을 거쳐 r개발용 컴퓨터에 연결하는 방법

Enable Developer Options on your watch

Before you can debug on your watch you must enable developer options. You only need to do this one time. Developer options remain enabled until you disable them.

  1. Open the watch’s Settings.
  2. Tap System > About.
  3. Scroll to Build number and tap the build number seven times.
  4. A dialog will appear confirming that you are now a developer.

Debugging over Bluetooth

Bluetooth debugging only works for Android-paired watches. Before you begin, be sure the watch and phone are paired and you’ve enabled developer options on the watch. You should also be sure that developer options is also enabled on the phone. To check, open the phone’s Settings menu, selectAbout phone and click the build number seven times.

Enable USB debugging on the phone

  1. Open the phone’s Settings menu.
  2. Select Developer Options and enable USB debugging.

Enable ADB/Bluetooth debugging on the watch

  1. Open the watch’s Settings menu.
  2. Scroll to Developer Options.
  3. Confirm that ADB debugging is enabled.
  4. Enable Debug over Bluetooth.

Enable Bluetooth debugging on the phone

(mobile기기에 설치된 android wear 앱의 기본화면)

image

(mobile기기에 설치된 android wear 앱의 설정화면)

image

(하단의 Debugging over Bluetooth 을 enale해야한다. 5번 내용)

  1. On the phone, open the Android Wear companion app.
  2. Tap the Settings icon.
  3. Enable Debugging over Bluetooth. A status message appears under the option. It looks like this:
Host: disconnected
Target: connected

At this point the development machine (the host) is not communicating with with the watch (the target). You need to complete the link.

Connect the debugger to the watch

In this final step, you’ll use everything: the debugger, the phone, and the watch.

C:UsersjacobAppDataLocalAndroidsdkplatform-tools> 경로안에 adb 가들어있다. 그러므로 이 폴더 안으로 들어가서 아래 명령어를 실행한다.

(이작업은 handheld기기가 컴퓨터와 연결이 끊어지거나 android studio 가 새로 시작되면 매번 다시해야 하는 작업이다.)

image
adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444

Note: You must use the IP address 127.0.0.1. You can use any available port on your development machine. Be sure you use the same port in both commands. (In this example the port is 4444.)

Host: connected
Target: connected

The watch is now connected to the debugger and you’re ready to start debugging.

When you debug a watch using Bluetooth, adb always uses the IP address 127.0.0.1 plus the port that you assigned. Therefore, all adb commands use this format (continuing the example, the port is 4444):

adb -s 127.0.0.1:4444 <command> 

If you are not using the emulator and have only one device connected for debugging, you don’t need to specify the address at all:

adb <command>

mac os의 경우 
https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

Option 2 – Manually (just the platform tools)

This is the easiest way to get a manual installation of ADB and Fastboot.

Delete your old installation (optional)

rm -rf ~/.android-sdk-macosx/

Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the SDK Platform-Tools for Mac link.

Go to your Downloads folder

cd ~/Downloads/

Unzip the tools you downloaded

unzip platform-tools-latest*.zip 

Move them somewhere you won’t accidentally delete them

mkdir ~/.android-sdk-macosx
mv platform-tools/ ~/.android-sdk-macosx/platform-tools

Add platform-tools to your path

echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile

Refresh your bash profile (or restart your terminal app)

source ~/.bash_profile

Start using adb

adb devices

original source : https://developer.android.com/training/wearables/apps/debugging.html

실제 기기들을 이용해서 하는 debug 설정

mobile은 usb로 개발용 컴퓨터에 연결, wear는 bluetooth를 통해 mobile을 거쳐 r개발용 컴퓨터에 연결하는 방법

Enable Developer Options on your watch

Before you can debug on your watch you must enable developer options. You only need to do this one time. Developer options remain enabled until you disable them.

  1. Open the watch’s Settings.
  2. Tap System > About.
  3. Scroll to Build number and tap the build number seven times.
  4. A dialog will appear confirming that you are now a developer.

Debugging over Bluetooth

Bluetooth debugging only works for Android-paired watches. Before you begin, be sure the watch and phone are paired and you’ve enabled developer options on the watch. You should also be sure that developer options is also enabled on the phone. To check, open the phone’s Settings menu, selectAbout phone and click the build number seven times.

Enable USB debugging on the phone

  1. Open the phone’s Settings menu.
  2. Select Developer Options and enable USB debugging.

Enable ADB/Bluetooth debugging on the watch

  1. Open the watch’s Settings menu.
  2. Scroll to Developer Options.
  3. Confirm that ADB debugging is enabled.
  4. Enable Debug over Bluetooth.

Enable Bluetooth debugging on the phone

(mobile기기에 설치된 android wear 앱의 기본화면)

image

(mobile기기에 설치된 android wear 앱의 설정화면)

image

(하단의 Debugging over Bluetooth 을 enale해야한다. 5번 내용)

  1. On the phone, open the Android Wear companion app.
  2. Tap the Settings icon.
  3. Enable Debugging over Bluetooth. A status message appears under the option. It looks like this:
Host: disconnected
Target: connected

At this point the development machine (the host) is not communicating with with the watch (the target). You need to complete the link.

Connect the debugger to the watch

In this final step, you’ll use everything: the debugger, the phone, and the watch.

C:UsersjacobAppDataLocalAndroidsdkplatform-tools> 경로안에 adb 가들어있다. 그러므로 이 폴더 안으로 들어가서 아래 명령어를 실행한다.

(이작업은 handheld기기가 컴퓨터와 연결이 끊어지거나 android studio 가 새로 시작되면 매번 다시해야 하는 작업이다.)

image
adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444

Note: You must use the IP address 127.0.0.1. You can use any available port on your development machine. Be sure you use the same port in both commands. (In this example the port is 4444.)

Host: connected
Target: connected

The watch is now connected to the debugger and you’re ready to start debugging.

When you debug a watch using Bluetooth, adb always uses the IP address 127.0.0.1 plus the port that you assigned. Therefore, all adb commands use this format (continuing the example, the port is 4444):

adb -s 127.0.0.1:4444 <command> 

If you are not using the emulator and have only one device connected for debugging, you don’t need to specify the address at all:

adb <command>

mac os의 경우 
https://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

Option 2 – Manually (just the platform tools)

This is the easiest way to get a manual installation of ADB and Fastboot.

Delete your old installation (optional)

rm -rf ~/.android-sdk-macosx/

Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the SDK Platform-Tools for Mac link.

Go to your Downloads folder

cd ~/Downloads/

Unzip the tools you downloaded

unzip platform-tools-latest*.zip 

Move them somewhere you won’t accidentally delete them

mkdir ~/.android-sdk-macosx
mv platform-tools/ ~/.android-sdk-macosx/platform-tools

Add platform-tools to your path

echo 'export PATH=$PATH:~/.android-sdk-macosx/platform-tools/' >> ~/.bash_profile

Refresh your bash profile (or restart your terminal app)

source ~/.bash_profile

Start using adb

adb devices

1. virtualenv화일,폴더들을 다운 받아 압축해제한다. (godaddy 에서 sudo를 사용할수 없으므로 virtualenv를 사용한다.)

2. 그 화일,폴더들을 가상 공간으로 사용할 곳에 upload 한다.

3. SSH putty를 이용. 해당 폴더로 이동간다. python virtualenv.py  VE    ( VE 는 가상공간의 이름) 를 통해 가상 공간을 만든다.

4. VE/bin 안으로 이동한다. 그안에서 source activate 를 친다. 그럼 가상 python 환경으로 들어 가게 된다.

5. pip install django 명령을 통해 django 버전 1.6 을 설치한다.

http://stackoverflow.com/questions/12658427/installing-a-django-site-on-godaddy 두번째 대답을 참조한 내용. 단 godaddy의 경우 python 2.6를 지원하며 이는  django 1.6 과 호환되므로 설치시 버전 명기.

1. virtualenv화일,폴더들을 다운 받아 압축해제한다. (godaddy 에서 sudo를 사용할수 없으므로 virtualenv를 사용한다.)

2. 그 화일,폴더들을 가상 공간으로 사용할 곳에 upload 한다.

3. SSH putty를 이용. 해당 폴더로 이동간다. python virtualenv.py  VE    ( VE 는 가상공간의 이름) 를 통해 가상 공간을 만든다.

4. VE/bin 안으로 이동한다. 그안에서 source activate 를 친다. 그럼 가상 python 환경으로 들어 가게 된다.

5. pip install django 명령을 통해 django 버전 1.6 을 설치한다.

http://stackoverflow.com/questions/12658427/installing-a-django-site-on-godaddy 두번째 대답을 참조한 내용. 단 godaddy의 경우 python 2.6를 지원하며 이는  django 1.6 과 호환되므로 설치시 버전 명기.