'2019/01'에 해당되는 글 99건

  1. 2019.01.28 npm npx yarn bower
  2. 2019.01.28 react.js tutorial
  3. 2019.01.28 KVM spice 원격 접속시 No route to host
  4. 2019.01.28 ssh remote port forwarding
  5. 2019.01.28 virt-viewer for windows
  6. 2019.01.28 별별 희한한 제약을 다 만들었네 -_- 4
  7. 2019.01.28 virt-manager 백업 및 복구
  8. 2019.01.28 NAS4free
  9. 2019.01.28 virt-manager
  10. 2019.01.28 gitlab wiki 2
Programming/node.js2019. 1. 28. 19:00

yarn이던 bower 이던 결국에는 node.js 용 패키지 매니저라고 보면 될 듯


[링크 : https://yarnpkg.com/en/]

[링크 : https://bower.io/]


[링크 : https://www.npmjs.com/]

[링크 : https://www.npmjs.com/package/npx]

[링크 : https://www.npmjs.com/package/yarn]

[링크 : https://www.npmjs.com/package/bower]


구버전에서는 yarn이 빠르게 어쩌네 하는데 좀 느리면 어때 ㅋㅋㅋ

[링크 : https://www.keycdn.com/blog/npm-vs-yarn]

[링크 : https://stackoverflow.com/questions/50605219/difference-between-npx-and-npm]

'Programming > node.js' 카테고리의 다른 글

pug include / ejs include  (0) 2019.02.20
node_modules include  (0) 2019.01.29
node-red rpi 접속  (0) 2018.12.20
node-red 자동시작 관련  (0) 2018.12.14
node.js express static  (0) 2018.12.11
Posted by 구차니
Programming/react.js2019. 1. 28. 18:49


[링크 : https://reactjs.org/tutorial/tutorial.html#setup-for-the-tutorial]

[링크 : https://reactjs.org/docs/create-a-new-react-app.html#create-react-app]

  [링크 : https://github.com/facebook/create-react-app#create-react-app-]

  [링크 : https://github.com/facebook/create-react-app/.../README.md#table-of-contents]



node.js가 깔려있어서 그냥 npx 쳐보니 npx를 설치한다고 시간을 좀 잡아먹고 무언가 뜬다  

C:\Users\User>npx

npx: installed 1 in 5.81s

Path must be a string. Received undefined


ERROR: You must supply a command.


Execute binaries from npm packages.


  npx [options] <command>[@version] [command-arg]...


  npx [options] [-p|--package <package>]... <command> [command-arg]...


  npx [options] -c '<command-string>'


  npx --shell-auto-fallback [shell]



Options:

  --package, -p          Package to be installed.                       [string]

  --cache                Location of the npm cache.                     [string]

  --no-install           Skip installation if a package is missing.    [boolean]

  --userconfig           Path to user npmrc.                            [string]

  --call, -c             Execute string as if inside `npm run-script`.  [string]

  --shell, -s            Shell to execute the command with, if any.

                                                       [string] [default: false]

  --shell-auto-fallback  Generate shell code to use npx as the "command not

                         found" fallback.

                                   [string] [choices: "", "bash", "fish", "zsh"]

  --ignore-existing      Ignores existing binaries in $PATH, or in the local

                         project. This forces npx to do a temporary install and

                         use the latest version.                       [boolean]

  --quiet, -q            Suppress output from npx itself. Subcommands will not

                         be affected.                                  [boolean]

  --npm                  npm binary to use for internal operations.

                                                 [string] [default: "C:\\Program

                             Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js"]

  --node-arg, -n         Extra node argument when calling a node binary.[string]

  --version, -v          Show version number                           [boolean]

  --help, -h             Show help                                     [boolean]


For the full documentation, see the manual page for npx(1).



실수로 오타를 냈는데 myapp 이라는 폴더에 기본 템플릿을 생성하도록 명령어를 실행

그나저나 패키지 받는데 무진장 오래걸리네..

그리고 react 관련해서 명령어들이 꽤나 여러가지 출력된다.

C:\Users\User\Desktop>npx create-react-app myap

npx: installed 1 in 2.423s

Path must be a string. Received undefined

npx: installed 63 in 11.172s

C:\Users\User\AppData\Roaming\npm-cache\_npx\10196\node_modules\create-react-app\index.js


Creating a new React app in C:\Users\User\Desktop\myap.


Installing packages. This might take a couple of minutes.

Installing react, react-dom, and react-scripts...


+ react-dom@16.7.0

+ react@16.7.0

+ react-scripts@2.1.3

added 1926 packages in 197.071s


Initialized a git repository.


Success! Created myap at C:\Users\User\Desktop\myap

Inside that directory, you can run several commands:


  npm start

    Starts the development server.


  npm run build

    Bundles the app into static files for production.


  npm test

    Starts the test runner.


  npm run eject

    Removes this tool and copies build dependencies, configuration files

    and scripts into the app directory. If you do this, you can’t go back!


We suggest that you begin by typing:


  cd myap

  npm start


Happy hacking!

 

[링크 : https://reactjs.org/docs/hello-world.html]



+

2019.01.29


node.js 보다 확실히 구동이 좀 오래걸리네..

그리고 자동으로 등록된 브라우저를 실행해서 띄우는데 이거 끄는 법 없나?

(IE edge를 기본으로 하고 크롬써서..)

D:\work\src\myapp>npm start


> myapp@0.1.0 start D:\work\src\myapp

> react-scripts start

Starting the development server...

Compiled successfully!


You can now view myapp in the browser.


  Local:            http://localhost:3000/

  On Your Network:  http://10.0.0.4:3000/


Note that the development build is not optimized.

To create a production build, use npm run build. 


npm run build로 빌드!

D:\work\src\myapp>npm run build


> myapp@0.1.0 build D:\work\src\myapp

> react-scripts build


Creating an optimized production build...

Compiled successfully.


File sizes after gzip:


  34.71 KB  build\static\js\1.fa92c112.chunk.js

  763 B     build\static\js\runtime~main.229c360f.js

  716 B     build\static\js\main.690c38a1.chunk.js

  512 B     build\static\css\main.659f8df7.chunk.css


The project was built assuming it is hosted at the server root.

You can control this with the homepage field in your package.json.

For example, add this to build it for GitHub Pages:


  "homepage" : "http://myname.github.io/myapp",


The build folder is ready to be deployed.

You may serve it with a static server:


  npm install -g serve

  serve -s build


Find out more about deployment here:


  http://bit.ly/CRA-deploy


npm start로는 개발버전으로 실행되고

serve를 통해서 build 디렉토리 내의 것을 실행해야 static하게 구동이 되는 듯?

그리고 포트가 3000 번에서 5000 번으로 바뀐다.

D:\work\src\myapp>npm install -g serve

C:\Users\user\AppData\Roaming\npm\serve -> C:\Users\user\AppData\Roaming\npm\node_modules\serve\bin\serve.js

+ serve@10.1.1

added 78 packages in 3.909s


D:\work\src\myapp>serve -s build


   ┌───────────────────────────────────────────────┐

   │                                               │

   │   Serving!                                    │

   │                                               │

   │   - Local:            http://localhost:5000   │

   │   - On Your Network:  http://10.0.0.4:5000    │

   │                                               │

   │   Copied local address to clipboard!          │

   │                                               │

   └───────────────────────────────────────────────┘ 


+

윈도우에서는 아래와 같이 set을 통해서 한번 해주면 해당 콘솔창에서는 계속 적용 된다.

D:\work\src\myapp> set BROWSER=none 

D:\work\src\myapp> npm start 


[링크 : https://github.com/facebook/create-react-app/issues/2084]

[링크 : https://stackoverflow.com/questions/51706882/how-do-i-npm-start-with-a-specific-browser]

[링크 : https://github.com/kitze/custom-react-scripts/tree/master/packages/react-scripts#others]

  [링크 : https://github.com/facebook/create-react-app/issues/873]

'Programming > react.js' 카테고리의 다른 글

react import {}  (0) 2019.01.31
react html to jsx  (0) 2019.01.29
webpack react  (0) 2019.01.28
react.js + spring  (2) 2019.01.28
react.js  (2) 2019.01.10
Posted by 구차니
Linux/centos2019. 1. 28. 16:19

firewalld 라는 망할(?) 새로운 데몬이 추가되어 얘를 죽여야 된다. -_-


요건 일단 서비스 죽이는 법

# systemctl stop firewalld 

[링크 : https://www.liquidweb.com/kb/how-to-stop-and-disable-firewalld-on-centos-7/]


firewalld에서 차단하는 목록을 확인하는 법을 찾아야겠다..

# firewall-cmd --list-all 

# firewall-cmd --add-port=21/tcp

# firewall-cmd --remove-port=21/tcp

[링크 : https://www.manualfactory.net/10153]


+

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=22053128]


'Linux > centos' 카테고리의 다른 글

centos backup  (0) 2019.02.13
centos epel 저장소 추가  (0) 2019.02.13
yum checkupdate  (0) 2019.01.25
centos 서비스 등록하기  (0) 2018.12.03
centos 서비스 자동시작  (0) 2018.11.16
Posted by 구차니

netstat에서 다음과 같은 신기한게 있어서 검색

sshd: root@pt 


아무튼.. 원격에서 ssh를 통해서 포트포워딩 해서 쓸 수 있도록 하는거 같은데..

한개의 포트라면 이게 더 깔끔 하려나?

Remote port forwarding

Remote port forwarding is crazy, yet very simple concept. So imagine that you have compromised a machine, and that machine has like MYSQL running but it is only accessible for localhost. And you can't access it because you have a really crappy shell. So what we can do is just forward that port to our attacking machine. The steps are as following:


Here is how you create a remote port forwarding:

ssh <gateway> -R <remote port to bind>:<local host>:<local port>


By the way, plink is a ssh-client for windows that can be run from the terminal. The ip of the attacking machine is 111.111.111.111.


Step 1 So on our compromised machine we do:

plink.exe -l root -pw mysecretpassword 111.111.111.111 -R 3307:127.0.0.1:3306


Step 2 Now we can check netstat on our attacking machine, we should see something like this:

tcp        0      0 127.0.0.1:3307          0.0.0.0:*               LISTEN      19392/sshd: root@pt

That means what we can connect to that port on the attacking machine from the attacking machine.


Step 3 Connect using the following command:

mysql -u root -p -h 127.0.0.1 --port=3307 


[링크 : https://xapax.gitbooks.io/security/content/port_forwarding_and_tunneling.html]

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh blowfish  (0) 2019.09.24
ssh tunnel proxy  (0) 2019.09.20
reverse SSH  (0) 2018.05.14
rpi vpn client  (0) 2018.05.11
scp: ambiguous target 에러  (0) 2016.09.21
Posted by 구차니

5900 이래서 VNC 인가 했는데.. SPICE 포트이기도 해서 한번 실행시도..

근데.. 외부로 접근 안열려 있는지 안되네.. 끄응...



[링크 : https://www.spice-space.org/download.html]

[링크 : https://virt-manager.org/download/]

[링크 : https://www.qnap.com/.../vm-콘솔에-연결하는-spice-클라이언트virt-뷰어를-사용하는-방법/]



+

centos 상에서는 아래와 같이 접속하면 되는데.. 윈도우에서 하면 왜 안될까...

외부 접속을 기본으로 막은걸까?

# remote-viewer spice://localhost:5900 

[링크 : https://www.spice-space.org/spice-user-manual.html]

[링크 : https://www.qnap.com/.../how-to-use-the-spice-client-virt-viewer-to-connect-to-a-vm-console/]



+

Display Spice에서 Address가 Localhost only가 기본값이라 외부 접속이 안된 듯 하다.


단, 해당 설정은 장비가 내려간 상황에서만 변경이 가능하므로,

VM 생성시 설정을 하거나, 서버를 내리고 설정을 변경해 주어야 한다.


[링크 : http://blog.seabow.pe.kr/?p=1286]


+

네트워크 설정이 문제인가 안되는건 매한가지 ㅠㅠ


+

firewalld 내리니까 잘된다..

망할 iptables가 아니라 이제 또 다른 놈이 생겼네 -_-

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
kvm 디스크 용량 늘리기 + 줄이기  (0) 2019.02.01
virbr0 - libvirt NIC  (0) 2019.01.29
virt-manager 백업 및 복구  (0) 2019.01.28
virt-manager  (0) 2019.01.28
Posted by 구차니
개소리 왈왈/블로그2019. 1. 28. 13:40

요즘 정신없어서 글을 비공개로 쓰고 수정하고 공개로 못 돌리다보니

한번에 정리하고 있었는데 이런 에러가 발생하네


설마 이게 예전에 말했던 하루 글 쓰기 30개 제한인가...



맞았나 보네.. 일단 오늘쓰고 내일 공개로 돌려야겠군.. 췟


Posted by 구차니

KVM 이라고 그냥 표기하면 되려나?

아무튼 백업하고 복구하는 법 찾는중..


설정 자체가 XML로 되어있다 보니 어느걸 해야 하는거야...


[링크 : https://www.addictivetips.com/ubuntu-linux-tips/backup-a-virt-manager-virtual-machine-on-linux/]

[링크 : https://jaredkipe.com/blog/programming/general/ubuntu-kvm-5-backing-up-and-restoring-a-vm/]


+

2019.02.01

[링크 : https://www.virtkick.com/docs/how-to-restore-live-backup-on-kvm-virtual-machine.html]

[링크 : https://jaredkipe.com/blog/programming/general/ubuntu-kvm-5-backing-up-and-restoring-a-vm/]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
kvm 디스크 용량 늘리기 + 줄이기  (0) 2019.02.01
virbr0 - libvirt NIC  (0) 2019.01.29
virt-viewer for windows  (0) 2019.01.28
virt-manager  (0) 2019.01.28
Posted by 구차니
프로그램 사용/freeNAS2019. 1. 28. 13:14


[링크 : https://gigglehd.com/zbxe/12355614]


nas4free.org가 xigmanas.com 으로 리다이렉션 되는 듯?

[링크 : https://www.xigmanas.com/]

[링크 : http://www.nas4free.org/]

'프로그램 사용 > freeNAS' 카테고리의 다른 글

raidz1 (zfs)  (0) 2019.01.25
freeNAS hardware RAID, hot swap 등등..  (0) 2019.01.25
freeNAS web GUI  (2) 2019.01.25
Posted by 구차니



[링크 : https://virt-manager.org/]

[링크 : https://www.oss.kr/info_install/show/48cd8d88-a79a-4e86-a9b8-8b2abe4665ac]

'프로그램 사용 > kvm(virt-manager)' 카테고리의 다른 글

kvm qemu qcow2 vs raw with windows guest  (0) 2019.02.01
kvm 디스크 용량 늘리기 + 줄이기  (0) 2019.02.01
virbr0 - libvirt NIC  (0) 2019.01.29
virt-viewer for windows  (0) 2019.01.28
virt-manager 백업 및 복구  (0) 2019.01.28
Posted by 구차니
프로그램 사용/gitlab2019. 1. 28. 12:30

대충 보고 만져보는데

gitlab에서는 페이지 별로 생성하는게 아니라

링크를 생성후 따라가면서 생성하는 컨셉으로 사용이 가능한 듯

(wikipedia 처럼 페이지 생성하고 링크를 이어주는 개념이 아닌 듯)


[링크 : https://opentutorials.org/module/567/4941]


위키 페이지

[링크 : https://docs.gitlab.com/ee/user/project/wiki/]


마크다운(위키 문법)

[링크 : https://docs.gitlab.com/ee/user/markdown.html]



+

굳이 링크없이 만들고 싶다면 URL 에서 페이지 명을 치면 되긴 한다.

'프로그램 사용 > gitlab' 카테고리의 다른 글

gitlab 백업하기  (0) 2019.03.23
git push rejected by remote protected branch  (2) 2018.09.04
gitlab  (2) 2018.08.13
Posted by 구차니