安装 CentOS7 上的 Growi(旧称 Crowi-Plus)的方法

以下是针对目前最新版Growi(v3.0.7)的步骤。
由于Growi版本可能需要不同版本的模块(例如nodejs和npm等),请仔细阅读Growi GitHub的说明。

操作系统的初始设置

如果操作系统尚未安装完成,请参考以下页面进行设置:
https://qiita.com/SkyLaptor/items/1036d470c2d4117b9954

引入前提模块

# vi /etc/yum.repos.d/mongodb-org-3.4.repo
# curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
# wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
# yum install git gcc-c++ make nodejs yarn mongodb-org
# npm install -g npm@5.8.0
# systemctl start mongod
# systemctl enable mongod
[mongodb-org-3.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
# npm info npm versions --json

引入Growi

如果计划从备份恢复,请不要在此时启动Growi(systemctl start growi)。

# cd /usr/local/bin
# git clone https://github.com/weseek/growi.git
# cd growi
# git checkout v3.0.7
# yarn
# vi /etc/systemd/system/growi.service
# vi /etc/sysconfig/growi
# systemctl daemon-reload
# systemctl start growi
# systemctl enable growi
[Unit]
Description=Growi
After=network.target mongod.service

[Service]
WorkingDirectory=/usr/local/bin/growi
EnvironmentFile=/etc/sysconfig/growi
ExecStart=/usr/bin/npm start

[Install]
WantedBy=multi-user.target
PORT=3000
NODE_ENV=production
PASSWORD_SEED="`openssl rand -base64 128 | head -1`"
MONGO_URI="mongodb://localhost/growi"
FILE_UPLOAD=local

等待2-3分钟后,访问http://{服务器IP或FQDN}:3000/,将显示初次设置界面。

setup.jpg

输入系统管理员的信息,使其能够登录。

请参考

以下是原文的中文义译:
https://qiita.com/yuki-takei/items/5df9601039ccfc1df01f
https://github.com/weseek/growi

广告
将在 10 秒后关闭
bannerAds