1.
1
2
$ sudo vi /etc/netplan/50-cloud-init.yaml
 
cs

2.
 : 초기 상태
1
2
3
4
5
6
7
network:
    ethernets:
        enp123:
            addresses: []
            dhcp4: true
    version: 2
 
cs

3.
 : 다음의 예시와 같이 수정 후 저장 및 종료
1
2
3
4
5
6
7
8
9
10
11
network:
    ethernets:
        enp123:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.10.123/24]
            gateway4: 192.168.10.1
            nameservers:
                    addresses: [8.8.8.8, 8.8.4.4]
    version: 2
 
cs

4.
1
2
$ sudo netplan apply
 
cs


'Operating System > Linux' 카테고리의 다른 글

TensorFlow 설치 및 환경 구축  (0) 2018.07.18
ubuntu 16.04 mysql 설치  (0) 2018.07.02
ubuntu mongo db 설치  (0) 2018.06.18
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01


Ubuntu

Python 2.x


1.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
$ sudo apt-get install -y python-pip python-dev python-virtualenv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-pip-whl
  python-setuptools python-wheel python2.7-dev python3-virtualenv virtualenv
Suggested packages:
  python-setuptools-doc
The following NEW packages will be installed:
  libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-dev python-pip
  python-pip-whl python-setuptools python-virtualenv python-wheel python2.7-dev python3-virtualenv virtualenv
0 upgraded, 15 newly installed, 0 to remove and 9 not upgraded.
Need to get 29.8 MB of archives.
After this operation, 45.0 MB of additional disk space will be used.
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libexpat1-dev amd64 2.1.0-7ubuntu0.16.04.3 [115 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-dev amd64 2.7.12-1~16.04 [7,840 B]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-all-dev amd64 2.7.12-1~16.04 [1,006 B]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-all amd64 2.7.12-1~16.04 [996 B]
Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-dev amd64 2.7.12-1~16.04 [1,186 B]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-all-dev amd64 2.7.12-1~16.04 [1,016 B]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1,110 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip all 8.1.1-2ubuntu0.4 [144 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 python-setuptools all 20.7.0-1 [169 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-virtualenv all 15.0.1+ds-3ubuntu1 [46.6 kB]
Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 python-wheel all 0.29.0-1 [48.0 kB]
Get:14 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python3-virtualenv all 15.0.1+ds-3ubuntu1 [43.2 kB]
Get:15 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 virtualenv all 15.0.1+ds-3ubuntu1 [4,342 B]
Fetched 29.8 MB in 4s (7,364 kB/s)
Selecting previously unselected package libexpat1-dev:amd64.
(Reading database ... 198182 files and directories currently installed.)
Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../libpython-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.12-1~16.04) ...
Selecting previously unselected package libpython-all-dev:amd64.
Preparing to unpack .../libpython-all-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-all-dev:amd64 (2.7.12-1~16.04) ...
Selecting previously unselected package python-all.
Preparing to unpack .../python-all_2.7.12-1~16.04_amd64.deb ...
Unpacking python-all (2.7.12-1~16.04) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...
Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../python-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking python-dev (2.7.12-1~16.04) ...
Selecting previously unselected package python-all-dev.
Preparing to unpack .../python-all-dev_2.7.12-1~16.04_amd64.deb ...
Unpacking python-all-dev (2.7.12-1~16.04) ...
Selecting previously unselected package python-pip-whl.
Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-pip.
Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...
Unpacking python-pip (8.1.1-2ubuntu0.4) ...
Selecting previously unselected package python-setuptools.
Preparing to unpack .../python-setuptools_20.7.0-1_all.deb ...
Unpacking python-setuptools (20.7.0-1) ...
Selecting previously unselected package python-virtualenv.
Preparing to unpack .../python-virtualenv_15.0.1+ds-3ubuntu1_all.deb ...
Unpacking python-virtualenv (15.0.1+ds-3ubuntu1) ...
Selecting previously unselected package python-wheel.
Preparing to unpack .../python-wheel_0.29.0-1_all.deb ...
Unpacking python-wheel (0.29.0-1) ...
Selecting previously unselected package python3-virtualenv.
Preparing to unpack .../python3-virtualenv_15.0.1+ds-3ubuntu1_all.deb ...
Unpacking python3-virtualenv (15.0.1+ds-3ubuntu1) ...
Selecting previously unselected package virtualenv.
Preparing to unpack .../virtualenv_15.0.1+ds-3ubuntu1_all.deb ...
Unpacking virtualenv (15.0.1+ds-3ubuntu1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Processing triggers for man-db (2.7.5-1) ...
Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...
Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...
Setting up libpython-dev:amd64 (2.7.12-1~16.04) ...
Setting up libpython-all-dev:amd64 (2.7.12-1~16.04) ...
Setting up python-all (2.7.12-1~16.04) ...
Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...
Setting up python-dev (2.7.12-1~16.04) ...
Setting up python-all-dev (2.7.12-1~16.04) ...
Setting up python-pip-whl (8.1.1-2ubuntu0.4) ...
Setting up python-pip (8.1.1-2ubuntu0.4) ...
Setting up python-setuptools (20.7.0-1) ...
Setting up python-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up python-wheel (0.29.0-1) ...
Setting up python3-virtualenv (15.0.1+ds-3ubuntu1) ...
Setting up virtualenv (15.0.1+ds-3ubuntu1) ...
    
cs


2.

1
2
3
4
5
6
7
8
9
10
11
$ sudo pip install -U pip
The directory '/home/rabbit/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/rabbit/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 796kB/s
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-10.0.1
 
cs


3.

1
2
$ mkdir ~/tensorflow
 
cs


4.

1
2
3
4
5
6
$ virtualenv --system-site-packages ~/tensorflow
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/rabbit/tensorflow/bin/python2
Also creating executable in /home/rabbit/tensorflow/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
 
cs

5.

1
2
$ source ~/tensorflow/bin/activate
 
cs


6.

1
2
3
(tensorflow) rabbit@rabbit-virtual-machine:~$ pip install -U pip
Requirement already up-to-date: pip in ./tensorflow/lib/python2.7/site-packages (10.0.1)
 
cs


7.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
$ pip install -U tensorflow
Collecting tensorflow
  Downloading https://files.pythonhosted.org/packages/37/ff/97d4542f805ae25bf4b65b6263515584c78bd9a6111ed78ea971eff2946a/tensorflow-1.9.0-cp27-cp27mu-manylinux1_x86_64.whl (51.2MB)
    100% |████████████████████████████████| 51.2MB 168kB/s
Collecting setuptools<=39.1.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl (566kB)
    100% |████████████████████████████████| 573kB 15.8MB/s
Collecting astor>=0.6.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting protobuf>=3.4.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/27/e7/bf96130ebe633b08a3913da4bb25e50dac5779f1f68e51c99485423f7443/protobuf-3.6.0-cp27-cp27mu-manylinux1_x86_64.whl (7.1MB)
    100% |████████████████████████████████| 7.1MB 4.7MB/s
Collecting gast>=0.2.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
Collecting enum34>=1.1.6 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Requirement not upgraded as not directly required: six>=1.10.0 in /usr/lib/python2.7/dist-packages (from tensorflow) (1.10.0)
Requirement not upgraded as not directly required: wheel in ./tensorflow/lib/python2.7/site-packages (from tensorflow) (0.31.1)
Collecting absl-py>=0.1.6 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/57/8d/6664518f9b6ced0aa41cf50b989740909261d4c212557400c48e5cda0804/absl-py-0.2.2.tar.gz (82kB)
    100% |████████████████████████████████| 92kB 17.3MB/s
Collecting backports.weakref>=1.0rc1 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/88/ec/f598b633c3d5ffe267aaada57d961c94fdfa183c5c3ebda2b6d151943db6/backports.weakref-1.0.post1-py2.py3-none-any.whl
Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/d5/98/e2e9d5afbc86cef0b2dd0f4ab791519b9bd305ea207e1e5c2f9a9f2f6da6/tensorboard-1.9.0-py2-none-any.whl (3.3MB)
    100% |████████████████████████████████| 3.3MB 7.3MB/s
Collecting termcolor>=1.1.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting numpy>=1.13.3 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/6a/a9/c01a2d5f7b045f508c8cefef3b079fe8c413d05498ca0ae877cffa230564/numpy-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl (12.1MB)
    100% |████████████████████████████████| 12.1MB 2.5MB/s
Collecting grpcio>=1.8.6 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/fa/53/685b9d68e5734cf8e2d13b2d4d29e6cede94714b665019a5627a623b3e21/grpcio-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl (9.0MB)
    100% |████████████████████████████████| 9.0MB 2.3MB/s
Collecting mock>=2.0.0 (from tensorflow)
  Downloading https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 13.5MB/s
Collecting werkzeug>=0.11.10 (from tensorboard<1.10.0,>=1.9.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 10.1MB/s
Collecting futures>=3.1.1; python_version < "3" (from tensorboard<1.10.0,>=1.9.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB)
    100% |████████████████████████████████| 81kB 7.5MB/s
Collecting pbr>=0.11 (from mock>=2.0.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/ae/d6/2ab389a3bf5fffd03069dacaddb0cdd531594abab5119f308527c0df53e6/pbr-4.1.0-py2.py3-none-any.whl (98kB)
    100% |████████████████████████████████| 102kB 15.4MB/s
Collecting funcsigs>=1; python_version < "3.3" (from mock>=2.0.0->tensorflow)
  Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Building wheels for collected packages: gast, absl-py, termcolor
  Running setup.py bdist_wheel for gast ... done
  Stored in directory: /home/rabbit/.cache/pip/wheels/9a/1f/0e/3cde98113222b853e98fc0a8e9924480a3e25f1b4008cedb4f
  Running setup.py bdist_wheel for absl-py ... done
  Stored in directory: /home/rabbit/.cache/pip/wheels/a0/f8/e9/1933dbb3447ea6ef57062fd5461cb118deb8c2ed074e8344bf
  Running setup.py bdist_wheel for termcolor ... done
  Stored in directory: /home/rabbit/.cache/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6
Successfully built gast absl-py termcolor
Installing collected packages: setuptools, astor, protobuf, gast, enum34, absl-py, backports.weakref, werkzeug, futures, markdown, numpy, tensorboard, termcolor, grpcio, pbr, funcsigs, mock, tensorflow
  Found existing installation: setuptools 40.0.0
    Uninstalling setuptools-40.0.0:
      Successfully uninstalled setuptools-40.0.0
  Found existing installation: enum34 1.1.2
    Not uninstalling enum34 at /usr/lib/python2.7/dist-packages, outside environment /home/rabbit/tensorflow
    Can't uninstall 'enum34'. No files were found to uninstall.
Successfully installed absl-py-0.2.2 astor-0.7.1 backports.weakref-1.0.post1 enum34-1.1.6 funcsigs-1.0.2 futures-3.2.0 gast-0.2.0 grpcio-1.13.0 markdown-2.6.11 mock-2.0.0 numpy-1.14.5 pbr-4.1.0 protobuf-3.6.0 setuptools-39.1.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 werkzeug-0.14.1
 
cs


텐서플로우 동작 확인

8.

1
2
3
4
5
6
(tensorflow) rabbit@rabbit-virtual-machine:~$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
 
cs


9.

1
2
3
4
5
6
7
>>> import tensorflow as tf
>>> hello = tf.constant("hello TensorFlow!")
>>> sess = tf.Session()
2018-07-18 15:35:43.209250: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
>>> print(sess.run(hello))
hello TensorFlow!
 
cs


'Operating System > Linux' 카테고리의 다른 글

ubuntu 18.04 고정 IP 설정  (0) 2018.10.03
ubuntu 16.04 mysql 설치  (0) 2018.07.02
ubuntu mongo db 설치  (0) 2018.06.18
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01


1.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# apt-get update
Hit:1 http://kr.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [799 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [731 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [331 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [641 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [585 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [257 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [516 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [455 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [221 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [356 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [304 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [133 kB]
Fetched 5,652 kB in 3s (1,635 kB/s)
Reading package lists... Done
 
cs


2.


3.


4.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# apt-get install -y mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl
  libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7
  mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
  libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca
The following NEW packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl
  libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl mysql-client-5.7 mysql-client-core-5.7
  mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 21 newly installed, 0 to remove and 10 not upgraded.
Need to get 18.7 MB of archives.
After this operation, 162 MB of additional disk space will be used.
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-common all 5.7.22-0ubuntu0.16.04.1 [15.4 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-core-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [6,425 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [1,673 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-core-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [7,268 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libevent-core-2.0-5 amd64 2.0.21-stable-2ubuntu0.16.04.1 [70.6 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server-5.7 amd64 5.7.22-0ubuntu0.16.04.1 [2,583 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-tagset-perl all 3.20-2 [13.5 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 liburi-perl all 1.71-1 [76.9 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-parser-perl amd64 3.72-1 [86.1 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-pm-perl all 4.26-1 [185 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libfcgi-perl amd64 0.77-1build1 [32.3 kB]
Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-fast-perl all 1:2.10-1 [10.2 kB]
Get:14 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB]
Get:15 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB]
Get:16 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]
Get:17 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB]
Get:18 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libio-html-perl all 1.001-1 [14.9 kB]
Get:19 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB]
Get:20 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-message-perl all 6.11-1 [74.3 kB]
Get:21 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-server all 5.7.22-0ubuntu0.16.04.1 [10.8 kB]
Fetched 18.7 MB in 2s (6,452 kB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 92755 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.22-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-common (5.7.22-0ubuntu0.16.04.1) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../mysql-client-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../mysql-client-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../mysql-server-core-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Selecting previously unselected package libevent-core-2.0-5:amd64.
Preparing to unpack .../libevent-core-2.0-5_2.0.21-stable-2ubuntu0.16.04.1_amd64.deb ...
Unpacking libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mysql-common (5.7.22-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 92923 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.22-0ubuntu0.16.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ...
Unpacking libhtml-tagset-perl (3.20-2) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../liburi-perl_1.71-1_all.deb ...
Unpacking liburi-perl (1.71-1) ...
Selecting previously unselected package libhtml-parser-perl.
Preparing to unpack .../libhtml-parser-perl_3.72-1_amd64.deb ...
Unpacking libhtml-parser-perl (3.72-1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ...
Unpacking libcgi-pm-perl (4.26-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ...
Unpacking libfcgi-perl (0.77-1build1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.10-1) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../libencode-locale-perl_1.05-1_all.deb ...
Unpacking libencode-locale-perl (1.05-1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...
Unpacking libhtml-template-perl (2.95-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../libio-html-perl_1.001-1_all.deb ...
Unpacking libio-html-perl (1.001-1) ...
Selecting previously unselected package liblwp-mediatypes-perl.
Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.02-1) ...
Selecting previously unselected package libhttp-message-perl.
Preparing to unpack .../libhttp-message-perl_6.11-1_all.deb ...
Unpacking libhttp-message-perl (6.11-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.7.22-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-server (5.7.22-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up mysql-client-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Setting up mysql-client-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Setting up mysql-server-core-5.7 (5.7.22-0ubuntu0.16.04.1) ...
Setting up libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ...
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Setting up libhtml-tagset-perl (3.20-2) ...
Setting up liburi-perl (1.71-1) ...
Setting up libhtml-parser-perl (3.72-1) ...
Setting up libcgi-pm-perl (4.26-1) ...
Setting up libfcgi-perl (0.77-1build1) ...
Setting up libcgi-fast-perl (1:2.10-1) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up libhtml-template-perl (2.95-2) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libio-html-perl (1.001-1) ...
Setting up liblwp-mediatypes-perl (6.02-1) ...
Setting up libhttp-message-perl (6.11-1) ...
Setting up mysql-server (5.7.22-0ubuntu0.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
 
cs


5.

1
2
3
4
5
6
7
8
# dpkg --list |grep mysql
ii  mysql-client-5.7                     5.7.22-0ubuntu0.16.04.1                    amd64        MySQL database client binaries
ii  mysql-client-core-5.7                5.7.22-0ubuntu0.16.04.1                    amd64        MySQL database core client binaries
ii  mysql-common                         5.7.22-0ubuntu0.16.04.1                    all          MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server                         5.7.22-0ubuntu0.16.04.1                    all          MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.7                     5.7.22-0ubuntu0.16.04.1                    amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-5.7                5.7.22-0ubuntu0.16.04.1                    amd64        MySQL database server binaries
 
cs


6.

1
2
3
4
5
6
7
8
9
10
11
# service mysql status
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-07-02 22:28:51 KST; 11min ago
 Main PID: 9288 (mysqld)
   CGroup: /system.slice/mysql.service
           └─9288 /usr/sbin/mysqld
 
Jul 02 22:28:50 dbms systemd[1]: Starting MySQL Community Server...
Jul 02 22:28:51 dbms systemd[1]: Started MySQL Community Server.
 
cs


7. 외부 접속 허용

 7-1. my.cnf 편집

1
2
# vi /etc/mysql/mysql.conf.d/mysqld.cnf
 
cs

 7-2.

1
2
3
#bind-address           = 127.0.0.1
bind-address            = 0.0.0.0
 
cs


8. 접속 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.22-0ubuntu0.16.04.1 (Ubuntu)
 
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql>
 
cs


9.

1
2
3
4
5
6
7
8
9
10
11
mysql> show databases;
+--------------------+
 Database           |
+--------------------+
 information_schema |
 mysql              |
 performance_schema |
 sys                |
+--------------------+
4 rows in set (0.00 sec)
 
cs


'Operating System > Linux' 카테고리의 다른 글

ubuntu 18.04 고정 IP 설정  (0) 2018.10.03
TensorFlow 설치 및 환경 구축  (0) 2018.07.18
ubuntu mongo db 설치  (0) 2018.06.18
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01


os version: ubuntu 16.04.3

db version: 2.6.10


1. mongo db 서버와 클라이언트 설치 명령어를 실행합니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# apt-get install mongodb-server mongodb-clients
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 libyaml-cpp0.5v5
The following NEW packages will be installed:
  libboost-filesystem1.58.0 libboost-program-options1.58.0 libboost-system1.58.0 libboost-thread1.58.0
  libgoogle-perftools4 libpcrecpp0v5 libsnappy1v5 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 libyaml-cpp0.5v5
  mongodb-clients mongodb-server
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.0 MB of archives.
After this operation, 196 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libpcrecpp0v5 amd64 2:8.38-3.1 [15.2 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-system1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [9,146 B]
Get:3 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-filesystem1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [37.5 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-program-options1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [138 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libboost-thread1.58.0 amd64 1.58.0+dfsg-5ubuntu3.1 [47.0 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtcmalloc-minimal4 amd64 2.4-0ubuntu5.16.04.1 [105 kB]
Get:7 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libunwind8 amd64 1.1-4.1 [46.5 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgoogle-perftools4 amd64 2.4-0ubuntu5.16.04.1 [187 kB]
Get:9 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 libv8-3.14.5 amd64 3.14.5.8-5ubuntu2 [1,189 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 libyaml-cpp0.5v5 amd64 0.5.2-3 [158 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu xenial/main amd64 libsnappy1v5 amd64 1.1.3-2 [16.0 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 mongodb-clients amd64 1:2.6.10-0ubuntu1 [48.6 MB]
Get:13 http://kr.archive.ubuntu.com/ubuntu xenial/universe amd64 mongodb-server amd64 1:2.6.10-0ubuntu1 [7,425 kB]
Fetched 58.0 MB in 6s (9,073 kB/s)
Selecting previously unselected package libpcrecpp0v5:amd64.
(Reading database ... 92628 files and directories currently installed.)
Preparing to unpack .../libpcrecpp0v5_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Selecting previously unselected package libboost-system1.58.0:amd64.
Preparing to unpack .../libboost-system1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-system1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-filesystem1.58.0:amd64.
Preparing to unpack .../libboost-filesystem1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-filesystem1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-program-options1.58.0:amd64.
Preparing to unpack .../libboost-program-options1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-program-options1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libboost-thread1.58.0:amd64.
Preparing to unpack .../libboost-thread1.58.0_1.58.0+dfsg-5ubuntu3.1_amd64.deb ...
Unpacking libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Selecting previously unselected package libtcmalloc-minimal4.
Preparing to unpack .../libtcmalloc-minimal4_2.4-0ubuntu5.16.04.1_amd64.deb ...
Unpacking libtcmalloc-minimal4 (2.4-0ubuntu5.16.04.1) ...
Selecting previously unselected package libunwind8.
Preparing to unpack .../libunwind8_1.1-4.1_amd64.deb ...
Unpacking libunwind8 (1.1-4.1) ...
Selecting previously unselected package libgoogle-perftools4.
Preparing to unpack .../libgoogle-perftools4_2.4-0ubuntu5.16.04.1_amd64.deb ...
Unpacking libgoogle-perftools4 (2.4-0ubuntu5.16.04.1) ...
Selecting previously unselected package libv8-3.14.5.
Preparing to unpack .../libv8-3.14.5_3.14.5.8-5ubuntu2_amd64.deb ...
Unpacking libv8-3.14.5 (3.14.5.8-5ubuntu2) ...
Selecting previously unselected package libyaml-cpp0.5v5:amd64.
Preparing to unpack .../libyaml-cpp0.5v5_0.5.2-3_amd64.deb ...
Unpacking libyaml-cpp0.5v5:amd64 (0.5.2-3) ...
Selecting previously unselected package libsnappy1v5:amd64.
Preparing to unpack .../libsnappy1v5_1.1.3-2_amd64.deb ...
Unpacking libsnappy1v5:amd64 (1.1.3-2) ...
Selecting previously unselected package mongodb-clients.
Preparing to unpack .../mongodb-clients_1%3a2.6.10-0ubuntu1_amd64.deb ...
Unpacking mongodb-clients (1:2.6.10-0ubuntu1) ...
Selecting previously unselected package mongodb-server.
Preparing to unpack .../mongodb-server_1%3a2.6.10-0ubuntu1_amd64.deb ...
Unpacking mongodb-server (1:2.6.10-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Setting up libboost-system1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-filesystem1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-program-options1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libboost-thread1.58.0:amd64 (1.58.0+dfsg-5ubuntu3.1) ...
Setting up libtcmalloc-minimal4 (2.4-0ubuntu5.16.04.1) ...
Setting up libunwind8 (1.1-4.1) ...
Setting up libgoogle-perftools4 (2.4-0ubuntu5.16.04.1) ...
Setting up libv8-3.14.5 (3.14.5.8-5ubuntu2) ...
Setting up libyaml-cpp0.5v5:amd64 (0.5.2-3) ...
Setting up libsnappy1v5:amd64 (1.1.3-2) ...
Setting up mongodb-clients (1:2.6.10-0ubuntu1) ...
Setting up mongodb-server (1:2.6.10-0ubuntu1) ...
Adding system user `mongodb' (UID 111) ...
Adding new user `mongodb' (UID 111) with group `nogroup' ...
Not creating home directory `/var/lib/mongodb'.
Adding group `mongodb' (GID 117) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
Processing triggers for ureadahead (0.100.0-19) ...
 
cs



2. 설치 여부 확인

1
2
3
4
5
# mongod --version
db version v2.6.10
2018-06-18T12:09:42.177+0900 git version: nogitversion
2018-06-18T12:09:42.177+0900 OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
 
cs



3. 실행

1
2
3
4
5
6
7
8
9
10
11
# mongo
MongoDB shell version: 2.6.10
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
        http://docs.mongodb.org/
Questions? Try the support group
        http://groups.google.com/group/mongodb-user
>
 
cs



4. 간단한 테스트

1
2
3
4
> show dbs
admin  (empty)
local  0.078GB
 
cs



'Operating System > Linux' 카테고리의 다른 글

TensorFlow 설치 및 환경 구축  (0) 2018.07.18
ubuntu 16.04 mysql 설치  (0) 2018.07.02
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01
CentOS JDK 설치  (0) 2018.05.31


1. 우측 상단의 전원 버튼을 클릭



2. 하단의 설정 아이콘을 클릭



3.



4. Wired 이하에 설정 버튼을 클릭



5. IPv4 탭을 클릭



6. 파워 버튼을 클릭



7.



8. 재부팅 이후에 IP 설정 확인



'Operating System > Linux' 카테고리의 다른 글

ubuntu 16.04 mysql 설치  (0) 2018.07.02
ubuntu mongo db 설치  (0) 2018.06.18
CentOS7 고정 IP 설정  (0) 2018.06.01
CentOS JDK 설치  (0) 2018.05.31
ESXi kali linux 설치  (0) 2018.05.15


1.

1
2
$ vi /etc/sysconfig/network-scripts/ifcfg-eno16780032
 
cs



2.

1
2
3
4
5
BOOTPROTO="static"
IPADDR="192.168.0.23"
GATEWAY="192.168.0.1"
DNS1="8.8.8.8"
 
cs



3.

1
2
systemctl restart network
 
cs




'Operating System > Linux' 카테고리의 다른 글

ubuntu mongo db 설치  (0) 2018.06.18
Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS JDK 설치  (0) 2018.05.31
ESXi kali linux 설치  (0) 2018.05.15
Ubuntu 한글 깨짐  (0) 2018.05.03


1.

1
2
3
4
5
6
7
8
9
10
11
12
# yum list java-*jdk-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: centos.mirror.cdnetworks.com
 * updates: ftp.iij.ad.jp
Available Packages
java-1.6.0-openjdk-devel.x86_64                          1:1.6.0.41-1.13.13.1.el7_3                           base
java-1.7.0-openjdk-devel.x86_64                          1:1.7.0.181-2.6.14.8.el7_5                           updates
java-1.8.0-openjdk-devel.i686                            1:1.8.0.171-8.b10.el7_5                              updates
java-1.8.0-openjdk-devel.x86_64                          1:1.8.0.171-8.b10.el7_5                              updates
 
cs



2.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# yum install java-1.8.0-openjdk-devel.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: centos.mirror.cdnetworks.com
 * updates: ftp.iij.ad.jp
base                                                                                          | 3.6 kB  00:00:00
extras                                                                                        | 3.4 kB  00:00:00
updates                                                                                       | 3.4 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.171-8.b10.el7_5 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================
 Package                             Arch              Version                              Repository          Size
=====================================================================================================================
Installing:
 java-1.8.0-openjdk-devel            x86_64            1:1.8.0.171-8.b10.el7_5              updates            9.7 M
 
Transaction Summary
=====================================================================================================================
Install  1 Package
 
Total download size: 9.7 M
Installed size: 40 M
Is this ok [y/d/N]: y
Downloading packages:
java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64.rpm                                     | 9.7 MB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64                                           1/1
  Verifying  : 1:java-1.8.0-openjdk-devel-1.8.0.171-8.b10.el7_5.x86_64                                           1/1
 
Installed:
  java-1.8.0-openjdk-devel.x86_64 1:1.8.0.171-8.b10.el7_5
 
Complete!
 
cs



3.

1
2
3
# javac -version
javac 1.8.0_171
 
cs



'Operating System > Linux' 카테고리의 다른 글

Kali Linux 고정 IP 설정하기  (0) 2018.06.12
CentOS7 고정 IP 설정  (0) 2018.06.01
ESXi kali linux 설치  (0) 2018.05.15
Ubuntu 한글 깨짐  (0) 2018.05.03
CentOS Git 설치  (0) 2018.04.23


1.


2.


3.


4.


5.


 5-1-1.


 5-1-2.


 5-1-3.


 5-2-1.


 5-2-2.


 5-2-3.


 5-2-4.



6.


7.


8.


9.


10.


11.



'Operating System > Linux' 카테고리의 다른 글

CentOS7 고정 IP 설정  (0) 2018.06.01
CentOS JDK 설치  (0) 2018.05.31
Ubuntu 한글 깨짐  (0) 2018.05.03
CentOS Git 설치  (0) 2018.04.23
jzmq [에러] could not find autoreconf. autoconf and automake are required to run autogen.sh.  (0) 2018.03.19


1. 한글 관련 패키지 인스톨 명령어를 실행합니다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$ sudo apt-get install language-pack-ko
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libllvm4.0
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  language-pack-ko-base
The following NEW packages will be installed:
  language-pack-ko language-pack-ko-base
0 upgraded, 2 newly installed, 0 to remove and 67 not upgraded.
Need to get 832 kB of archives.
After this operation, 3,580 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 language-pack-ko-base all 1:16.04+20160627 [830 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 language-pack-ko all 1:16.04+20160627 [1,828 B]
Fetched 832 kB in 1s (656 kB/s)
Selecting previously unselected package language-pack-ko-base.
(Reading database ... 130187 files and directories currently installed.)
Preparing to unpack .../language-pack-ko-base_1%3a16.04+20160627_all.deb ...
Unpacking language-pack-ko-base (1:16.04+20160627) ...
Selecting previously unselected package language-pack-ko.
Preparing to unpack .../language-pack-ko_1%3a16.04+20160627_all.deb ...
Unpacking language-pack-ko (1:16.04+20160627) ...
Setting up language-pack-ko (1:16.04+20160627) ...
Setting up language-pack-ko-base (1:16.04+20160627) ...
Generating locales (this might take a while)...
  ko_KR.UTF-8... done
Generation complete.
 
cs



2. 한글 관련 패키지 인스톨 명령어를 실행합니다.

1
2
3
4
5
6
7
8
9
10
11
$ sudo apt-get install language-pack-ko-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
language-pack-ko-base is already the newest version (1:16.04+20160627).
language-pack-ko-base set to manually installed.
The following package was automatically installed and is no longer required:
  libllvm4.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 67 not upgraded.
 
cs



3. 환경 변수를 추가 및 등록

 3-1. environment 편집

1
2
$ sudo vi /etc/environment
 
cs


 3-2. 하단에 이하의 내용을 추가

1
2
3
4
LANG="ko_KR.UTF-8"
LANG="ko_KR.EUC-KR"
LANGUAGE="ko_KR:ko:en_GB:en"
 
cs


 3-3. 변경된 내용을 적용

1
2
$ source /etc/environment
 
cs




1.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# yum install git
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                 | 7.6 kB     00:00
 * base: ftp.neowiz.com
 * epel: ftp.jaist.ac.jp
 * extras: mirror.kakao.com
 * updates: mirror.kakao.com
HDP-2.3                                                                                       | 2.9 kB     00:00
HDP-UTILS-1.1.0.20                                                                            | 2.9 kB     00:00
Updates-ambari-2.1.0                                                                          | 2.9 kB     00:00
base                                                                                          | 3.7 kB     00:00
epel                                                                                          | 4.7 kB     00:00
epel/primary_db                                                                               | 6.0 MB     00:01
extras                                                                                        | 3.4 kB     00:00
updates                                                                                       | 3.4 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.1-9.el6_9 will be installed
--> Processing Dependency: perl-Git = 1.7.1-9.el6_9 for package: git-1.7.1-9.el6_9.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.1-9.el6_9.x86_64
--> Processing Dependency: perl(Error) for package: git-1.7.1-9.el6_9.x86_64
--> Running transaction check
---> Package perl-Error.noarch 1:0.17015-4.el6 will be installed
---> Package perl-Git.noarch 0:1.7.1-9.el6_9 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================
 Package                     Arch                    Version                          Repository                Size
=====================================================================================================================
Installing:
 git                         x86_64                  1.7.1-9.el6_9                    updates                  4.6 M
Installing for dependencies:
 perl-Error                  noarch                  1:0.17015-4.el6                  base                      29 k
 perl-Git                    noarch                  1.7.1-9.el6_9                    updates                   29 k
 
Transaction Summary
=====================================================================================================================
Install       3 Package(s)
 
Total download size: 4.7 M
Installed size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): git-1.7.1-9.el6_9.x86_64.rpm                                                           | 4.6 MB     00:00
(2/3): perl-Error-0.17015-4.el6.noarch.rpm                                                    |  29 kB     00:00
(3/3): perl-Git-1.7.1-9.el6_9.noarch.rpm                                                      |  29 kB     00:00
---------------------------------------------------------------------------------------------------------------------
Total                                                                                5.5 MB/s | 4.7 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:perl-Error-0.17015-4.el6.noarch                                                                 1/3
  Installing : git-1.7.1-9.el6_9.x86_64                                                                          2/3
  Installing : perl-Git-1.7.1-9.el6_9.noarch                                                                     3/3
  Verifying  : 1:perl-Error-0.17015-4.el6.noarch                                                                 1/3
  Verifying  : git-1.7.1-9.el6_9.x86_64                                                                          2/3
  Verifying  : perl-Git-1.7.1-9.el6_9.noarch                                                                     3/3
 
Installed:
  git.x86_64 0:1.7.1-9.el6_9
 
Dependency Installed:
  perl-Error.noarch 1:0.17015-4.el6                          perl-Git.noarch 0:1.7.1-9.el6_9
 
Complete!
 
cs



2.

1
2
3
# git --version
git version 1.7.1
 
cs



+ Recent posts