Indico 是一款开源的事件管理工具,专注于为会议、研讨会、讲座等各类活动提供全生命周期管理支持,涵盖活动组织、资料归档及团队协作三大核心场景。其设计理念强调“开箱即用”的易用性,同时支持通过插件扩展功能,满足多样化需求。
如需深入技术细节或部署实践,可参考文档中的安装章节或API开发指南。
从上游仓库安装 PostgreSQL 以获取较新版本。
bashapt install -y lsb-release wget curl gnupgwget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor > /usr/share/keyrings/pgdg-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/pgdg-archive-keyring.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.listapt updateapt install -y --install-recommends postgresql-16 libpq-dev nginx libxslt1-dev libxml2-dev libffi-dev libpcre3-dev libyaml-dev libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev xz-utils liblzma-dev uuid-dev build-essential redis-server git libpango1.0-dev
bashsystemctl start postgresql.service redis-server.service
为 Indico 创建用户和数据库,并启用必要的 Postgres 扩展(需 Postgres 超级用户权限)。
bashsu - postgres -c 'createuser indico'su - postgres -c 'createdb -O indico indico'su - postgres -c 'psql indico -c "CREATE EXTENSION unaccent; CREATE EXTENSION pg_trgm;"'
重要:在生产环境中使用 Indico 时,不要忘记设置定期数据库备份的 cron 任务!
默认的 uWSGI 和 Nginx 配置文件在大多数情况下可正常工作。
bashcat > /etc/uwsgi-indico.ini <<'EOF'[uwsgi]uid = indicogid = www-dataumask = 027 processes = 4enable-threads = truechmod-socket = 770chown-socket = indico:www-datasocket = /opt/indico/web/uwsgi.sockstats = /opt/indico/web/uwsgi-stats.sockprotocol = uwsgi master = trueauto-procname = trueprocname-prefix-spaced = indicodisable-logging = true single-interpreter = true touch-reload = /opt/indico/web/indico.wsgiwsgi-file = /opt/indico/web/indico.wsgivirtualenv = /opt/indico/.venv vacuum = truebuffer-size = 20480memory-report = truemax-requests = 2500harakiri = 900harakiri-verbose = truereload-on-rss = 2048evil-reload-on-rss = 8192EOF
bashcat > /etc/systemd/system/indico-uwsgi.service <<'EOF'[Unit]Description=Indico uWSGIAfter=network.target [Service]ExecStart=/opt/indico/.venv/bin/uwsgi --ini /etc/uwsgi-indico.iniExecReload=/bin/kill -HUP $MAINPIDRestart=alwaysSyslogIdentifier=indico-uwsgiUser=indicoGroup=www-dataUMask=0027Type=notifyNotifyAccess=allKillMode=mixedKillSignal=SIGQUITTimeoutStopSec=300 [Install]WantedBy=multi-user.targetEOF
将 YOURHOSTNAME
替换为 Indico 实例的主机名(如 indico.yourdomain.com
)。
bashcat > /etc/nginx/conf.d/indico.conf <<'EOF'server { listen 80; listen [::]:80; server_name YOURHOSTNAME; return 301 https://$server_name$request_uri;} server { listen *:443 ssl http2; listen [::]:443 ssl http2 default ipv6only=on; server_name YOURHOSTNAME; ssl_certificate /etc/ssl/indico/indico.crt; ssl_certificate_key /etc/ssl/indico/indico.key; ssl_dhparam /etc/ssl/indico/ffdhe2048; ssl_session_timeout 1d; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; access_log /opt/indico/log/nginx/access.log combined; error_log /opt/indico/log/nginx/error.log; if ($host != $server_name) { rewrite ^/(.*) https://$server_name/$1 permanent; } location /.xsf/indico/ { internal; alias /opt/indico/; } location ~ ^/(images|fonts)(.*)/(.+?)(__v[0-9a-f]+)?\.([^.]+)$ { alias /opt/indico/web/static/$1$2/$3.$5; access_log off; } location ~ ^/(css|dist|images|fonts)/(.*)$ { alias /opt/indico/web/static/$1/$2; access_log off; } location /robots.txt { alias /opt/indico/web/static/robots.txt; access_log off; } location / { root /var/empty/nginx; include /etc/nginx/uwsgi_params; uwsgi_pass unix:/opt/indico/web/uwsgi.sock; uwsgi_param UWSGI_SCHEME $scheme; uwsgi_read_timeout 15m; uwsgi_buffers 32 32k; uwsgi_busy_buffers_size 128k; uwsgi_hide_header X-Sendfile; client_max_body_size 1G; }}EOF
bashmkdir /etc/ssl/indicochown root:root /etc/ssl/indico/chmod 700 /etc/ssl/indico
bashcat > /etc/ssl/indico/ffdhe2048 <<'EOF'-----BEGIN DH PARAMETERS-----MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaDssbzSibBsu/6iGtCOGEoXJf//////////wIBAg==-----END DH PARAMETERS-----EOF
将 YOURHOSTNAME
替换为实际主机名。
bashopenssl req -x509 -nodes -newkey rsa:4096 -subj /CN=YOURHOSTNAME -keyout /etc/ssl/indico/indico.key -out /etc/ssl/indico/indico.crt
注意:自签名证书仅适用于测试,生产环境应使用商业证书或 Let's Encrypt 免费证书。
bashcat > /etc/systemd/system/indico-celery.service <<'EOF'[Unit]Description=Indico CeleryAfter=network.target [Service]ExecStart=/opt/indico/.venv/bin/indico celery worker -BRestart=alwaysSyslogIdentifier=indico-celeryUser=indicoGroup=www-dataUMask=0027Type=simpleKillMode=mixedTimeoutStopSec=300 [Install]WantedBy=multi-user.targetEOF systemctl daemon-reload
bashuseradd -rm -g www-data -d /opt/indico -s /bin/bash indicosu - indico
bashcurl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash cat >> ~/.bashrc <<'EOF'export PATH="/opt/indico/.pyenv/bin:$PATH"eval "$(pyenv init --path)"eval "$(pyenv init -)"EOF source ~/.bashrc
bashpyenv install 3.12pyenv global 3.12
bashpython -m venv --upgrade-deps --prompt indico ~/.venvsource ~/.venv/bin/activateecho 'source ~/.venv/bin/activate' >> ~/.bashrcpip install setuptools wheelpip install uwsgipip install indico
运行配置向导,根据提示设置 Indico URL(使用 https://YOURHOSTNAME
)、邮箱和 SMTP 服务器等信息。
bashindico setup wizard
bashmkdir ~/log/nginxchmod go-rwx ~/* ~/.[^.]*chmod 710 ~/ ~/archive ~/cache ~/log ~/tmpchmod 750 ~/web ~/.venvchmod g+w ~/log/nginxecho -e "\nSTATIC_FILE_METHOD = ('xaccelredirect', {'/opt/indico': '/.xsf/indico'})" >> ~/etc/indico.conf
bashindico db prepareexit
bashsystemctl restart nginx.service indico-celery.service indico-uwsgi.servicesystemctl enable nginx.service postgresql.service redis-server.service indico-celery.service indico-uwsgi.service
bashapt install -y certbot python3-certbot-nginxcertbot --nginx --no-redirect --staple-ocsp -d YOURHOSTNAMErm -f /etc/ssl/indico/indico.*systemctl start certbot.timersystemctl enable certbot.timer
访问 https://YOURHOSTNAME
,按照页面提示创建初始用户。
参考 PDF 生成指南 配置 Indico 的 PDF 文档生成功能。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。