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

HumHub:一个漂亮的开源社交软件

这个东西挺不错的,类似于QQ空间。。可以拿来做很多事情,软件本身已经有相当丰富的权限控制功能了,设置一下当成个人博客用或者是当个发布站都可以。

以下安装过程基于在宝塔安装了LNMP的基础上进行,MySQL5.7/PHP7.2,其他随意。

cd /opt
https://www.humhub.org/en/download/package/humhub-1.3.12.tar.gz
tar -xzvf humhub-1.3.12.tar.gz
mv humhub-1.3.12/* /www/wwwroot/koko.cat
mv humhub-1.3.12/.htaccess.dist /www/wwwroot/koko.cat
mv humhub-1.3.12/.php_cs.dist /www/wwwroot/koko.cat
rm -rf humhub-1.3.12.tar.gz
rm -rf humhub-1.3.12

编辑这个文件:

vi /www/wwwroot/koko.cat/protected/config/common.php

把里面的内容修改为下面这样(伪静态需要):

return [
    'components' => [
        'urlManager' => [
            'showScriptName' => false,
            'enablePrettyUrl' => true,
        ],
    ]
];

站点目录的权限改为www:

chown -R www:www /www/wwwroot/koko.cat

添加计划任务:

crontab -e

写入:

* * * * * /usr/bin/php /www/wwwroot/koko.cat/protected/yii queue/run >/dev/null 2>&1
* * * * * /usr/bin/php /www/wwwroot/koko.cat/protected/yii cron/run >/dev/null 2>&1

Nginx规则:

location / {
	index index.php;
	if (!-e $request_filename) {
	rewrite ^/(.*) /index.php?query=$1 last;
	}
}

location ~* \.(?:rss|atom)$ {
	expires 1h;
	add_header Cache-Control "public";
	}
        
location ~ /\.ht {
	deny all;
	}

location /protected {
	deny all;
	}

location /uploads/file {
	deny all;
	}

PHP扩展需要安装fileinfo/exif/intl/opcache:

PHP函数这里删除掉proc_open:

如果需要其他用户也能成功注册到你的站点,你需要一台没有封掉25端口的服务器来发信,宝塔只需要在防火墙设置里面把25端口放行即可:

创建MySQL数据库需要选择如图所示的编码格式:

访问你的域名现在可以开始安装:

检查组件,这里LDAP可以忽略,没什么用处就不配置了。下面那个APCu缓存我们用Opcache代替了,也不用管:

安装过程省略,配置下数据库连接和设置管理员密码什么的就行了,这个程序的UI挺漂亮的:

美美美:

赞(4)
未经允许不得转载:荒岛 » HumHub:一个漂亮的开源社交软件
分享到: 更多 (0)

评论 12

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

    大胸弟,你好像打错字了
    计划任务:crobtab -e :eek: :eek: :eek: :eek:

    little Mo5年前 (2019-04-06) Google Chrome 73.0.3683.75 Google Chrome 73.0.3683.75 Windows 7 x64 Edition Windows 7 x64 Edition回复
    • 感谢,已更正。。。

      LALA5年前 (2019-04-06) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    :idea: 腾讯云本来说买个香港的,看它一直不停,今天打算买居然关了

    瞎折腾5年前 (2019-04-06) Google Chrome 73.0.3683.90 Google Chrome 73.0.3683.90 Android 8.1.0 Android 8.1.0回复
    • 我都没用过腾讯云。。

      LALA5年前 (2019-04-06) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 看到便宜嘛,199一年 :cry:

        瞎折腾5年前 (2019-04-07) Google Chrome 73.0.3683.90 Google Chrome 73.0.3683.90 Android 8.1.0 Android 8.1.0回复
  3. #3

    MySQL5.7/PHP7.2能架设吗,菜鸟一个现在自己弄的站就折腾半天 :!:

    操心累5年前 (2019-04-08) Google Chrome 73.0.3683.86 Google Chrome 73.0.3683.86 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 我就是用的你说的版本搭建的。

      LALA5年前 (2019-04-08) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    这个有搭建好的演示站吗?

    筑楼5年前 (2019-04-21) Safari 12.0 Safari 12.0 iPhone iOS 12.1.4 iPhone iOS 12.1.4回复
    • 最底部那个截图就是我之前搭的。

      LALA5年前 (2019-04-21) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    那么为什么https可以访问安装https就不行了呢

    Yuger5年前 (2019-06-05) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • ???

      LALA5年前 (2019-06-05) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    不错哈 ,搭建好了,用来ACG交流 :cool:
    链接: https://acgx.cc

    ACGX4年前 (2020-01-27) Google Chrome 79.0.3945.130 Google Chrome 79.0.3945.130 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿