[23.02.03] 71일차 [클라우드]

W·2023년 2월 3일
0

국비

목록 보기
104/119

















[ec2-user@ip-172-31-45-90 ~]$ yum install git -y
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
You need to be root to perform this command.
[ec2-user@ip-172-31-45-90 ~]$ sudo yum install git -y

Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                          | 3.7 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:2.38.1-1.amzn2.0.1 will be installed
--> Processing Dependency: perl-Git = 2.38.1-1.amzn2.0.1 for package: git-2.38.1-1.amzn2.0.              1.x86_64
--> Processing Dependency: git-core-doc = 2.38.1-1.amzn2.0.1 for package: git-2.38.1-1.amzn              2.0.1.x86_64
--> Processing Dependency: git-core = 2.38.1-1.amzn2.0.1 for package: git-2.38.1-1.amzn2.0.              1.x86_64
--> Processing Dependency: perl(Term::ReadKey) for package: git-2.38.1-1.amzn2.0.1.x86_64
--> Processing Dependency: perl(Git::I18N) for package: git-2.38.1-1.amzn2.0.1.x86_64
--> Processing Dependency: perl(Git) for package: git-2.38.1-1.amzn2.0.1.x86_64
--> Running transaction check
---> Package git-core.x86_64 0:2.38.1-1.amzn2.0.1 will be installed
---> Package git-core-doc.noarch 0:2.38.1-1.amzn2.0.1 will be installed
---> Package perl-Git.noarch 0:2.38.1-1.amzn2.0.1 will be installed
--> Processing Dependency: perl(Error) for package: perl-Git-2.38.1-1.amzn2.0.1.noarch
---> Package perl-TermReadKey.x86_64 0:2.30-20.amzn2.0.2 will be installed
--> Running transaction check
---> Package perl-Error.noarch 1:0.17020-2.amzn2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package                 Arch          Version                     Repository         Size
===========================================================================================
Installing:
 git                     x86_64        2.38.1-1.amzn2.0.1          amzn2-core         64 k
Installing for dependencies:
 git-core                x86_64        2.38.1-1.amzn2.0.1          amzn2-core        7.4 M
 git-core-doc            noarch        2.38.1-1.amzn2.0.1          amzn2-core        2.9 M
 perl-Error              noarch        1:0.17020-2.amzn2           amzn2-core         32 k
 perl-Git                noarch        2.38.1-1.amzn2.0.1          amzn2-core         40 k
 perl-TermReadKey        x86_64        2.30-20.amzn2.0.2           amzn2-core         31 k

Transaction Summary
===========================================================================================
Install  1 Package (+5 Dependent packages)

Total download size: 11 M
Installed size: 43 M
Downloading packages:
(1/6): git-2.38.1-1.amzn2.0.1.x86_64.rpm                            |  64 kB  00:00:00
(2/6): git-core-doc-2.38.1-1.amzn2.0.1.noarch.rpm                   | 2.9 MB  00:00:00
(3/6): git-core-2.38.1-1.amzn2.0.1.x86_64.rpm                       | 7.4 MB  00:00:00
(4/6): perl-Error-0.17020-2.amzn2.noarch.rpm                        |  32 kB  00:00:00
(5/6): perl-Git-2.38.1-1.amzn2.0.1.noarch.rpm                       |  40 kB  00:00:00
(6/6): perl-TermReadKey-2.30-20.amzn2.0.2.x86_64.rpm                |  31 kB  00:00:00
-------------------------------------------------------------------------------------------
Total                                                       38 MB/s |  11 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : git-core-2.38.1-1.amzn2.0.1.x86_64                                      1/6
  Installing : git-core-doc-2.38.1-1.amzn2.0.1.noarch                                  2/6
  Installing : 1:perl-Error-0.17020-2.amzn2.noarch                                     3/6
  Installing : perl-TermReadKey-2.30-20.amzn2.0.2.x86_64                               4/6
  Installing : perl-Git-2.38.1-1.amzn2.0.1.noarch                                      5/6
  Installing : git-2.38.1-1.amzn2.0.1.x86_64                                           6/6
  Verifying  : perl-TermReadKey-2.30-20.amzn2.0.2.x86_64                               1/6
  Verifying  : git-core-doc-2.38.1-1.amzn2.0.1.noarch                                  2/6
  Verifying  : git-2.38.1-1.amzn2.0.1.x86_64                                           3/6
  Verifying  : git-core-2.38.1-1.amzn2.0.1.x86_64                                      4/6
  Verifying  : 1:perl-Error-0.17020-2.amzn2.noarch                                     5/6
  Verifying  : perl-Git-2.38.1-1.amzn2.0.1.noarch                                      6/6

Installed:
  git.x86_64 0:2.38.1-1.amzn2.0.1

Dependency Installed:
  git-core.x86_64 0:2.38.1-1.amzn2.0.1          git-core-doc.noarch 0:2.38.1-1.amzn2.0.1
  perl-Error.noarch 1:0.17020-2.amzn2           perl-Git.noarch 0:2.38.1-1.amzn2.0.1
  perl-TermReadKey.x86_64 0:2.30-20.amzn2.0.2

Complete!

[ec2-user@ip-172-31-45-90 ~]$ git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0

Cloning into '/home/ec2-user/.asdf'...
remote: Enumerating objects: 8034, done.
remote: Counting objects: 100% (525/525), done.
remote: Compressing objects: 100% (285/285), done.
remote: Total 8034 (delta 312), reused 396 (delta 234), pack-reused 7509
Receiving objects: 100% (8034/8034), 2.19 MiB | 3.32 MiB/s, done.
Resolving deltas: 100% (4710/4710), done.
Note: switching to '9ee24a3a75e28ca0757d0b99fa00ce49466777a8'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

[ec2-user@ip-172-31-45-90 ~]$ cat ~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions

[ec2-user@ip-172-31-45-90 ~]$ echo . $HOME/.asdf/asdf.sh >> ~/.bashrc
[ec2-user@ip-172-31-45-90 ~]$ cat ~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
. /home/ec2-user/.asdf/asdf.sh

[ec2-user@ip-172-31-45-90 ~]$ source ~/.bashrc
[ec2-user@ip-172-31-45-90 ~]$ asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
[ec2-user@ip-172-31-45-90 ~]$ asdf install nodejs 16.14.0

Cloning node-build...
Downloading node-v16.14.0-linux-x64.tar.gz...
-> https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.gz

WARNING: node-v16.14.0-linux-x64 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.

Installing node-v16.14.0-linux-x64...
Installed node-v16.14.0-linux-x64 to /home/ec2-user/.asdf/installs/nodejs/16.14.0

[ec2-user@ip-172-31-45-90 ~]$ asdf global nodejs 16.14.0

[ec2-user@ip-172-31-45-90 ~]$ node -e "console.log('Running Node.js ' + process.version)"

Running Node.js v16.14.0

[ec2-user@ip-172-31-45-90 ~]$ cd /var

[ec2-user@ip-172-31-45-90 var]$ mkdir www
mkdir: cannot create directory ‘www’: Permission denied
[ec2-user@ip-172-31-45-90 var]$ sudo mkdir www
[ec2-user@ip-172-31-45-90 var]$ ls -l

total 8
drwxr-xr-x  2 root root   19 Jan 24 23:05 account
drwxr-xr-x  2 root root    6 Apr  9  2019 adm
drwxr-xr-x  6 root root   63 Jan 24 23:05 cache
drwxr-xr-x  3 root root   18 Jan 24 23:05 db
drwxr-xr-x  3 root root   18 Jan 24 23:05 empty
drwxr-xr-x  2 root root    6 Apr  9  2019 games
drwxr-xr-x  2 root root    6 Apr  9  2019 gopher
drwxr-xr-x  3 root root   18 Jan 24 23:04 kerberos
drwxr-xr-x 30 root root 4096 Jan 24 23:06 lib
drwxr-xr-x  2 root root    6 Apr  9  2019 local
lrwxrwxrwx  1 root root   11 Jan 24 23:03 lock -> ../run/lock
drwxr-xr-x  7 root root 4096 Feb  3 01:32 log
lrwxrwxrwx  1 root root   10 Jan 24 23:03 mail -> spool/mail
drwxr-xr-x  2 root root    6 Apr  9  2019 nis
drwxr-xr-x  2 root root    6 Apr  9  2019 opt
drwxr-xr-x  2 root root    6 Apr  9  2019 preserve
lrwxrwxrwx  1 root root    6 Jan 24 23:03 run -> ../run
drwxr-xr-x  9 root root   97 Jan 24 23:05 spool
drwxrwxrwt  4 root root  112 Feb  3 02:33 tmp
drwxr-xr-x  2 root root    6 Feb  3 03:30 www
drwxr-xr-x  2 root root    6 Apr  9  2019 yp

[ec2-user@ip-172-31-45-90 var]$ sudo chown ec2-user www
[ec2-user@ip-172-31-45-90 var]$ cd /var/www

[ec2-user@ip-172-31-45-90 www]$ git clone https://github.com/deopard/aws-exercise-a.git

Cloning into 'aws-exercise-a'...
remote: Enumerating objects: 39, done.
remote: Total 39 (delta 0), reused 0 (delta 0), pack-reused 39
Receiving objects: 100% (39/39), 22.30 KiB | 5.58 MiB/s, done.
Resolving deltas: 100% (15/15), done.

[ec2-user@ip-172-31-45-90 www]$ ls aws-exercise-a
[ec2-user@ip-172-31-45-90 www]$ cd aws-exercise-a/
[ec2-user@ip-172-31-45-90 aws-exercise-a]$ npm install

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile

added 50 packages, and audited 51 packages in 5s

3 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 8.3.1 -> 9.4.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.4.1
npm notice Run npm install -g npm@9.4.1 to update!
npm notice

0개의 댓글