docker(46) softether on docker(centos)　作業中、Ethernet(16)


```
$ docker run -v ~/softether -it centos /bin/bash
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
a02a4930cb5d: Pull complete 
Digest: sha256:184e5f35598e333bfa7de10d8fb1cebb5ee4df5bc0f970bf2b1e7c7345136426
Status: Downloaded newer image for centos:latest
```

```
# yum install -y make gcc binutils openssl                           
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
base                                                                                                                                                                                                     | 3.6 kB  00:00:00     
extras                                                                                                                                                                                                   | 3.4 kB  00:00:00     
updates                                                                                                                                                                                                  | 3.4 kB  00:00:00     
(1/4): base/7/x86_64/group_gz                                                                                                                                                                            | 166 kB  00:00:00     
(2/4): extras/7/x86_64/primary_db                                                                                                                                                                        | 179 kB  00:00:00     
(3/4): updates/7/x86_64/primary_db                                                                                                                                                                       | 2.4 MB  00:00:01     
(4/4): base/7/x86_64/primary_db                                                                                                                                                                          | 6.0 MB  00:00:02     
Package binutils-2.27-34.base.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7 will be installed
--> Processing Dependency: libgomp = 4.8.5-36.el7 for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-36.el7 for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-36.el7.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.8.5-36.el7.x86_64
---> Package make.x86_64 1:3.82-23.el7 will be installed
---> Package openssl.x86_64 1:1.0.2k-16.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.3 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7_6.3 for package: glibc-devel-2.17-260.el7_6.3.x86_64
--> Processing Dependency: glibc = 2.17-260.el7_6.3 for package: glibc-devel-2.17-260.el7_6.3.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.3.x86_64
---> Package libgomp.x86_64 0:4.8.5-36.el7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package glibc.x86_64 0:2.17-260.el7 will be updated
--> Processing Dependency: glibc = 2.17-260.el7 for package: glibc-common-2.17-260.el7.x86_64
---> Package glibc.x86_64 0:2.17-260.el7_6.3 will be an update
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.3 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-260.el7_6.3.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-260.el7_6.3.x86_64
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-260.el7 will be updated
---> Package glibc-common.x86_64 0:2.17-260.el7_6.3 will be an update
---> Package kernel-headers.x86_64 0:3.10.0-957.5.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                                  Arch                                             Version                                                      Repository                                         Size
================================================================================================================================================================================================================================
Installing:
 gcc                                                      x86_64                                           4.8.5-36.el7                                                 base                                               16 M
 make                                                     x86_64                                           1:3.82-23.el7                                                base                                              420 k
 openssl                                                  x86_64                                           1:1.0.2k-16.el7                                              base                                              493 k
Installing for dependencies:
 cpp                                                      x86_64                                           4.8.5-36.el7                                                 base                                              5.9 M
 glibc-devel                                              x86_64                                           2.17-260.el7_6.3                                             updates                                           1.1 M
 glibc-headers                                            x86_64                                           2.17-260.el7_6.3                                             updates                                           683 k
 kernel-headers                                           x86_64                                           3.10.0-957.5.1.el7                                           updates                                           8.0 M
 libgomp                                                  x86_64                                           4.8.5-36.el7                                                 base                                              157 k
 libmpc                                                   x86_64                                           1.0.1-3.el7                                                  base                                               51 k
 mpfr                                                     x86_64                                           3.1.1-4.el7                                                  base                                              203 k
Updating for dependencies:
 glibc                                                    x86_64                                           2.17-260.el7_6.3                                             updates                                           3.7 M
 glibc-common                                             x86_64                                           2.17-260.el7_6.3                                             updates                                            12 M

Transaction Summary
================================================================================================================================================================================================================================
Install  3 Packages (+7 Dependent packages)
Upgrade             ( 2 Dependent packages)

Total download size: 48 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/updates/packages/glibc-devel-2.17-260.el7_6.3.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY                                             ] 3.5 MB/s | 5.0 MB  00:00:12 ETA 
Public key for glibc-devel-2.17-260.el7_6.3.x86_64.rpm is not installed
(1/12): glibc-devel-2.17-260.el7_6.3.x86_64.rpm                                                                                                                                                          | 1.1 MB  00:00:00     
(2/12): glibc-headers-2.17-260.el7_6.3.x86_64.rpm                                                                                                                                                        | 683 kB  00:00:00     
(3/12): glibc-2.17-260.el7_6.3.x86_64.rpm                                                                                                                                                                | 3.7 MB  00:00:02     
Public key for libgomp-4.8.5-36.el7.x86_64.rpm is not installed
(4/12): libgomp-4.8.5-36.el7.x86_64.rpm                                                                                                                                                                  | 157 kB  00:00:00     
(5/12): cpp-4.8.5-36.el7.x86_64.rpm                                                                                                                                                                      | 5.9 MB  00:00:03     
(6/12): libmpc-1.0.1-3.el7.x86_64.rpm                                                                                                                                                                    |  51 kB  00:00:00     
(7/12): gcc-4.8.5-36.el7.x86_64.rpm                                                                                                                                                                      |  16 MB  00:00:03     
(8/12): mpfr-3.1.1-4.el7.x86_64.rpm                                                                                                                                                                      | 203 kB  00:00:00     
(9/12): kernel-headers-3.10.0-957.5.1.el7.x86_64.rpm                                                                                                                                                     | 8.0 MB  00:00:02     
(10/12): make-3.82-23.el7.x86_64.rpm                                                                                                                                                                     | 420 kB  00:00:00     
(11/12): openssl-1.0.2k-16.el7.x86_64.rpm                                                                                                                                                                | 493 kB  00:00:00     
(12/12): glibc-common-2.17-260.el7_6.3.x86_64.rpm                                                                                                                                                        |  12 MB  00:00:04     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                            11 MB/s |  48 MB  00:00:04     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (@CentOS)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : glibc-common-2.17-260.el7_6.3.x86_64                                                                                                                                                                        1/14 
  Updating   : glibc-2.17-260.el7_6.3.x86_64                                                                                                                                                                               2/14 
  Installing : mpfr-3.1.1-4.el7.x86_64                                                                                                                                                                                     3/14 
  Installing : libmpc-1.0.1-3.el7.x86_64                                                                                                                                                                                   4/14 
  Installing : cpp-4.8.5-36.el7.x86_64                                                                                                                                                                                     5/14 
  Installing : libgomp-4.8.5-36.el7.x86_64                                                                                                                                                                                 6/14 
  Installing : 1:make-3.82-23.el7.x86_64                                                                                                                                                                                   7/14 
  Installing : kernel-headers-3.10.0-957.5.1.el7.x86_64                                                                                                                                                                    8/14 
  Installing : glibc-headers-2.17-260.el7_6.3.x86_64                                                                                                                                                                       9/14 
  Installing : glibc-devel-2.17-260.el7_6.3.x86_64                                                                                                                                                                        10/14 
  Installing : gcc-4.8.5-36.el7.x86_64                                                                                                                                                                                    11/14 
  Installing : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                                                                             12/14 
  Cleanup    : glibc-common-2.17-260.el7.x86_64                                                                                                                                                                           13/14 
  Cleanup    : glibc-2.17-260.el7.x86_64                                                                                                                                                                                  14/14 
  Verifying  : glibc-devel-2.17-260.el7_6.3.x86_64                                                                                                                                                                         1/14 
  Verifying  : cpp-4.8.5-36.el7.x86_64                                                                                                                                                                                     2/14 
  Verifying  : glibc-2.17-260.el7_6.3.x86_64                                                                                                                                                                               3/14 
  Verifying  : libgomp-4.8.5-36.el7.x86_64                                                                                                                                                                                 4/14 
  Verifying  : gcc-4.8.5-36.el7.x86_64                                                                                                                                                                                     5/14 
  Verifying  : glibc-common-2.17-260.el7_6.3.x86_64                                                                                                                                                                        6/14 
  Verifying  : mpfr-3.1.1-4.el7.x86_64                                                                                                                                                                                     7/14 
  Verifying  : 1:make-3.82-23.el7.x86_64                                                                                                                                                                                   8/14 
  Verifying  : libmpc-1.0.1-3.el7.x86_64                                                                                                                                                                                   9/14 
  Verifying  : 1:openssl-1.0.2k-16.el7.x86_64                                                                                                                                                                             10/14 
  Verifying  : kernel-headers-3.10.0-957.5.1.el7.x86_64                                                                                                                                                                   11/14 
  Verifying  : glibc-headers-2.17-260.el7_6.3.x86_64                                                                                                                                                                      12/14 
  Verifying  : glibc-common-2.17-260.el7.x86_64                                                                                                                                                                           13/14 
  Verifying  : glibc-2.17-260.el7.x86_64                                                                                                                                                                                  14/14 

Installed:
  gcc.x86_64 0:4.8.5-36.el7                                               make.x86_64 1:3.82-23.el7                                               openssl.x86_64 1:1.0.2k-16.el7                                              

Dependency Installed:
  cpp.x86_64 0:4.8.5-36.el7    glibc-devel.x86_64 0:2.17-260.el7_6.3    glibc-headers.x86_64 0:2.17-260.el7_6.3    kernel-headers.x86_64 0:3.10.0-957.5.1.el7    libgomp.x86_64 0:4.8.5-36.el7    libmpc.x86_64 0:1.0.1-3.el7   
  mpfr.x86_64 0:3.1.1-4.el7   

Dependency Updated:
  glibc.x86_64 0:2.17-260.el7_6.3                                                                             glibc-common.x86_64 0:2.17-260.el7_6.3                                                                            

Complete!
```

```
 yum install which net-tools
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.24.20131004git.el7 will be installed
---> Package which.x86_64 0:2.20-7.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                             Arch                                             Version                                                              Repository                                      Size
================================================================================================================================================================================================================================
Installing:
 net-tools                                           x86_64                                           2.0-0.24.20131004git.el7                                             base                                           306 k
 which                                               x86_64                                           2.20-7.el7                                                           base                                            41 k

Transaction Summary
================================================================================================================================================================================================================================
Install  2 Packages

Total download size: 346 k
Installed size: 993 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): which-2.20-7.el7.x86_64.rpm                                                                                                                                                                       |  41 kB  00:00:00     
(2/2): net-tools-2.0-0.24.20131004git.el7.x86_64.rpm                                                                                                                                                     | 306 kB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                           1.1 MB/s | 346 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                                                    1/2 
  Installing : which-2.20-7.el7.x86_64                                                                                                                                                                                      2/2 
install-info: No such file or directory for /usr/share/info/which.info.gz
  Verifying  : which-2.20-7.el7.x86_64                                                                                                                                                                                      1/2 
  Verifying  : net-tools-2.0-0.24.20131004git.el7.x86_64                                                                                                                                                                    2/2 

Installed:
  net-tools.x86_64 0:2.0-0.24.20131004git.el7                                                                             which.x86_64 0:2.20-7.el7                                                                            

Complete!
```


```
# yum install -y wget
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-18.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================
 Package                                             Arch                                                  Version                                                    Repository                                           Size
================================================================================================================================================================================================================================
Installing:
 wget                                                x86_64                                                1.14-18.el7                                                base                                                547 k

Transaction Summary
================================================================================================================================================================================================================================
Install  1 Package

Total download size: 547 k
Installed size: 2.0 M
Downloading packages:
wget-1.14-18.el7.x86_64.rpm                                                                                                                                                                              | 547 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-18.el7.x86_64                                                                                                                                                                                      1/1 
install-info: No such file or directory for /usr/share/info/wget.info.gz
  Verifying  : wget-1.14-18.el7.x86_64                                                                                                                                                                                      1/1 

Installed:
  wget.x86_64 0:1.14-18.el7                                                                                                                                                                                                     

Complete!
[root@3113ff4ab519 /]# ]# wget https://www2.softether.jp/jp/download/file.aspx/26594CCDE6DFCEFB7C7DBA5A7442714BEA1B90A2/vpnserver-5280-rtm-linux-x64.tar.gz
--2019-02-19 00:00:58--  https://www2.softether.jp/jp/download/file.aspx/26594CCDE6DFCEFB7C7DBA5A7442714BEA1B90A2/vpnserver-5280-rtm-linux-x64.tar.gz
Resolving www2.softether.jp (www2.softether.jp)... 42.124.126.8
Connecting to www2.softether.jp (www2.softether.jp)|42.124.126.8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10468806 (10.0M) [application/octet-stream]
Saving to: 'vpnserver-5280-rtm-linux-x64.tar.gz'

100%[======================================================================================================================================================================================>] 10,468,806  21.3MB/s   in 0.5s   

2019-02-19 00:00:59 (21.3 MB/s) - 'vpnserver-5280-rtm-linux-x64.tar.gz' saved [10468806/10468806]

# wget https://www2.softether.jp/jp/download/file.aspx/86242C8E4A47A688C9FBC1419ADA57D6A35A473F/vpnclient-5280-rtm-linux-x64.tar.gz
--2019-02-19 00:02:41--  https://www2.softether.jp/jp/download/file.aspx/86242C8E4A47A688C9FBC1419ADA57D6A35A473F/vpnclient-5280-rtm-linux-x64.tar.gz
Resolving www2.softether.jp (www2.softether.jp)... 42.124.126.8
Connecting to www2.softether.jp (www2.softether.jp)|42.124.126.8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10463204 (10.0M) [application/octet-stream]
Saving to: 'vpnclient-5280-rtm-linux-x64.tar.gz'

100%[======================================================================================================================================================================================>] 10,463,204  19.6MB/s   in 0.5s   

2019-02-19 00:02:42 (19.6 MB/s) - 'vpnclient-5280-rtm-linux-x64.tar.gz' saved [10463204/10463204]

# cd vnpserver
## make i_read_and_agree_the_license_agreement
ranlib libssl.a
ranlib libcrypto.a
ranlib vpnserver.a
gcc vpnserver.a -pthread -lrt -lm -lz libssl.a libcrypto.a -lpthread -ldl -lreadline -lcurses -m64 -DCPU_64 -o vpnserver
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make: *** [vpnserver] Error 1

# make
./.install.sh
PacketiX Software Install Utility
Copyright (C) 2004-2006 SoftEther Corporation. All Rights Reserved.


Do you want to read the License Agreement for this software ?

 1. Yes
 2. No

Please choose one of above number: 
1

*** This text file is encoded with EUC-JP in Japanese.

中略

Did you read and understand the License Agreement ?
(If you couldn't read above text, Please read License_ReadMeFirst.txt
 file with any text editor.)

 1. Yes
 2. No

Please choose one of above number: 
1


Did you agree the License Agreement ?

1. Agree
2. Do Not Agree

Please choose one of above number: 
1

make[1]: Entering directory `/Users/administrator/softether/vpnserver'
ranlib libssl.a
ranlib libcrypto.a
ranlib vpnserver.a
gcc vpnserver.a -pthread -lrt -lm -lz libssl.a libcrypto.a -lpthread -ldl -lreadline -lcurses -m64 -DCPU_64 -o vpnserver
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
make[1]: *** [vpnserver] Error 1
make[1]: Leaving directory `/Users/administrator/softether/vpnserver'
```

```
# yum install zlib
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
Package zlib-1.2.7-18.el7.x86_64 already installed and latest version
Nothing to do
```


#参考資料
Dockerをはじめからていねいに〜インストールとcentos起動・停止〜
https://qiita.com/umeee/items/cdf30e037a0ee66e8d10

Docker + CentOS7 SoftEther VPN構築メモ
https://qiita.com/natsuki_summer/items/e28bc1221907cdc8912c

yum
https://qiita.com/rato303/items/de3b7bc77758f2604294

yumの使い方メモ
https://qiita.com/elu_jaune/items/e1bde9ad4c327519a02b

##自己参照
SoftEtherを知る
https://qiita.com/kaizen_nagoya/items/7a4062f845ebb2539e25
softether on docker(作業中)
https://qiita.com/kaizen_nagoya/items/fd8778bc768f2be734e2
softether on docker(cantos)　作業中
https://qiita.com/kaizen_nagoya/items/8afc39c6a4b1d17d1f76
「ソフトイーサ　PacketiX VPN入門」を読む
https://qiita.com/kaizen_nagoya/items/3b1d330b2cddaacfa5b8
Ethernet 記事一覧　Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

＜この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。＞
This article is an individual impression based on the individual's experience. It has nothing to do with the organization or business to which I currently belong.
# 文書履歴(document history)
ver. 0.01 初稿 20190219
ver. 0.02 参照追記 20190220
ver. 0.03 誤植訂正 20190514
ver. 0.04 標題追記 20190813
ver. 0.05 ありがとう追記 20230611
### 最後までおよみいただきありがとうございました。
いいね　💚、フォローをお願いします。
####  Thank you very much for reading to the last sentence.
Please press the like icon 💚　and follow me for your happy life.