全部博文(150)
分类: JavaScript
2018-02-08 18:14:45
公司开发同事需要用这个,所以直接安装配置好,顺便学习下:)
[root@web03 goluk]# cd /cdc [root@web03 cdc]# cat /etc/centos-release CentOS Linux release 7.4.1708 (Core) [root@web03 cdc]# yum install nodejs ...... 正在解决依赖关系 --> 正在检查事务 ---> 软件包 nodejs.x86_64.1.6.12.3-1.el7 将被 安装 --> 正在处理依赖关系 npm = 1:3.10.10-1.6.12.3.1.el7,它被软件包 1:nodejs-6.12.3-1.el7.x86_64 需要 --> 正在处理依赖关系 http-parser >= 2.7.0,它被软件包 1:nodejs-6.12.3-1.el7.x86_64 需要 --> 正在处理依赖关系 libuv >= 1:1.9.1,它被软件包 1:nodejs-6.12.3-1.el7.x86_64 需要 --> 正在处理依赖关系 libhttp_parser.so.2()(64bit),它被软件包 1:nodejs-6.12.3-1.el7.x86_64 需要 --> 正在处理依赖关系 libuv.so.1()(64bit),它被软件包 1:nodejs-6.12.3-1.el7.x86_64 需要 --> 正在检查事务 ---> 软件包 http-parser.x86_64.0.2.7.1-5.el7_4 将被 安装 ---> 软件包 libuv.x86_64.1.1.10.2-1.el7 将被 安装 ---> 软件包 npm.x86_64.1.3.10.10-1.6.12.3.1.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ================================================================================ Package 架构 版本 源 大小 ================================================================================ 正在安装: nodejs x86_64 1:6.12.3-1.el7 epel 4.6 M 为依赖而安装: http-parser x86_64 2.7.1-5.el7_4 updates 28 k libuv x86_64 1:1.10.2-1.el7 epel 109 k npm x86_64 1:3.10.10-1.6.12.3.1.el7 epel 2.5 M 事务概要 ================================================================================ 安装 1 软件包 (+3 依赖软件包) 总下载量:7.3 M 安装大小:26 M Is this ok [y/d/N]: y Downloading packages: (1/4): http-parser-2.7.1-5.el7_4.x86_64.rpm | 28 kB 00:00 (2/4): libuv-1.10.2-1.el7.x86_64.rpm | 109 kB 00:00 (3/4): nodejs-6.12.3-1.el7.x86_64.rpm | 4.6 MB 00:00 (4/4): npm-3.10.10-1.6.12.3.1.el7.x86_64.rpm | 2.5 MB 00:01 -------------------------------------------------------------------------------- 总计 5.3 MB/s | 7.3 MB 00:01 ...... 已安装: nodejs.x86_64 1:6.12.3-1.el7 作为依赖被安装: http-parser.x86_64 0:2.7.1-5.el7_4 libuv.x86_64 1:1.10.2-1.el7 npm.x86_64 1:3.10.10-1.6.12.3.1.el7 完毕! [root@web03 cdc]#
[root@web03 badjs-installer]# yum install 已加载插件:fastestmirror, langpacks mysql-community-release-el7-5.noarch.rpm | 6.0 kB 00:00 正在检查 /var/tmp/yum-root-XYRtF4/mysql-community-release-el7-5.noarch.rpm: mysql-community-release-el7-5.noarch /var/tmp/yum-root-XYRtF4/mysql-community-release-el7-5.noarch.rpm 将被安装 正在解决依赖关系 --> 正在检查事务 ---> 软件包 mysql-community-release.noarch.0.el7-5 将被 安装 --> 解决依赖关系完成 依赖关系解决 ================================================================================ Package 架构 版本 源 大小 ================================================================================ 正在安装: mysql-community-release noarch el7-5 /mysql-community-release-el7-5.noarch 4.3 k 事务概要 ================================================================================ 安装 1 软件包 总计:4.3 k 安装大小:4.3 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : mysql-community-release-el7-5.noarch 1/1 验证中 : mysql-community-release-el7-5.noarch 1/1 已安装: mysql-community-release.noarch 0:el7-5 完毕! [root@web03 badjs-installer]# yum install mysql mysql-server 已加载插件:fastestmirror, langpacks mysql-connectors-community | 2.5 kB 00:00 mysql-tools-community | 2.5 kB 00:00 mysql56-community | 2.5 kB 00:00 (1/3): mysql-connectors-community/x86_64/primary_db | 18 kB 00:00 (2/3): mysql-tools-community/x86_64/primary_db | 38 kB 00:00 (3/3): mysql56-community/x86_64/primary_db | 184 kB 00:01 Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ...... 正在安装: mysql-community-client x86_64 5.6.39-2.el7 mysql56-community 19 M mysql-community-libs x86_64 5.6.39-2.el7 mysql56-community 2.0 M 替换 mariadb-libs.x86_64 1:5.5.56-2.el7 mysql-community-server x86_64 5.6.39-2.el7 mysql56-community 59 M 为依赖而安装: mysql-community-common x86_64 5.6.39-2.el7 mysql56-community 257 k numactl-libs x86_64 2.0.9-6.el7_2 os 29 k 事务概要 ================================================================================ 安装 3 软件包 (+2 依赖软件包) 总下载量:81 M Is this ok [y/d/N]: y Downloading packages: 警告:/var/cache/yum/x86_64/7/mysql56-community/packages/mysql-community-common-5.6.39-2.el7.x86_64.rpm: 头V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY mysql-community-common-5.6.39-2.el7.x86_64.rpm 的公钥尚未安装 (1/5): mysql-community-common-5.6.39-2.el7.x86_64.rpm | 257 kB 00:00 (2/5): mysql-community-libs-5.6.39-2.el7.x86_64.rpm | 2.0 MB 00:00 (3/5): numactl-libs-2.0.9-6.el7_2.x86_64.rpm | 29 kB 00:00 (4/5): mysql-community-client-5.6.39-2.el7.x86_64.rpm | 19 MB 00:07 (5/5): mysql-community-server-5.6.39-2.el7.x86_64.rpm | 59 MB 00:51 -------------------------------------------------------------------------------- 总计 1.5 MB/s | 81 MB 00:53 从 file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 检索密钥 导入 GPG key 0x5072E1F5: 用户ID : "MySQL Release Engineering" 指纹 : a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5 软件包 : mysql-community-release-el7-5.noarch (installed) 来自 : file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql 是否继续?[y/N]:y Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : mysql-community-common-5.6.39-2.el7.x86_64 ...... 已安装: mysql-community-client.x86_64 0:5.6.39-2.el7 mysql-community-libs.x86_64 0:5.6.39-2.el7 mysql-community-server.x86_64 0:5.6.39-2.el7 作为依赖被安装: mysql-community-common.x86_64 0:5.6.39-2.el7 numactl-libs.x86_64 0:2.0.9-6.el7_2 替代: mariadb-libs.x86_64 1:5.5.56-2.el7 完毕! [root@web03 badjs-installer
mongoDB
vi /etc/yum.repos.d/mongodb-org-3.6.repo 如下: [mongodb-org-3.6] name=MongoDB Repository baseurl= gpgcheck=1 enabled=1 gpgkey=
[root@web03 cdc]# vi /etc/yum.repos.d/mongodb-org-3.6.repo [root@web03 cdc]# yum install -y mongodb-org 已加载插件:fastestmirror, langpacks mongodb-org-3.6 | 2.4 kB 00:00 mongodb-org-3.6/7/primary_db | 18 kB 00:01 Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 mongodb-org.x86_64.0.3.6.2-1.el7 将被 安装 --> 正在处理依赖关系 mongodb-org-tools = 3.6.2,它被软件包 mongodb-org-3.6.2-1.el7.x86_64 需要 --> 正在处理依赖关系 mongodb-org-shell = 3.6.2,它被软件包 mongodb-org-3.6.2-1.el7.x86_64 需要 --> 正在处理依赖关系 mongodb-org-server = 3.6.2,它被软件包 mongodb-org-3.6.2-1.el7.x86_64 需要 --> 正在处理依赖关系 mongodb-org-mongos = 3.6.2,它被软件包 mongodb-org-3.6.2-1.el7.x86_64 需要 --> 正在检查事务 ---> 软件包 mongodb-org-mongos.x86_64.0.3.6.2-1.el7 将被 安装 ---> 软件包 mongodb-org-server.x86_64.0.3.6.2-1.el7 将被 安装 ---> 软件包 mongodb-org-shell.x86_64.0.3.6.2-1.el7 将被 安装 ---> 软件包 mongodb-org-tools.x86_64.0.3.6.2-1.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ================================================================================ Package 架构 版本 源 大小 ================================================================================ 正在安装: mongodb-org x86_64 3.6.2-1.el7 mongodb-org-3.6 5.8 k 为依赖而安装: mongodb-org-mongos x86_64 3.6.2-1.el7 mongodb-org-3.6 12 M mongodb-org-server x86_64 3.6.2-1.el7 mongodb- org-3.6 20 M mongodb-org-shell x86_64 3.6.2-1.el7 mongodb-org-3.6 12 M mongodb-org-tools x86_64 3.6.2-1.el7 mongodb-org-3.6 46 M 事务概要 ================================================================================ 安装 1 软件包 (+4 依赖软件包) 总下载量:90 M 安装大小:264 M Downloading packages: 警告:/var/cache/yum/x86_64/7/mongodb-org-3.6/packages/mongodb-org-3.6.2-1.el7.x86_64.rpm: 头V3 RSA/SHA1 Signature, 密钥 ID 91fa4ad5: NOKEY mongodb-org-3.6.2-1.el7.x86_64.rpm 的公钥尚未安装 (1/5): mongodb-org-3.6.2-1.el7.x86_64.rpm | 5.8 kB 00:01 (2/5): mongodb-org-server-3.6.2-1.el7.x86_64.rpm | 20 MB 00:03 (3/5): mongodb-org-shell-3.6.2-1.el7.x86_64.rpm | 12 MB 00:02 (4/5): mongodb-org-mongos-3.6.2-1.el7.x86_64.rpm | 12 MB 00:09 (5/5): mongodb-org-tools-3.6.2-1.el7.x86_64.rpm | 46 MB 00:42 -------------------------------------------------------------------------------- 总计 1.8 MB/s | 90 MB 00:49 从 检索密钥 导入 GPG key 0x91FA4AD5: 用户ID : "MongoDB 3.6 Release Signing Key" 指纹 : 2930 adae 8caf 5059 ee73 bb4b 5871 2a22 91fa 4ad5 来自 : Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : mongodb-org-server-3.6.2-1.el7.x86_64 ...... 已安装: mongodb-org.x86_64 0:3.6.2-1.el7 作为依赖被安装: mongodb-org-mongos.x86_64 0:3.6.2-1.el7 mongodb-org-server.x86_64 0:3.6.2-1.el7 mongodb-org-shell.x86_64 0:3.6.2-1.el7 mongodb-org-tools.x86_64 0:3.6.2-1.el7 完毕! [root@web03 cdc]#
semanage port -a -t mongod_port_t -p tcp 27017
[root@web03 cdc]# mkdir mongodb [root@web03 cdc]# chown mongod:mongod mongodb/ [root@web03 cdc]# vi /etc/mongod.conf storage: #dbPath: /var/lib/mongo dbPath: /cdc/mongodb journal: enabled: true engine: wiredTiger
[root@web03 cdc]# mkdir mysql [root@web03 cdc]# chown mysql:mysql mysql [root@web03 cdc]# vi /etc/my.cnf [mysqld] #datadir=/var/lib/mysql datadir=/cdc/lib/mysql socket=/cdc/mysql #socket=/var/lib/mysql/mysql.sock
git
[root@web03 cdc]# yum install git 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 git.x86_64.0.1.8.3.1-12.el7_4 将被 安装 --> 正在处理依赖关系 perl-Git = 1.8.3.1-12.el7_4,它被软件包 ...... 依赖关系解决 ================================================================================ Package 架构 版本 源 大小 ================================================================================ 正在安装: git x86_64 1.8.3.1-12.el7_4 updates 4.4 M 为依赖而安装: libgnome-keyring x86_64 3.12.0-1.el7 os 109 k perl-Error noarch 1:0.17020-2.el7 os 32 k perl-Git noarch 1.8.3.1-12.el7_4 updates 53 k perl-TermReadKey x86_64 2.30-20.el7 os 31 k 事务概要 ================================================================================ 安装 1 软件包 (+4 依赖软件包) 总下载量:4.6 M 安装大小:23 M Is this ok [y/d/N]: y Downloading packages: (1/5): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00 (2/5): perl-Git-1.8.3.1-12.el7_4.noarch.rpm | 53 kB 00:00 (3/5): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00 (4/5): libgnome-keyring-3.12.0-1.el7.x86_64.rpm | 109 kB 00:00 (5/5): git-1.8.3.1-12.el7_4.x86_64.rpm | 4.4 MB 00:00 -------------------------------------------------------------------------------- 总计 4.6 MB/s | 4.6 MB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : 1:perl-Error-0.17020-2.el7.noarch ...... 已安装: git.x86_64 0:1.8.3.1-12.el7_4 作为依赖被安装: libgnome-keyring.x86_64 0:3.12.0-1.el7 perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-12.el7_4 perl-TermReadKey.x86_64 0:2.30-20.el7 完毕!
[root@web03 cdc]# git clone 正克隆到 'badjs-installer'... remote: Counting objects: 32, done. remote: Total 32 (delta 0), reused 0 (delta 0), pack-reused 32 Unpacking objects: 100% (32/32), done. [root@web03 cdc]# cd badjs-installer/ [root@web03 badjs-installer]# npm run clone > badjs-installer@0.1.0 clone /cdc/badjs-installer > npm run clone-acceptor && npm run clone-mq && npm run clone-storage && npm run clone-web > badjs-installer@0.1.0 clone-acceptor /cdc/badjs-installer > git clone 正克隆到 'badjs-acceptor'... remote: Counting objects: 498, done. remote: Total 498 (delta 0), reused 0 (delta 0), pack-reused 498 接收对象中: 100% (498/498), 109.82 KiB | 138.00 KiB/s, done. 处理 delta 中: 100% (283/283), done. > badjs-installer@0.1.0 clone-mq /cdc/badjs-installer > git clone 正克隆到 'badjs-mq'... remote: Counting objects: 79, done. remote: Total 79 (delta 0), reused 0 (delta 0), pack-reused 79 Unpacking objects: 100% (79/79), done. badjs-installer@0.1.0 clone-storage /cdc/badjs-installer git clone 正克隆到 'badjs-storage'... remote: Counting objects: 595, done. remote: Total 595 (delta 0), reused 0 (delta 0), pack-reused 595 接收对象中: 100% (595/595), 91.72 KiB | 0 bytes/s, done. 处理 delta 中: 100% (324/324), done. badjs-installer@0.1.0 clone-web /cdc/badjs-installer > git clone 正克隆到 'badjs-web'... remote: Counting objects: 4016, done. remote: Total 4016 (delta 0), reused 0 (delta 0), pack-reused 4016 接收对象中: 100% (4016/4016), 3.70 MiB | 84.00 KiB/s, done. 处理 delta 中: 100% (2794/2794), done. [root@web03 badjs-installer]# npm run install > badjs-installer@0.1.0 install /cdc/badjs-installer > npm run install-acceptor && npm run install-mq && npm run install-storage && npm run install-web badjs-installer@0.1.0 install-acceptor /cdc/badjs-installer cd badjs-acceptor && npm install ...... > badjs-installer@0.1.0 install-storage /cdc/badjs-installer > cd badjs-storage && npm install ......
[root@web03 db]# mysql < create.sql
banjs默认是root/root ,mysql默认是root用户的密码是空,所以进入mysql执行下列语句修改为root即可
mysql> grant all on badjs.* to 'root'@'localhost' identified by 'root'; Query OK, 0 rows affected (0.00 sec)
因为被长城阻隔,所以跨越过去就可以解决了
执行下面命令
yum install libXext libXrender fontconfig libfontconfig.so.1