Ansible:部署数据库【redis/postgresql/mongodb/neodb】
最近两天,会在Gitee上写Ansible针对如题所示的四个数据库的自动化部署脚本。
具体的代码可以去以下地址查阅:
https://gitee.com/leviathan-litan/ansible-redis
https://gitee.com/leviathan-litan/ansible-[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
最近两天,会在Gitee上写Ansible针对如题所示的四个数据库的自动化部署脚本。
具体的代码可以去以下地址查阅:
https://gitee.com/leviathan-litan/ansible-redis
https://gitee.com/leviathan-litan/ansible-[……]
如题所示,本文通过Ansible工具自动化的部署Cloudera的Cloudera Manager和CDH
Ansible的代码托管在Gitee:
https://gitee.com/leviathan-litan/ansible-cloudera-cm-cdh
由于Git有文件大小的限制[……]
Seafile的官方下载页面:
https://www.seafile.com/download/
获取安装介质病上传服务器:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@seafile ~]# mkdir /software [root@seafile ~]# cd /software/ [root@seafile software]# ls seafile-server_6.2.5_x86-64.tar.gz seafile-server_6.3.3_x86-64.tar.gz [root@seafile software]# [root@seafile software]# tar -xzf seafile-server_6.2.5_x86-64.tar.gz [root@seafile software]# ls seafile-server-6.2.5 seafile-server_6.3.3_x86-64.tar.gz seafile-server_6.2.5_x86-64.tar.gz [root@seafile software]# [root@seafile software]# cd seafile-server-6.2.5/ [root@seafile seafile-server-6.2.5]# ls check_init_admin.py seaf-fuse.sh seahub setup-seafile.sh reset-admin.sh seaf-gc.sh seahub.sh upgrade runtime seafile setup-seafile-mysql.py seaf-fsck.sh seafile.sh setup-seafile-mysql.sh [root@seafile seafile-server-6.2.5]# |
安装:MySQL
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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
[root@seafile ~]# cd /software [root@seafile software]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm --2019-01-13 02:09:11-- http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm Resolving repo.mysql.com (repo.mysql.com)... 23.51.209.162 Connecting to repo.mysql.com (repo.mysql.com)|23.51.209.162|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6140 (6.0K) [application/x-redhat-package-manager] Saving to: ‘mysql-community-release-el7-5.noarch.rpm’ 100%[======================================>] 6,140 --.-K/s in 0s 2019-01-13 02:09:11 (740 MB/s) - ‘mysql-community-release-el7-5.noarch.rpm’ saved [6140/6140] [root@seafile software]# rpm -ivh mysql-community-release-el7-5.noarch.rpm Preparing... ################################# [100%] Updating / installing... 1:mysql-community-release-el7-5 ################################# [100%] [root@seafile software]# [root@seafile software]# yum install -y mysql-server Loaded plugins: langpacks, product-id, search-disabled-repos, subscription- : manager This system is not registered with an entitlement server. You can use subscription-manager to register. Repository epel is listed more than once in the configuration Repository epel-debuginfo is listed more than once in the configuration Repository epel-source is listed more than once in the configuration base | 3.6 kB 00:00 extras | 3.4 kB 00:00 gitlab-ce | 2.9 kB 00:00 grafana | 2.9 kB 00:00 mongodb-org | 2.9 kB 00:00 updates | 3.4 kB 00:00 (1/7): grafana/primary_db | 18 kB 00:00 (2/7): base/x86_64/group_gz | 166 kB 00:00 (3/7): extras/x86_64/primary_db | 156 kB 00:01 (4/7): mongodb-org/primary_db | 106 kB 00:00 (5/7): updates/x86_64/primary_db | 1.3 MB 00:01 (6/7): gitlab-ce/primary_db | 2.6 MB 00:02 (7/7): base/x86_64/primary_db | 6.0 MB 00:02 Resolving Dependencies --> Running transaction check ---> Package mysql-community-server.x86_64 0:5.6.42-2.el7 will be installed --> Processing Dependency: mysql-community-common(x86-64) = 5.6.42-2.el7 for package: mysql-community-server-5.6.42-2.el7.x86_64 --> Processing Dependency: mysql-community-client(x86-64) >= 5.6.10 for package: mysql-community-server-5.6.42-2.el7.x86_64 --> Processing Dependency: perl(Data::Dumper) for package: mysql-community-server-5.6.42-2.el7.x86_64 --> Processing Dependency: perl(DBI) for package: mysql-community-server-5.6.42-2.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:5.6.42-2.el7 will be installed --> Processing Dependency: mysql-community-libs(x86-64) >= 5.6.10 for package: mysql-community-client-5.6.42-2.el7.x86_64 ---> Package mysql-community-common.x86_64 0:5.6.42-2.el7 will be installed ---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed --> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64 --> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64 ---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be obsoleted ---> Package mysql-community-libs.x86_64 0:5.6.42-2.el7 will be obsoleting ---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed --> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch --> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch --> Running transaction check ---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed --> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch --> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch ---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed --> Running transaction check ---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed ---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: mysql-community-libs x86_64 5.6.42-2.el7 mysql56-community 2.0 M replacing mariadb-libs.x86_64 1:5.5.60-1.el7_5 mysql-community-server x86_64 5.6.42-2.el7 mysql56-community 59 M Installing for dependencies: mysql-community-client x86_64 5.6.42-2.el7 mysql56-community 20 M mysql-community-common x86_64 5.6.42-2.el7 mysql56-community 257 k perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 base 32 k perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 base 57 k perl-DBI x86_64 1.627-4.el7 base 802 k perl-Data-Dumper x86_64 2.145-3.el7 base 47 k perl-IO-Compress noarch 2.061-2.el7 base 260 k perl-Net-Daemon noarch 0.48-5.el7 base 51 k perl-PlRPC noarch 0.2020-14.el7 base 36 k Transaction Summary ================================================================================ Install 2 Packages (+9 Dependent packages) Total download size: 82 M Downloading packages: warning: /var/cache/yum/x86_64/7Server/mysql56-community/packages/mysql-community-common-5.6.42-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Public key for mysql-community-common-5.6.42-2.el7.x86_64.rpm is not installed (1/11): mysql-community-common-5.6.42-2.el7.x86_64.rpm | 257 kB 00:01 (2/11): mysql-community-libs-5.6.42-2.el7.x86_64.rpm | 2.0 MB 00:03 (3/11): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm | 32 kB 00:00 (4/11): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm | 57 kB 00:00 (5/11): perl-Data-Dumper-2.145-3.el7.x86_64.rpm | 47 kB 00:00 (6/11): perl-IO-Compress-2.061-2.el7.noarch.rpm | 260 kB 00:00 (7/11): perl-Net-Daemon-0.48-5.el7.noarch.rpm | 51 kB 00:00 (8/11): perl-DBI-1.627-4.el7.x86_64.rpm | 802 kB 00:00 (9/11): perl-PlRPC-0.2020-14.el7.noarch.rpm | 36 kB 00:00 (10/11): mysql-community-client-5.6.42-2.el7.x86_64.rpm | 20 MB 01:07 (11/11): mysql-community-server-5.6.42-2.el7.x86_64.rpm | 59 MB 02:53 -------------------------------------------------------------------------------- Total 474 kB/s | 82 MB 02:58 Retrieving key from file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Importing GPG key 0x5072E1F5: Userid : "MySQL Release Engineering <mysql-build@oss.oracle.com>" Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5 Package : mysql-community-release-el7-5.noarch (installed) From : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : perl-Data-Dumper-2.145-3.el7.x86_64 1/12 Installing : mysql-community-common-5.6.42-2.el7.x86_64 2/12 Installing : mysql-community-libs-5.6.42-2.el7.x86_64 3/12 Installing : mysql-community-client-5.6.42-2.el7.x86_64 4/12 Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 5/12 Installing : perl-Net-Daemon-0.48-5.el7.noarch 6/12 Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 7/12 Installing : perl-IO-Compress-2.061-2.el7.noarch 8/12 Installing : perl-PlRPC-0.2020-14.el7.noarch 9/12 Installing : perl-DBI-1.627-4.el7.x86_64 10/12 Installing : mysql-community-server-5.6.42-2.el7.x86_64 11/12 Erasing : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 12/12 Verifying : mysql-community-libs-5.6.42-2.el7.x86_64 1/12 Verifying : mysql-community-common-5.6.42-2.el7.x86_64 2/12 Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 3/12 Verifying : perl-Net-Daemon-0.48-5.el7.noarch 4/12 Verifying : mysql-community-server-5.6.42-2.el7.x86_64 5/12 Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 6/12 Verifying : mysql-community-client-5.6.42-2.el7.x86_64 7/12 Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 8/12 Verifying : perl-DBI-1.627-4.el7.x86_64 9/12 Verifying : perl-IO-Compress-2.061-2.el7.noarch 10/12 Verifying : perl-PlRPC-0.2020-14.el7.noarch 11/12 Verifying : 1:mariadb-libs-5.5.60-1.el7_5.x86_64 12/12 Installed: mysql-community-libs.x86_64 0:5.6.42-2.el7 mysql-community-server.x86_64 0:5.6.42-2.el7 Dependency Installed: mysql-community-client.x86_64 0:5.6.42-2.el7 mysql-community-common.x86_64 0:5.6.42-2.el7 perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBI.x86_64 0:1.627-4.el7 perl-Data-Dumper.x86_64 0:2.145-3.el7 perl-IO-Compress.noarch 0:2.061-2.el7 perl-Net-Daemon.noarch 0:0.48-5.el7 perl-PlRPC.noarch 0:0.2020-14.el7 Replaced: mariadb-libs.x86_64 1:5.5.60-1.el7_5 Complete! [root@seafile software]# |
[……]