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

开源免费的社区/论坛系统:Homeland

这是一套基于Ruby开发的论坛系统,功能完善,界面很简洁,给人一种干净/小清新的感觉~

项目地址:https://github.com/ruby-china/homeland

官方推荐使用Docker部署,所以部署过程很简单,此外官方也有非常详细的使用文档了:

https://gethomeland.com/docs/

注意:因为我看了下这个程序搜索这块用到了ES,这个玩意非常占用内存,所以建议机器内存最好大于4GB,另外Docker不支持OVZ,请使用KVM等全虚拟化VPS安装。

下面是我在CentOS7上的部署过程:

更新系统:

yum -y update

安装Docker:

cd
yum -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.1.ce-3.el7.x86_64.rpm
systemctl start docker
systemctl enable docker.service

安装Docker-Compose:

curl -L https://github.com/docker/compose/releases/download/1.23.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

安装Git拉取项目并进入到项目目录:

yum -y install git
git clone https://github.com/ruby-china/homeland-docker.git
cd homeland-docker/

复制一份配置文件并进行编辑:

cp app.local.env.example app.local.env
vi app.local.env

下面是我用部署时用到的配置文件:

RAILS_ENV=production
# RAILS_LOG_TO_STDOUT=true

# Nginx
# NGINX_WORKER_CONNECTIONS=65535

# Database
DATABASE_URL=postgres://postgres@postgresql:5432/homeland
# DATABASE_POOL=64
REDIS_URL=redis://redis:6379/1
ELASTICSEARCH_HOST=elasticsearch:9200

# App Config
app_name=KoKoCAT
https=false
domain=koko.cat
cert_domain=*.koko.cat
modules=home,topic,press,site,note
profile_fields=all
admin_emails=1062951199@qq.com
asset_host=
upload_provider=file
upload_host=

注:

1.admin_emails请一定要修改成你自己的邮箱,这款论坛程序是根据邮箱来添加管理员账号的。也就是说你在这里配置好你的邮箱地址,待会在前台注册用户的时候填写和这个地址相同的邮箱,那么你注册的账号就是管理员。

2.https=false,初次安装这个一定要关闭,否则安装完成之后站点无法打开。要配置ssl也是在安装完成之后配置,但是我实测这个程序配置ssl这块估计是有点bug,Nginx各种出错。

3.domain修改成你自己的域名,app_name则是你的论坛名字,这个在安装完成之后也可以在后台设置。

确认无误后开始安装:

make install

完成之后运行:

make start

这样Homeland就安装完成了,如需配置SSL,则运行:

make install_ssl

完成之后重启程序:

make restart

我之前也说了,这个程序配置ssl估计是有bug,反正ssl我这边是配置不上,下面是我配置ssl的出错信息:

[Tue Nov 27 12:02:05 UTC 2018] Installing key to:/home/app/ssl/homeland.key
[Tue Nov 27 12:02:05 UTC 2018] Installing full chain to:/home/app/ssl/homeland.crt
[Tue Nov 27 12:02:05 UTC 2018] Run reload cmd: nginx -s reload
nginx: [error] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
[Tue Nov 27 12:02:05 UTC 2018] Reload error for :
make: *** [install_ssl] Error 1

我懒得折腾了,就这样吧,希望你们安装的时候不会出和我一样的问题。。。

关于邮件的配置,这里照搬一下官方的文档,因为我没有配置,不知道有没有什么坑:

vi app.local.env

添加如下参数:

mailer_provider=smtp
mailer_sender=no-reply@your-domain.com
mailer_options_address=smtp.gmail.com
mailer_options_port=587
mailer_options_domain=your-domain.com
mailer_options_user_name=no-reply@your-domain.com
mailer_options_password=your-password
mailer_options_authentication=plain
mailer_options_enable_starttls_auto=true

帖子页面:

论坛页面:

总而言之是一款很不错的论坛程序,用在生产环境是肯定没问题的。当然最重要的是我又成功水了一篇文章~

赞(8)
未经允许不得转载:荒岛 » 开源免费的社区/论坛系统:Homeland
分享到: 更多 (0)

评论 11

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

    :smile:

    瞎折腾5年前 (2018-11-28) Google Chrome 68.0.3440.91 Google Chrome 68.0.3440.91 Android 6.0.1 Android 6.0.1回复
  2. #2

    :razz: 怎么感觉人越来越少了呀。

    小阳5年前 (2018-11-28) Google Chrome 68.0.3440.106 Google Chrome 68.0.3440.106 Windows 7 Windows 7回复
    • 要那么多人来干嘛。。

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

    虽然评论的人不多,但阅读量不少

    king5年前 (2018-11-29) Opera 1.170623.032 Opera 1.170623.032 Android 8.0.0 Android 8.0.0回复
  4. #4

    ui布局很像xiunobbs… :smile:

    老猥琐了5年前 (2018-11-30) Google Chrome 70.0.3538.102 Google Chrome 70.0.3538.102 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 讲道理这个的UI还是要比XIUNO好看很多的。。就是维护起来没传统的PHP论坛程序方便。

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

    请问,这个数据库怎么配置?

    MM马5年前 (2018-12-08) Google Chrome 68.0.3440.106 Google Chrome 68.0.3440.106 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 都用docker了,人家都是一键安装配置了,不知道你要配置什么数据库?

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

    Discourse还是homeland好

    艾滋狂魔5年前 (2019-01-22) Google Chrome 71.0.3578.98 Google Chrome 71.0.3578.98 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • homeland吧,轻量点。

      LALA5年前 (2019-01-22) Google Chrome 70.0.3538.110 Google Chrome 70.0.3538.110 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿