安装MRBS并配置CAS

最近帮助院系使用MRBS(Meeting Room Booking System)搭建了一个简单的会议室预约系统,并配置了Apereo CAS登陆。 安装MRBS 前半部分主要参考的是MRBS的官方安装文档。 从 https://sourceforge.net/projects/mrbs/files/ 下载MRBS,同时,需要保证机器上已经安装了nginx, mysql/mariadb, fcgiwrap , php-fpm, php-xml 和 php-curl。 解压MRBS的压缩包。在本文中,MRBS被安装在了/var/www/mrbs/中。 创建数据库,根据官方文档,需要在MySQL中创建MRBS有关的数据表(PostgreSQL的情况类似,见文档): mysqladmin create mrbs mysql mrbs < tables.my.sql 修改web文件夹中的配置文件config.inc.php: <?php // -*-mode: PHP; coding:utf-8;-*- namespace CCSE; //填写MRBS网页的名字 /************************************************************************** * MRBS Configuration File * Configure this file for your site. * You shouldn't have to modify anything outside this file. * * This file has already been populated with the minimum set of configuration * variables that you will need to change to get your system up and running. * If you want to change any of the other settings in systemdefaults.inc.php * or areadefaults.inc.php, then copy the relevant lines into this file * and edit them here. This file will override the default settings and * when you upgrade to a new version of MRBS the config file is preserved. * * NOTE: if you include or require other files from this file, for example * to store your database details in a separate location, then you should * use an absolute and not a relative pathname. **************************************************************************/ /********** * Timezone **********/ // The timezone your meeting rooms run in. It is especially important // to set this if you're using PHP 5 on Linux. In this configuration // if you don't, meetings in a different DST than you are currently // in are offset by the DST offset incorrectly. // // Note that timezones can be set on a per-area basis, so strictly speaking this // setting should be in areadefaults.inc.php, but as it is so important to set // the right timezone it is included here. // // When upgrading an existing installation, this should be set to the // timezone the web server runs in. See the INSTALL document for more information. // // A list of valid timezones can be found at http://php.net/manual/timezones.php // The following line must be uncommented by removing the '//' at the beginning $timezone = "Asia/Shanghai"; //设定时区 /******************* * Database settings ******************/ // Which database system: "pgsql"=PostgreSQL, "mysql"=MySQL $dbsys = "mysql"; //设定数据库类型 // Hostname of database server. For pgsql, can use "" instead of localhost // to use Unix Domain Sockets instead of TCP/IP. For mysql "localhost" // tells the system to use Unix Domain Sockets, and $db_port will be ignored; // if you want to force TCP connection you can use "127.0.0.1". $db_host = "localhost"; // If you need to use a non standard port for the database connection you // can uncomment the following line and specify the port number $db_port = 3306; //端口 // Database name: $db_database = "mrbs"; //数据库名称 // Schema name. This only applies to PostgreSQL and is only necessary if you have more // than one schema in your database and also you are using the same MRBS table names in // multiple schemas. //$db_schema = "public"; // Database login user name: $db_login = "username"; // Database login password: $db_password = 'password'; //登陆名和密码 // Prefix for table names. This will allow multiple installations where only // one database is available $db_tbl_prefix = "mrbs_"; //表前缀 // Set $db_persist to TRUE to use PHP persistent (pooled) database connections. Note // that persistent connections are not recommended unless your system suffers significant // performance problems without them. They can cause problems with transactions and // locks (see http://php.net/manual/en/features.persistent-connections.php) and although // MRBS tries to avoid those problems, it is generally better not to use persistent // connections if you can. $db_persist = FALSE; 配置nginx server { listen 443 ssl http2; server_name mrbs.website.edu; root /var/www/mrbs/web; index index.php access_log /var/log/nginx/mrbs-access.log; error_log /var/log/nginx/mrbs-error.log; ssl_certificate cert.pem; ssl_certificate_key key.pem; location ~* \.php$ { fastcgi_pass unix:/run/php/php7.4-fpm.sock; #php-fpm的位置需根据实际情况填写 include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; } } ...

2021-01-27 · 更新于: 2024-04-18 · 3 分钟 · sparktour

观摩深圳地铁3号线高架区段维护

在2020年12月,笔者和同学报名参加了一次深圳地铁组织的地铁3号线高架区段维护观摩活动。以下是一些当时拍摄的照片。由于拍摄时间是地铁当天停运后的凌晨,所以许多图片的光线都比较暗。

2020-12-20 · 更新于: 2024-05-04 · 1 分钟 · sparktour

在 Ubuntu/Debian 配置 Smokeping 并使用 Caddy 作为服务器

在 debian/ubuntu 上安装 Smokeping 时, apt 只会给一个用于 apache2 的配置. 并不能直接用于其他的 Web 服务器, 但迫于VPS上的用的 Web 服务器是 Caddy 因此就参考网上的资料整理出了给 Caddy 用的配置方法. ...

2020-03-04 · 更新于: 2024-04-18 · 1 分钟 · sparktour

马草垄行山——换个角度看深圳

马草垄行山——换个角度看深圳 自从港府在2016年大幅缩减了香港边境禁区的范围,深港边境的一些一些高地和旧的遗迹也迅速成为了旅游景点,但由于这些地方尚未完全开发,仍处于香港的“乡郊地带“,因此这些地方仍算是一个较为小众的景点。但正是因为香港侧的未开发地区和深圳的高楼形成了鲜明的对比,因此这里还是吸引了一些摄影爱好者的。 整个行程大概需要花费3-4个小时(如果像我一样步行前往的话),沿途只有一个商店(我所见到的),如果可能请带足水和食物。 ...

2019-09-09 · 更新于: 2024-04-18 · 3 分钟 · sparktour

Hello World Again

Hello World Again 整了一晚上,总算找到这款自己满意的主题了,也基本整理好了博客。 之前在wordpress上尝试过搭建有博客,但是放在wordpress总还是有些不太放心(因为是使用了GCE提供的免费额度搭建的,有被停机的风险)。现在host在GitHub Pages上这方面的问题应该就没有那么大了。 希望这个博客不止会记录关于技术的东西,还能记述一些别的东西(比如游记什么的hhh) 希望我能尽可能的保持一定的的更新频率(flag🤣)。 ...

2019-09-08 · 更新于: 2024-04-18 · 1 分钟 · sparktour

大学生活指南-如何选择适用于寝室的路由器与合适的网络配置

进入了大学,每个同学都想要并需要一个高速,稳定的网络环境,因此选择路由器也就显得十分重要了。本文将会基于笔者之前的一些体验和网络上的文章和数据,推荐几款路由器,并补充一些大陆高校校园网的“技巧”。 ...

2019-07-19 · 更新于: 2024-04-18 · 4 分钟 · sparktour

Enable Pixel 1 's lte in CT/CMCC/CU & Improve Signal Reliability in Mainland China Without Factory Reset 无需恢复出厂设置,让pixel1在大陆可用电信/联通/移动lte

自从pixel1开始,Google就不再把大陆运营商的lte配置文件内置在手机内了,在使用的过程中就会遇到不少麻烦:联通还能基本正常使用(但似乎配置文件不完整,信号会比较一般),但电信就无法直接使用lte了。 ...

2019-05-11 · 更新于: 2024-04-18 · 2 分钟 · sparktour

LRTimelapse: A Better Way to Create a Smooth Time-Lapse

教程:使用LRTimelapse制作平滑的延时 自从有了gopro之后,他的用途一般就是拍摄延时。不过延时的后期处理一直是一件比较麻烦的事情,之前在知道这个软件之前我一直使用AfterEffects和Adobe的ACR来处理,但ACR只能修改序列的第一张图片,后面的图片就和只能沿用第一张图的设置,在处理亮度和色温大幅度变化的场景就很难兼顾全部的图片了。 ...

2019-05-02 · 更新于: 2024-04-18 · 2 分钟 · sparktour

Home Assistant: Using the PC/Apple HomeKit to Control Mi Home Accessories

使用PC/Apple HomeKit控制米家等智能家居 在大一上时购入了一台二手树莓派3b,但一般也只用来挂一下pt,当个下载机和简易nas使用。后来发现Home Assistant这个软件可以连接许多智能家庭平台,于是在绿米Aqura空调伴侣打折时入了一个。 ...

2019-04-26 · 更新于: 2024-04-18 · 3 分钟 · sparktour

Using Ubuntu to Make an Old PC Great Again

to be written

2019-04-21 · 更新于: 2024-04-18 · 1 分钟 · sparktour