静看光阴荏苒
不管不顾不问不说也不念

Misskey:一个日产开源SNS系统

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

赞(7)
未经允许不得转载:荒岛 » Misskey:一个日产开源SNS系统
分享到: 更多 (0)

评论 62

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    :oops: lala最近在研究这些sns系统啊

    Sensei6年前 (2018-10-09) Firefox 62.0 Firefox 62.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 没有,巧合看到这个项目了,就想玩玩。。。

      LALA6年前 (2018-10-09) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    UI不錯看,但是看這複雜程度還是放棄ಠ_ಠ

    Xin6年前 (2018-10-09) Firefox 33.0 Firefox 33.0 Mac OS X  10.10 Mac OS X 10.10回复
    • 折腾一下,搭起来几个朋友用还是不错的!

      LALA6年前 (2018-10-09) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    没有 2gb 的VPS :cry:

    ohoh6年前 (2018-10-09) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Mac OS X  10.13.6 Mac OS X 10.13.6回复
    • 胡说,dalao会没有2GB的VPS?

      LALA6年前 (2018-10-10) Google Chrome 69.0.3497.81 Google Chrome 69.0.3497.81 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    Great article.
    Thank you!

    syuilo6年前 (2018-10-10) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • It was the least I could do!

      LALA6年前 (2018-10-10) Google Chrome 69.0.3497.81 Google Chrome 69.0.3497.81 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    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″})

    446年前 (2018-10-11) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 没看到哪里报错了,你贴上来的信息都是正常的,WARN忽略就行了。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    安装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

    YuGer6年前 (2018-10-11) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • certbot只是一个签发ssl证书的工具,如果你的机子装不了不装也不影响。换acme.sh或者自己手动去申请个ssl证书配置到nginx就行了。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  7. #7

    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

    YuGer6年前 (2018-10-11) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  8. #8

    超想弄好这个,博主能帮我吗,教我下企鹅659256283 i can pay

    YuGer6年前 (2018-10-11) UC Browser 12.1.4.1103 UC Browser 12.1.4.1103 iPhone iOS 12.0 iPhone iOS 12.0回复
  9. #9

    help me

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
  10. #10

    lala 你网站新加坡是阿里云国际版的吗

    三世苍凉6年前 (2018-10-11) Google Chrome 63.0.3239.132 Google Chrome 63.0.3239.132 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 是的。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  11. #11

    博主在了吗,一直弄不好,好气哦

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
  12. #12

    全套教程走最后502

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
  13. #13

    vi /etc/nginx/conf.d/example.com.conf
    这一步文件名example.com要改成自己的吗,还有文件里的example.com要改成自己的吗,除了example.com还有要改的吗 :cry: :cry: :cry: :cry: :cry: :cry:

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 凡是文章里面有example.com的部分你就都改成你自己的域名吧,除了最后那一条设置管理员的命令外。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  14. #14

    受不了了哦

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
  15. #15

    感觉这个比长毛象好玩呀

    yuger6年前 (2018-10-11) Google Chrome 68.0.3440.33 Google Chrome 68.0.3440.33 Windows 10 x64 Edition Windows 10 x64 Edition回复
  16. #16

    加个tg也行呀

    YuGer6年前 (2018-10-12) UC Browser 12.1.4.1103 UC Browser 12.1.4.1103 iPhone iOS 12.0 iPhone iOS 12.0回复
    • 你这是在刷屏吗。。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 嘿嘿,是的呢

        YuGer6年前 (2018-10-12) UC Browser 12.1.4.1103 UC Browser 12.1.4.1103 iPhone iOS 12.0 iPhone iOS 12.0回复
  17. #17

    我等下再试试

    YuGer6年前 (2018-10-12) UC Browser 12.1.4.1103 UC Browser 12.1.4.1103 iPhone iOS 12.0 iPhone iOS 12.0回复
  18. #18

    :smile:

    YuGer6年前 (2018-10-12) UC Browser 12.1.4.1103 UC Browser 12.1.4.1103 iPhone iOS 12.0 iPhone iOS 12.0回复
  19. #19

    https://t.me/YuGer 我的TG我是你的死忠粉哦,加下我呗

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  20. #20

    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’

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  21. #21

    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″})

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  22. #22

    [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.

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  23. #23

    按步骤来签名也成功了,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.

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  24. #24

    显示是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 ]

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  25. #25

    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)

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  26. #26

    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 ]

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  27. #27

    24 verbose exit [ 1, true ]

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  28. #28

    我问了作者,他说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; 啊

    YuGer6年前 (2018-10-12) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 你别刷屏了,看TG消息。。

      LALA6年前 (2018-10-12) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  29. #29

    :razz: 楼上的解决了么 一个毛病…

    系时6年前 (2018-10-17) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 你楼上那位是我后来帮他安装的。。。

      LALA6年前 (2018-10-17) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  30. #30

    搭好之后发现不能自动跳转https用rewrite解决了
    但是肿么是嘤文的啊 :eek:
    界面超喜欢又舍不得换花了一晚上只汉化了1/3不到 :cry:
    然鹅当我过了一段时间再刷新的时候
    502 Bad Gateway
    :cry: :cry: :cry: :cry: 搞咩啊
    各种重新配置重启服务都不管用
    我死了算了 :cry:

    秋霜烈日6年前 (2018-10-19) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 我的小阔爱,快把你的翻译贡献到:https://crowdin.com/project/misskey :wink:
      502的原因没有日志,我也不知道是哪里出问题了 :razz:
      别放弃,要有一晚上重装无数次系统的决心 :oops:

      LALA6年前 (2018-10-20) Google Chrome 67.0.3396.99 Google Chrome 67.0.3396.99 Windows 10 x64 Edition Windows 10 x64 Edition回复
  31. #31

    求助… 教程走完之后打开网页显示502….

    Never6666年前 (2018-11-12) Google Chrome 68.0.3440.106 Google Chrome 68.0.3440.106 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • nginx的log能复制一段上来看看吗?

      LALA6年前 (2018-11-13) Google Chrome 69.0.3497.100 Google Chrome 69.0.3497.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
  32. #32

    lala你好,我看了下官方的文档说Node.js >= 10.0.0,是程序更新了么

    superuser6年前 (2018-11-25) Google Chrome 66.0.3359.181 Google Chrome 66.0.3359.181 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 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.

      superuser6年前 (2018-11-26) Google Chrome 66.0.3359.181 Google Chrome 66.0.3359.181 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • npm报错评论里面说不清楚的。。npm的日志都很模糊。。。

        LALA5年前 (2018-11-27) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
        • 补充一点:我估计你这是机器内存不够,进程被杀掉了。。。这个项目生成静态文件的时候大约需要用到4G内存。

          LALA5年前 (2018-11-27) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 应该是吧,10.x和旧版安装都差不多。

      LALA5年前 (2018-11-27) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
  33. #33

    执行指令:”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 ]
    :???:

    superuser6年前 (2018-11-25) Google Chrome 66.0.3359.181 Google Chrome 66.0.3359.181 Windows 10 x64 Edition Windows 10 x64 Edition回复
  34. #34

    lala,装了宝塔面板还可以装这个吗?

    vigil5年前 (2018-12-05) Google Chrome 70.0.3538.67 Google Chrome 70.0.3538.67 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 用宝塔的Nginx,其他都按文章的来安装,应该是可以的。

      LALA5年前 (2018-12-07) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 嗯,谢谢LaLa,虽然好了,不过我最后决定去搭Mastodon了 :cry: :cry:

        vigil5年前 (2018-12-08) Google Chrome 70.0.3538.67 Google Chrome 70.0.3538.67 Windows 10 x64 Edition Windows 10 x64 Edition回复
        • 哎,我也很纠结,其实这个Misskey的UI真的比Mastodon好看很多,但是实际用起来还是没Mastodon顺手,所以我最后也选择的Mastodon。。。

          LALA5年前 (2018-12-09) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复
  35. #35

    在执行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
    请问是什么情况?? :eek:

    维安雨轩5年前 (2019-08-04) Google Chrome 75.0.3770.142 Google Chrome 75.0.3770.142 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 机器有多少内存?构建的时候可能需要4GB。

      LALA5年前 (2019-08-04) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 16gb的内存

        维安雨轩5年前 (2019-08-05) Google Chrome 75.0.3770.142 Google Chrome 75.0.3770.142 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 我安装也出现了这个问题,博主有空更新一下这个教程吗?

        wangji4年前 (2020-04-12) Google Chrome 80.0.3987.163 Google Chrome 80.0.3987.163 Windows 10 x64 Edition Windows 10 x64 Edition回复
  36. #36

    请问搭建misskey使用PgSQL好还是MonGoDB好?现在十分纠结,网上也没什么相关资料。 :eek:

    Nemo2年前 (2022-09-20) Google Chrome 96.0.4664.46 Google Chrome 96.0.4664.46 Android 5.1 Android 5.1回复

分享创造快乐

广告合作资源投稿