Misskey是一个基于Node.js的日产开源微博系统。
这套系统有两个非常亮眼的地方:
1.Misskey和Mastodon一样都是使用的Fediverse,所以Misskey可以与Mastodon等其他SNS平台互通,也就是说你可以跨平台交流。换句话说,Misskey也是一个“去中心化”的SNS平台。
2.Misskey的前端设计是真的太漂亮了,没图我说个J8:
个人资料页:
有兴趣可以去Misskey的官方实例注册个账号体验一下:https://misskey.xyz/
这么漂亮的妹纸(程序),不玩玩感觉亏了一个亿~
首先准备一下:
1.一台内存大于2GB的VPS,内存小于2G就别折腾了。
2.一个顶级域名已经解析到你的VPSIP,这个程序必须要用域名,并且强制SSL。
现在祭出烂大街的CentOS7X64,来走一波安装过程,首先更新一下系统:
yum -y update
EPEL源是肯定必不可少的啦:
yum -y install epel-release
开发工具包也走一走:
yum -y groupinstall "Development Tools"
基本组件装一装:
yum -y install wget git openssl-devel
Node.js搞一搞:
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - yum -y install nodejs
Redis也搞一下:
yum -y install redis
启动Redis并设置开鸡启动:
systemctl start redis systemctl enable redis
Misskey使用Mongodb,所以现在先新建一个源:
vi /etc/yum.repos.d/mongodb-org-3.6.repo
写入:
[mongodb-org-3.6] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
然后安装一下Mongodb
yum -y install mongodb-org
启动Mongodb并设置开机启动:
systemctl enable mongod.service systemctl start mongod.service
创建数据库:
mongo use misskey db.users.save( {dummy:"dummy"} ) db.createUser( { user: "misskey", pwd: "password", roles: [ { role: "readWrite", db: "misskey" } ] } ) exit
注:password修改成一个你的高强度密码,确保数据安全。
现在拉取项目文件并进入项目目录:
git clone -b master git://github.com/syuilo/misskey.git cd misskey
检查最新版本:
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
安装项目所需依赖:
npm install
复制一份配置文件并编辑:
cp .config/example.yml .config/default.yml vi .config/default.yml
在这个配置内,你至少应该修改如下选项:
name: example-instance-name # Name of your instance description: example-description # Description of your instance maintainer: name: example-maitainer-name # Your name url: http://example.com/ # Your contact (http or mailto) # Final accessible URL seen by a user. url: https://example.tld/ # port: 3000 # A port that your Misskey server should listen. mongodb: host: localhost port: 27017 db: misskey user: example-misskey-user pass: example-misskey-pass redis: host: localhost port: 6379 pass: example-pass
其中url的地址必须是https,port前面的#号注释要去掉,redis的pass修改成null。
编辑好了之后安装node-gyp:
npm install -g node-gyp
继续使用node-gyp安装项目所需依赖:
node-gyp configure node-gyp build
开始构建:
NODE_ENV=production npm run build
完成之后,新建一个系统服务:
vi /etc/systemd/system/misskey.service
写入:
[Unit] Description=Misskey daemon [Service] Type=simple User=root ExecStart=/usr/bin/npm start WorkingDirectory=/root/misskey TimeoutSec=60 StandardOutput=syslog StandardError=syslog SyslogIdentifier=misskey Restart=always Environment=NODE_ENV=production [Install] WantedBy=multi-user.target
现在我们就可以用systemd来启动Misskey了:
systemctl enable misskey systemctl start misskey
现在我们关闭防火墙和SELinux:
systemctl stop firewalld.service systemctl disable firewalld.service
vi /etc/selinux/config SELINUX=disabled setenforce 0
安装Certbot:
yum -y install certbot
使用Certbot签发域名证书(example.com换成你的域名):
certbot certonly --standalone -d example.com
签发成功之后,证书路径:
/etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem
现在安装Nginx用于反向代理,新建一个源:
vi /etc/yum.repos.d/nginx.repo
写入:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1
然后yum搞一下:
yum -y install nginx
现在新建一个站点配置文件:
vi /etc/nginx/conf.d/example.com.conf
写入:
map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; listen 443 ssl http2; server_name example.com www.example.com; client_max_body_size 100m; client_body_buffer_size 2048k; if ($server_port !~ 443){ rewrite ^(/.*)$ https://$host$1 permanent; } ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; error_page 497 https://$host$request_uri; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Proxy ""; proxy_pass_header Server; proxy_pass http://127.0.0.1:3000; proxy_buffering off; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; tcp_nodelay on; } }
接着修改Nginx主配置文件:
vi /etc/nginx/nginx.conf
修改第一行nginx的运行用户为root:
user root;
最后启动Nginx:
systemctl start nginx
现在,打开你的站点域名,你应该可以看到一个Misskey的实例了。现在你应该注册一个账号,接着回到终端内。
把你的账号设置为管理员:
node cli/mark-admin @example@example.com
本文参考文献:
https://github.com/syuilo/misskey/blob/develop/docs/setup.ja.md
https://github.com/syuilo/misskey/blob/develop/docs/manage.ja.md
lala最近在研究这些sns系统啊
没有,巧合看到这个项目了,就想玩玩。。。
UI不錯看,但是看這複雜程度還是放棄ಠ_ಠ
折腾一下,搭起来几个朋友用还是不错的!
没有 2gb 的VPS
胡说,dalao会没有2GB的VPS?
Great article.
Thank you!
It was the least I could do!
npm install的时候报错
npm WARN lifecycle misskey@10.7.0~install: cannot run in wd misskey@10.7.0 node-gyp rebuild (wd=/root/misskey)
npm WARN bootstrap@4.1.3 requires a peer of jquery@1.9.1 – 3 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-vue@4.7.1 requires a peer of eslint@^3.18.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
没看到哪里报错了,你贴上来的信息都是正常的,WARN忽略就行了。
安装Certbot遇到
Traceback (most recent call last):
File “/usr/bin/certbot”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 3138, in
@_call_aside
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 3122, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 3151, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 666, in _build_master
return cls._build_from_requirements(__requires__)
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 679, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 867, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘urllib3=1.21.1’ distribution was not found and is required by requests
certbot只是一个签发ssl证书的工具,如果你的机子装不了不装也不影响。换acme.sh或者自己手动去申请个ssl证书配置到nginx就行了。
npm install一堆warn
[root@Furry misskey]# npm install
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated – replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated @types/commander@2.12.2: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don’t need @types/commander installed!
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
> diskusage@0.2.5 install /root/misskey/node_modules/diskusage
> node-gyp rebuild
make: Entering directory `/root/misskey/node_modules/diskusage/build’
CXX(target) Release/obj.target/diskusage/src/main.o
CXX(target) Release/obj.target/diskusage/src/diskusage_posix.o
../src/diskusage_posix.cpp: In function ‘DiskUsage GetDiskUsage(const char*)’:
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bsize’ [-Wmissing-field-initializers]
struct statvfs info = {};
^
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_frsize’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_blocks’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bfree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bavail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_files’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_ffree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_favail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_fsid’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_flag’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_namemax’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::__f_spare’ [-Wmissing-field-initializers]
SOLINK_MODULE(target) Release/obj.target/diskusage.node
COPY Release/diskusage.node
超想弄好这个,博主能帮我吗,教我下企鹅659256283 i can pay
help me
lala 你网站新加坡是阿里云国际版的吗
是的。
博主在了吗,一直弄不好,好气哦
全套教程走最后502
vi /etc/nginx/conf.d/example.com.conf
这一步文件名example.com要改成自己的吗,还有文件里的example.com要改成自己的吗,除了example.com还有要改的吗
凡是文章里面有example.com的部分你就都改成你自己的域名吧,除了最后那一条设置管理员的命令外。
受不了了哦
感觉这个比长毛象好玩呀
加个tg也行呀
你这是在刷屏吗。。
嘿嘿,是的呢
我等下再试试
https://t.me/YuGer 我的TG我是你的死忠粉哦,加下我呗
npm ins 显示
make: Entering directory `/root/misskey/node_modules/diskusage/build’
CXX(target) Release/obj.target/diskusage/src/main.o
CXX(target) Release/obj.target/diskusage/src/diskusage_posix.o
../src/diskusage_posix.cpp: In function ‘DiskUsage GetDiskUsage(const char*)’:
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bsize’ [-Wmissing-field-initializers]
struct statvfs info = {};
^
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_frsize’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_blocks’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bfree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bavail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_files’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_ffree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_favail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_fsid’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_flag’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_namemax’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::__f_spare’ [-Wmissing-field-initializers]
SOLINK_MODULE(target) Release/obj.target/diskusage.node
COPY Release/diskusage.node
make: Leaving directory `/root/misskey/node_modules/diskusage/build’
npm WARN lifecycle misskey@10.9.2~install: cannot run in wd misskey@10.9.2 node-gyp rebuild (wd=/root/misskey)
npm WARN eslint-plugin-vue@4.7.1 requires a peer of eslint@^3.18.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.1.3 requires a peer of jquery@1.9.1 – 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
[root@furry misskey]# systemctl status misskey
● misskey.service – Misskey daemon
Loaded: loaded (/etc/systemd/system/misskey.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2018-10-12 10:02:48 CST; 3min 13s ago
Main PID: 22069 (code=exited, status=1/FAILURE)
Oct 12 10:02:48 furry systemd[1]: misskey.service: main process exited, code=exited, status=1/FAILURE
Oct 12 10:02:48 furry misskey[22069]: npm ERR! A complete log of this run can be found in:
Oct 12 10:02:48 furry misskey[22069]: npm ERR! /root/.npm/_logs/2018-10-12T02_02_48_527Z-debug.log
Oct 12 10:02:48 furry systemd[1]: Unit misskey.service entered failed state.
Oct 12 10:02:48 furry systemd[1]: misskey.service failed.
Oct 12 10:02:48 furry systemd[1]: misskey.service holdoff time over, scheduling restart.
Oct 12 10:02:48 furry systemd[1]: start request repeated too quickly for misskey.service
Oct 12 10:02:48 furry systemd[1]: Failed to start Misskey daemon.
Oct 12 10:02:48 furry systemd[1]: Unit misskey.service entered failed state.
Oct 12 10:02:48 furry systemd[1]: misskey.service failed.
按步骤来签名也成功了,example.com也都改了,到最后一步创建管理员也成功了,但是访问502,运行systemctl status misskey显示
● misskey.service – Misskey daemon
Loaded: loaded (/etc/systemd/system/misskey.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2018-10-12 10:02:48 CST; 11min ago
Main PID: 22069 (code=exited, status=1/FAILURE)
Oct 12 10:02:48 furry systemd[1]: misskey.service: main process exited, code=exited, status=1/FAILURE
Oct 12 10:02:48 furry misskey[22069]: npm ERR! A complete log of this run can be found in:
Oct 12 10:02:48 furry misskey[22069]: npm ERR! /root/.npm/_logs/2018-10-12T02_02_48_527Z-debug.log
Oct 12 10:02:48 furry systemd[1]: Unit misskey.service entered failed state.
Oct 12 10:02:48 furry systemd[1]: misskey.service failed.
Oct 12 10:02:48 furry systemd[1]: misskey.service holdoff time over, scheduling restart.
Oct 12 10:02:48 furry systemd[1]: start request repeated too quickly for misskey.service
Oct 12 10:02:48 furry systemd[1]: Failed to start Misskey daemon.
Oct 12 10:02:48 furry systemd[1]: Unit misskey.service entered failed state.
Oct 12 10:02:48 furry systemd[1]: misskey.service failed.
显示是npm错误,查看错误日志显示0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle misskey@10.9.2~prestart: misskey@10.9.2
6 info lifecycle misskey@10.9.2~start: misskey@10.9.2
7 verbose lifecycle misskey@10.9.2~start: unsafe-perm in lifecycle true
8 verbose lifecycle misskey@10.9.2~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/misskey/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
9 verbose lifecycle misskey@10.9.2~start: CWD: /root/misskey
10 silly lifecycle misskey@10.9.2~start: Args: [ ‘-c’, ‘node ./built’ ]
11 silly lifecycle misskey@10.9.2~start: Returned: code: 1 signal: null
12 info lifecycle misskey@10.9.2~start: Failed to exec start script
13 verbose stack Error: misskey@10.9.2 start: `node ./built`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid misskey@10.9.2
15 verbose cwd /root/misskey
16 verbose Linux 3.10.0-862.14.4.el7.x86_64
17 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error misskey@10.9.2 start: `node ./built`
22 error Exit status 1
23 error Failed at the misskey@10.9.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
11 silly lifecycle misskey@10.9.2~start: Returned: code: 1 signal: null
12 info lifecycle misskey@10.9.2~start: Failed to exec start script
13 verbose stack Error: misskey@10.9.2 start: `node ./built`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid misskey@10.9.2
15 verbose cwd /root/misskey
16 verbose Linux 3.10.0-862.14.4.el7.x86_64
17 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error misskey@10.9.2 start: `node ./built`
22 error Exit status 1
23 error Failed at the misskey@10.9.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
24 verbose exit [ 1, true ]
我问了作者,他说443被占用,问题是443被nginx占用
[root@furry misskey]# netstat -lnp|grep 443
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 27142/nginx: master
[root@furry misskey]# ps 27142
PID TTY STAT TIME COMMAND
27142 ? Ss 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
这个文件我只改了user root; 啊
你别刷屏了,看TG消息。。
楼上的解决了么 一个毛病…
你楼上那位是我后来帮他安装的。。。
搭好之后发现不能自动跳转https用rewrite解决了
但是肿么是嘤文的啊
界面超喜欢又舍不得换花了一晚上只汉化了1/3不到
然鹅当我过了一段时间再刷新的时候
502 Bad Gateway
搞咩啊
各种重新配置重启服务都不管用
我死了算了
我的小阔爱,快把你的翻译贡献到:https://crowdin.com/project/misskey
502的原因没有日志,我也不知道是哪里出问题了
别放弃,要有一晚上重装无数次系统的决心
求助… 教程走完之后打开网页显示502….
nginx的log能复制一段上来看看吗?
lala你好,我看了下官方的文档说Node.js >= 10.0.0,是程序更新了么
npm start的时候报错
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! misskey@10.57.3 start: `node ./built`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the misskey@10.57.3 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm报错评论里面说不清楚的。。npm的日志都很模糊。。。
补充一点:我估计你这是机器内存不够,进程被杀掉了。。。这个项目生成静态文件的时候大约需要用到4G内存。
应该是吧,10.x和旧版安装都差不多。
执行指令:”NODE_ENV=production npm run build”构建的时候报错
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/bin/npm’, ‘run’, ‘build’ ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle misskey@10.57.3~prebuild: misskey@10.57.3
6 info lifecycle misskey@10.57.3~build: misskey@10.57.3
7 verbose lifecycle misskey@10.57.3~build: unsafe-perm in lifecycle true
8 verbose lifecycle misskey@10.57.3~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/misskey/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
9 verbose lifecycle misskey@10.57.3~build: CWD: /home/misskey
10 silly lifecycle misskey@10.57.3~build: Args: [ ‘-c’, ‘webpack && gulp build’ ]
11 silly lifecycle misskey@10.57.3~build: Returned: code: 1 signal: null
12 info lifecycle misskey@10.57.3~build: Failed to exec build script
13 verbose stack Error: misskey@10.57.3 build: `webpack && gulp build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid misskey@10.57.3
15 verbose cwd /home/misskey
16 verbose Linux 3.10.0-862.3.3.el7.x86_64
17 verbose argv “/usr/local/bin/node” “/usr/bin/npm” “run” “build”
18 verbose node v10.13.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error misskey@10.57.3 build: `webpack && gulp build`
22 error Exit status 1
23 error Failed at the misskey@10.57.3 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
lala,装了宝塔面板还可以装这个吗?
用宝塔的Nginx,其他都按文章的来安装,应该是可以的。
嗯,谢谢LaLa,虽然好了,不过我最后决定去搭Mastodon了
哎,我也很纠结,其实这个Misskey的UI真的比Mastodon好看很多,但是实际用起来还是没Mastodon顺手,所以我最后也选择的Mastodon。。。
在执行node-gyp configure
gyp: binding.gyp not found (cwd: /root/misskey) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-957.21.2.el7.x86_64
gyp ERR! command “/usr/bin/node” “/usr/bin/node-gyp” “configure”
gyp ERR! cwd /root/misskey
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
还有在执行node-gyp build
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-957.21.2.el7.x86_64
gyp ERR! command “/usr/bin/node” “/usr/bin/node-gyp” “build”
gyp ERR! cwd /root/misskey
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
请问是什么情况??
机器有多少内存?构建的时候可能需要4GB。
16gb的内存
我安装也出现了这个问题,博主有空更新一下这个教程吗?
请问搭建misskey使用PgSQL好还是MonGoDB好?现在十分纠结,网上也没什么相关资料。