在Arch Linux上使用Makepkg
在Arch Linux上使用Makepkg可以避免系统污染,确保仅安装必要的依赖关系。
Alfresco社区版是Alfresco Content Services的开源版本。它是用Java编写的,并使用PostgreSQL来存储其数据库。Alfresco是一个企业内容管理系统,用于许多类型的数字资产,例如文档,记录,Web,图像,视频等。它也用于协作内容开发。您可以使用SMB,WebDAV,FTP和CIMS访问托管的Alfresco的文件存储库。搜索文件由Apache Solr支持。
在本教程中,我们将使用 192.168.0.1 公共IP地址和 share.example.com 指向Vultr实例的域名。请确保将所有示例域名和公共IP地址替换为实际的域名和公共IP地址。
使用指南如何更新Ubuntu 16.04更新基本系统 。系统更新后,继续安装依赖项。
Alfresco提供了一个随时可以安装的二进制安装程序包,其中包含运行该应用程序所需的所有软件。但是,我们需要安装一些依赖项来支持LibreOffice插件。
sudo apt -y install fontconfig libsm-dev libice-dev libxt-dev libxrender-dev libxext-dev cups libglu1-mesa-dev libcairo2-dev libgl-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so.1
从Alfresco网站下载安装程序包。您始终可以在Alfresco下载页面上找到最新安装程序的链接 。
wget https://download.alfresco.com/release/community/201707-build-00028/alfresco-community-installer-201707-linux-x64.bin
提供对安装程序文件的执行权限。
sudo chmod +x alfresco-community-installer-201707-linux-x64.bin
开始安装。
sudo ./alfresco-community-installer-201707-linux-x64.bin
选择安装语言。对于安装类型,您可以选择第一个“ Easy install”。这将使用默认配置安装应用程序。
选择默认位置, /opt/alfresco-community以安装应用程序。
指定管理员密码,然后选择“ Y”作为服务安装。这将创建启动服务,以轻松启动和管理应用程序过程。
注意: Alfresco建议至少使用2个CPU和4GB RAM。如果您的系统没有建议的配置,则可能会收到一条警告,提示您未针对Alfresco Content Services优化配置环境。但是,您仍然可以继续进行安装。
该应用程序的安装应立即开始。安装该应用程序后,将询问您是否要启动Alfresco社区服务器。如果选择“ Y”,则应用程序将立即启动服务器,您将看到以下输出。
Launch Alfresco Community [Y/n]: y
waiting for server to start.... done
server started
/opt/alfresco-community/postgresql/scripts/ctl.sh : postgresql started at port 5432
Using CATALINA_BASE: /opt/alfresco-community/tomcat
Using CATALINA_HOME: /opt/alfresco-community/tomcat
Using CATALINA_TMPDIR: /opt/alfresco-community/tomcat/temp
Using JRE_HOME: /opt/alfresco-community/java
Using CLASSPATH: /opt/alfresco-community/tomcat/bin/bootstrap.jar:/opt/alfresco-community/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /opt/alfresco-community/tomcat/temp/catalina.pid
Tomcat started.
/opt/alfresco-community/tomcat/scripts/ctl.sh : tomcat started
由于安装程序还添加了启动服务,因此您也可以启动该应用程序。
sudo systemctl start alfresco
默认情况下,Alfresco启动Tomcat Web服务器以在port上为应用程序提供服务 8080。打开您喜欢的浏览器并转到 http://192.168.0.1:8080/share,您将看到Alfresco登陆页面。
默认情况下,Alfresco的Tomcat服务器侦听port 8080。在本教程中,我们将使用Nginx作为反向代理,以便可以通过标准HTTP 和 HTTPS 端口访问应用程序 。我们还将Nginx配置为使用由Let's Encrypt生成的SSL。
安装Nginx。
sudo apt -y install nginx
启动Nginx并使它能够在启动时自动启动。
sudo systemctl start nginx
sudo systemctl enable nginx
添加Certbot存储库。
sudo add-apt-repository --yes ppa:certbot/certbot
sudo apt-get update
安装Certbot,这是Let's Encrypt CA的客户端应用程序。
sudo apt -y install certbot
注意: 要从Let's Encrypt CA获得证书,必须为其生成证书的域指向服务器。如果不是,请对域的DNS记录进行必要的更改,并在再次发出证书请求之前,等待DNS传播。Certbot在提供证书之前会检查域权限。
生成SSL证书。
sudo certbot certonly --webroot -w /var/www/html -d share.example.com
生成的证书可能存储在中 /etc/letsencrypt/live/share.example.com/。让我们加密证书的有效期限为90天,因此建议使用Cron作业设置证书的自动续订。
打开cron作业文件。
sudo crontab -e
在文件末尾添加以下行。
30 5 * * * /usr/bin/certbot renew --quiet
上面的cron作业每天凌晨5:30运行。如果证书到期,它将自动更新。
编辑Alfresco的Tomcat服务器配置文件。
sudo nano /opt/alfresco-community/tomcat/conf/server.xml
找到以下几行。
<Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" maxHttpHeaderSize="32768" />
proxyPort="443" scheme="https" 在上面的配置块中添加该行 ,使其看起来类似于以下所示的块。
<Connector port="8080" URIEncoding="UTF-8" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" maxHttpHeaderSize="32768"
proxyPort="443" scheme="https" />
打开Alfresco默认配置文件。
sudo nano /opt/alfresco-community/tomcat/shared/classes/alfresco-global.properties
找到以下几行。
alfresco.context=alfresco
alfresco.host=127.0.0.1
alfresco.port=8080
alfresco.protocol=http
share.context=share
share.host=127.0.0.1
share.port=8080
share.protocol=http
...
system.serverMode=UNKNOWN
根据您的系统更改以上行。它看起来应该如下图所示。
alfresco.context=alfresco
alfresco.host=share.example.com
alfresco.port=443
alfresco.protocol=https
share.context=share
share.host=share.example.com
share.port=443
share.protocol=https
...
system.serverMode=PRODUCTION
为Alfresco创建一个新的服务器块文件。
sudo nano /etc/nginx/sites-available/alfresco
填充文件。
server {
listen 80;
server_name share.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name share.example.com;
ssl_certificate /etc/letsencrypt/live/share.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/share.example.com/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/alfresco.access.log;
location / {
root /opt/alfresco-community/tomcat/webapps/ROOT;
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 $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080;
proxy_redirect default;
}
location /share/ {
root /opt/alfresco-community/tomcat/webapps/share/;
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 $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080/share/;
proxy_redirect http:// https://;
}
location /alfresco/ {
root /opt/alfresco-community/tomcat/webapps/alfresco/;
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 $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_pass http://localhost:8080/alfresco/;
proxy_redirect http:// https://;
}
}
激活配置文件。
sudo ln -s /etc/nginx/sites-available/alfresco /etc/nginx/sites-enabled/alfresco
重新启动Web服务器和Alfresco,以使配置更改生效。
sudo systemctl restart nginx alfresco
现在,Alfresco已在您的服务器上安装和配置。您可以在以下地址访问Alfresco模块。
https://share.example.com/alfresco
要访问Alfresco共享服务,请访问以下地址。
https://share.example.com/share
使用初始管理员帐户 admin 和安装期间选择的密码登录。
恭喜,您的服务器上现已安装Alfresco社区版。
在Arch Linux上使用Makepkg可以避免系统污染,确保仅安装必要的依赖关系。
快速学习如何在Ubuntu 16.04上安装OpenSIPS控制面板,为VoIP提供商提供支持的功能。
学习如何在Fedora 28上安装Akaunting,一款适合小型企业和自由职业者的开源会计软件。
使用其他系统?Mailtrain是一个基于Node.js和MySQL / MariaDB构建的开源自托管新闻通讯应用程序。
了解導致Minecraft延遲的原因和解決方案,包括優化伺服器性能和減少滯後的步驟。
勒索軟件攻擊呈上升趨勢,但人工智能能否幫助應對最新的計算機病毒?AI 是答案嗎?在這裡閱讀知道是 AI 布恩還是禍根
ReactOS,一個開源和免費的操作系統,這裡有最新版本。它能否滿足現代 Windows 用戶的需求並打倒微軟?讓我們更多地了解這種老式但更新的操作系統體驗。
Whatsapp 終於為 Mac 和 Windows 用戶推出了桌面應用程序。現在您可以輕鬆地從 Windows 或 Mac 訪問 Whatsapp。適用於 Windows 8+ 和 Mac OS 10.9+
閱讀本文以了解人工智能如何在小型公司中變得流行,以及它如何增加使它們成長並為競爭對手提供優勢的可能性。
最近,Apple 發布了 macOS Catalina 10.15.4 補充更新以修復問題,但似乎該更新引起了更多問題,導致 mac 機器變磚。閱讀這篇文章以了解更多信息