StudyCentOSForWebSiteBuild
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[CentOSでWebサイトを構築する勉強用]]
* サマリ [#i85033f6]
* 1.このはVPSでCentOSインストール(テンプレートコマンド...
* 2.簡易セットアップできるようにansible導入 [#y29e44ec]
参考サイト
http://c.itdo.jp/technical-information/ansible/ansible-tu...
** 2.1.実施コマンド(ansibleインストール) [#pe78aacd]
[root@Kensyo ~]# yum install epel-release -y
[root@Kensyo ~]# yum install ansible
[root@Kensyo ~]# ansible --version
** 2.2.ユーザの追加 [#s23350ed]
$ sudo useradd ope01
$ sudo passwd ope01
$ ssh-keygen -t ed25519 -C "" -f ~/.ssh/id_ed25519
** 2.3.ホスト名の変更 [#m0ca0a89]
$ sudo hostnamectl set-hostname devEnv01
** 2.4.SSH鍵の登録 [#f85beece]
$ cd ~/
$ pwd
$ cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
** 2.5.ここで、ローカルにてteratermマクロを作成。ログ...
** 2.6.rootユーザでログイン後、ansibleの動作確認 [#eb...
# cd /etc/ansible/
# vi hosts
** 2.7.上記hostsに以下を追加 [#ced24d3d]
[target]
targetnode ansible_host=192.168.181.103 ←対象サーバののI...
以下が出力されることを確認
[ope01@devEnv01 ansible]$ ansible all -i hosts -m ping
The authenticity of host '118.27.113.52 (118.27.113.52)'...
ED25519 key fingerprint is SHA256:wGADdzl/OPuvziOZDLp+HL...
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fi...
targetnode | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/pytho...
},
"changed": false,
"ping": "pong"
}
** 2.8.権限追加 [#ubbcf31b]
#visudo
%ope01 ALL=(ALL) ALL
* Name [#r2e41050]
* Contents [#w00b2e3b]
#contents
* What's XX [#j13b8127]
XX is ~
* Discribe [#t9a7361a]
XX discribe is ~
example.
XXX = XX + X
* 1. [#p197cc3d]
** 1.1. [#rcd65f9a]
*** 1.1.1 [#j22e1981]
+ ①
++ ②
+++ ③
- ・1
-- ・2
--- ・3
| | |h
| | |
| | |
----
[[kiji-template]]
* Name
* Contents
#contents
* What's XX
XX is ~
* Discribe
XX discribe is ~
example.
XXX = XX + X
* 1.
** 1.1.
*** 1.1.1
+ ①
++ ②
+++ ③
- ・1
-- ・2
--- ・3
| | |h
| | |
| | |
----
作成者erion1107
終了行:
[[CentOSでWebサイトを構築する勉強用]]
* サマリ [#i85033f6]
* 1.このはVPSでCentOSインストール(テンプレートコマンド...
* 2.簡易セットアップできるようにansible導入 [#y29e44ec]
参考サイト
http://c.itdo.jp/technical-information/ansible/ansible-tu...
** 2.1.実施コマンド(ansibleインストール) [#pe78aacd]
[root@Kensyo ~]# yum install epel-release -y
[root@Kensyo ~]# yum install ansible
[root@Kensyo ~]# ansible --version
** 2.2.ユーザの追加 [#s23350ed]
$ sudo useradd ope01
$ sudo passwd ope01
$ ssh-keygen -t ed25519 -C "" -f ~/.ssh/id_ed25519
** 2.3.ホスト名の変更 [#m0ca0a89]
$ sudo hostnamectl set-hostname devEnv01
** 2.4.SSH鍵の登録 [#f85beece]
$ cd ~/
$ pwd
$ cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
** 2.5.ここで、ローカルにてteratermマクロを作成。ログ...
** 2.6.rootユーザでログイン後、ansibleの動作確認 [#eb...
# cd /etc/ansible/
# vi hosts
** 2.7.上記hostsに以下を追加 [#ced24d3d]
[target]
targetnode ansible_host=192.168.181.103 ←対象サーバののI...
以下が出力されることを確認
[ope01@devEnv01 ansible]$ ansible all -i hosts -m ping
The authenticity of host '118.27.113.52 (118.27.113.52)'...
ED25519 key fingerprint is SHA256:wGADdzl/OPuvziOZDLp+HL...
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fi...
targetnode | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/pytho...
},
"changed": false,
"ping": "pong"
}
** 2.8.権限追加 [#ubbcf31b]
#visudo
%ope01 ALL=(ALL) ALL
* Name [#r2e41050]
* Contents [#w00b2e3b]
#contents
* What's XX [#j13b8127]
XX is ~
* Discribe [#t9a7361a]
XX discribe is ~
example.
XXX = XX + X
* 1. [#p197cc3d]
** 1.1. [#rcd65f9a]
*** 1.1.1 [#j22e1981]
+ ①
++ ②
+++ ③
- ・1
-- ・2
--- ・3
| | |h
| | |
| | |
----
[[kiji-template]]
* Name
* Contents
#contents
* What's XX
XX is ~
* Discribe
XX discribe is ~
example.
XXX = XX + X
* 1.
** 1.1.
*** 1.1.1
+ ①
++ ②
+++ ③
- ・1
-- ・2
--- ・3
| | |h
| | |
| | |
----
作成者erion1107
ページ名: