728x90
반응형

1. rsync 다운로드

$ sudo yum install rsync

# 혹은

$ sudo apt install rsync

 

2. 사용법

$ rsync [OPTIONS] [SOURCE] [TARGET]

 

3. 예제

# 로컬 데이터를 로컬에 복사
$ rsync -avh /home/user/data /home/new_user/backup

# 로컬의 데이터를 리모트로 복사 
$ rsync -avh /home/user/data remote_user@remotehost:/home/remote_user/backup

# ssh 포트가 다른 경우
$ rsync -avh -e "ssh -p 123" /home/user/data remote_user@remotehost:/home/remote_user/backup

# 리모트 데이터를 로컬로 가져옴
$ rsync -avh remote_user@remotehost:/home/remote_user/backup /home/user/data

 

-ravPh 옵션을 주면 Progress도 확인할 수 있다.

 

4. ssh 파일 전송 예제

rsync -ravPh abc.tar Server:~/
728x90
반응형
728x90
반응형

1. ~/.ssh/config 생성

Host Server
  HostName IP주소
  User 유저이름
  Port 22
  IdentityFile pem파일위치

 

 

2. pem 파일 권한 수정

chmod 400 pem파일위치

 

3. 이름으로 ssh 접속

$ssh Server
728x90
반응형
728x90
반응형
  • Control + o : 컨트롤러에 서비스 생성
  • Control + r : 마지막 실행했던거 다시 실행

 

  • Command + n : 생성자 생성 
  • Command + alt + v : 객체 인스턴스 생성 
  • Command + alt + l : 코드 자동정렬

 

  • Alt(option) + enter : import class

 

 

  • sout : System out println
  • soutv : 내가 보고싶은 변수 출력
728x90
반응형
728x90
반응형

1. 먼저 인스턴스에 접속해서 ssh 터미널을 키고 아래 명령어를 입력한다.

$ sudo apt update
$ sudo apt install ubuntu-desktop
$ sudo apt install tightvncserver
$ sudo apt install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

 

2. vncserver 를 실행한다. ( 비밀번호를 기억해두어야함 )

$ vncserver

 

3. vnc config 파일을 수정한다.

$ sudo vi ~/.vnc/xstartup

~/.vnc/xstartup

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

 

4. vncserver를 재시작 해준다.

$ vncserver -kill :1
$ vncserver

 

5. 인바운드 규칙을 수정하여 5901 포트를 열어준다

 

6. Finder 에서 command + k 로 VNC 실행 후 ip 주소와 5901 포트까지 설정해서 켜준다.

 

- 성공화면

728x90
반응형
728x90
반응형

1. Date 객체를 이용한 타임스탬프로의 전환

// 타임스탬프로 변환
function Unix_timestampConv()
{
    return Math.floor(new Date().getTime() / 1000);
}

 

2. 타임스탬프 값을 년월일로 변환

function Unix_timestamp(t){
    var date = new Date(t*1000);
    var year = date.getFullYear();
    var month = "0" + (date.getMonth()+1);
    var day = "0" + date.getDate();
    var hour = "0" + date.getHours();
    var minute = "0" + date.getMinutes();
    var second = "0" + date.getSeconds();
    return year + "-" + month.substr(-2) + "-" + day.substr(-2) + " " + hour.substr(-2) + ":" + minute.substr(-2) + ":" + second.substr(-2);
}

 

타임스탬프란 UTC 로부터 시간을 초 단위로 환산하여 나타낸 값이다. 

다시 Date 객체로 바꿔야 할 경우 반대로 1000을 곱 해주면 된다.

728x90
반응형
728x90
반응형

CentOS

$ sudo yum install net-tools

 

Ubuntu

$ sudo apt-get install net-tools

 

이후에 명령어 실행

$ sudo netstat -tnlp
728x90
반응형
728x90
반응형

사이트에 접속해서 개인정보처리방침 만들기를 한다.

https://www.privacy.go.kr/a3sc/per/inf/perInfStep01.do

 

> 메인

개인정보 처리방침 만들기 개인정보 처리방침 간단히 만들기 개인정보 처리방침을 간단하게 작성해 보세요. 개인정보 처리방침 새로 만들기 - 개인정보보호법 및 시행령, 표준 개인정보 보호지

www.privacy.go.kr

 

 

아래 다운로드 하여 가이드 라인을 확인할 수도 있다.

728x90
반응형

'Others' 카테고리의 다른 글

Others | Unix TimeStamp 유닉스 시간 변환  (0) 2022.05.16
CentOS, Ubuntu netstat 설치 방법  (0) 2022.03.15
nginx 설치 및 방화벽 구성(http)  (0) 2022.02.16
Others | postman  (0) 2021.09.29
whatch error 해결법  (0) 2021.08.31
728x90
반응형

1. 먼저 업데이트를 실행 후 nginx를 설치해준다.

$sudo apt update
$sudo apt install nginx

 

 

2. 방화벽을 설정해준다.

$sudo ufw allow 'Nginx Full'

 

$sudo ufw status

 

3. 설정 파일을 확인해준다.

$vi /etc/nginx/sites-available/default

 

https 설정이 없는 경우 나머지를 다 지우고 proxy 할 포트와 설정만 해준다.

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        # SSL configuration
        #
        # listen 443 ssl default_server;
        # listen [::]:443 ssl default_server;
        #
        # Note: You should disable gzip for SSL traffic.
        # See: https://bugs.debian.org/773332
        #
        # Read up on ssl_ciphers to ensure a secure configuration.
        # See: https://bugs.debian.org/765782
        #
        # Self signed certs generated by the ssl-cert package
        # Don't use them in a production server!
        #
        # include snippets/snakeoil.conf;

        #root /var/www/html;

        # Add index.php to the list if you are using PHP
        #index index.html index.htm index.nginx-debian.html;

        #server_name _;

        location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;

        }

        # pass PHP scripts to FastCGI server
        #
        #location ~ \.php$ {
        #       include snippets/fastcgi-php.conf;
        #
        #       # With php-fpm (or other unix sockets):
        #       fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        #       # With php-cgi (or other tcp sockets):
        #       fastcgi_pass 127.0.0.1:9000;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #       deny all;
        #}
}

 

4. nginx 상태를 확인 

$sudo nginx -t

 

5. nginx 다시 시작

$sudo systemctl restart nginx
728x90
반응형

'Others' 카테고리의 다른 글

CentOS, Ubuntu netstat 설치 방법  (0) 2022.03.15
Others | 개인정보처리방침 만들기 (개인정보보호법)  (0) 2022.02.24
Others | postman  (0) 2021.09.29
whatch error 해결법  (0) 2021.08.31
App-Backend 데이터 전송  (0) 2021.08.31
728x90
반응형

REST API를 개발할 때, 여러 메소드로 실험을 해보는것이 좋다.

그러기 위해 있는 좋은 프로그램이 postman이라는 프로그램이다.

 

먼저 사이트에서 다운을 받는다.

https://www.postman.com/downloads/

 

Download Postman | Get Started for Free

Try Postman for free! Join 17 million developers who rely on Postman, the collaboration platform for API development. Create better APIs—faster.

www.postman.com

 

 

 

그 다음 계정을 생성한다.

 

 

 

My Workspace에 들어간다.

 

 

 

우측 상단에 New를 클릭한다.

 

 

 

HTTP Request를 클릭한다.

 

원하는 URL을 추가해주고 동작을 할 수 있다.

 

 

728x90
반응형
728x90
반응형

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

 

<< 실행하면 됩니다.

728x90
반응형

+ Recent posts