要支持 HTML Access,必须在基于 Linux 的桌面上安装 Apache Tomcat、nginx 软件包和 HTML Access warball。按照本文中所述的适用于 Linux 分发包的过程进行操作。
设置适用于 HTML Access 的 Ubuntu 桌面
- 安装 Apache Tomcat 软件。
sudo apt-get install tomcat9
- 安装 nginx 软件包(如果尚未在 Ubuntu 系统上安装)。
sudo apt-get install nginx
- 编辑 /etc/nginx/conf.d/vmwvadc.conf 配置文件,使其包含以下行。
server { listen 443 ssl; listen [::]:443 ssl; ###Enable https ssl_certificate /etc/vmware/ssl/rui.crt; ssl_certificate_key /etc/vmware/ssl/rui.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_ciphers !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES; access_log /var/log/nginx/nginx.vadc.access.log; error_log /var/log/nginx/nginx.vadc.error.log; ###Add security settings proxy_cookie_path / "/; SameSite=Lax; HTTPOnly; Secure"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-XSS-Protection "1; mode=block"; ###Enable user certificate(smartcard) authentication #ssl_verify_client optional; #ssl_client_certificate /etc/vmware/ssl/trustCerts.pem; location /broker { ###Forward user certificate #proxy_hide_header SSL-CLIENT-VERIFY; #proxy_hide_header X-SSL-CERT; #proxy_set_header SSL-CLIENT-VERIFY $ssl_client_verify; #proxy_set_header X-SSL-CERT $ssl_client_cert; proxy_pass https://localhost:8443; proxy_ssl_certificate /etc/vmware/ssl/rui.crt; proxy_ssl_certificate_key /etc/vmware/ssl/rui.key; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ###Enable Web Client location /portal/webclient { proxy_pass http://localhost:8080/portal/webclient; proxy_redirect http://$host:$server_port/ https://$host:$server_port/; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Content-Security-Policy "default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';font-src 'self' data:;img-src 'self' data: blob:;media-src 'self' blob:;connect-src 'self' wss:;frame-src 'self' blob:;child-src 'self' blob:;object-src 'self' blob:;frame-ancestors 'self'"; } location =/ { rewrite / /portal/webclient; } }
- 从 VMware 下载页面(网址是 https://my.vmware.com/web/vmware/downloads)下载 Horizon HTML Access portal.war zip 文件。
导航到您的 VMware Horizon 版本的下载页面。文件名为 VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip,其中 YYMM 是市场营销版本号,y.y.y 是内部的版本号,xxxxxx 是内部版本号。
- 部署 HTML Access warball。
#To get portal.war unzip VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip cp portal.war /var/lib/tomcat9/webapps chmod 755 /var/lib/tomcat9/webapps/portal.war
- 重新启动计算机以使更改生效。
为 HTML Access 设置 RHEL/CentOS 7.x 桌面
- 安装和配置 Tomcat 软件。
sudo yum install tomcat #Configure SELinux for Tomcat sudo /usr/lib/vmware/viewagent/vadc/tomcat_selinux.sh
- 安装 nginx 软件包(如果尚未在 RHEL/CentOS 7.x 系统上安装)。
yum install epel-release yum install nginx
- 编辑 /etc/nginx/conf.d/vmwvadc.conf 配置文件,使其包含以下行。
server { listen 443 ssl; listen [::]:443 ssl; ###Enable https ssl_certificate /etc/vmware/ssl/rui.crt; ssl_certificate_key /etc/vmware/ssl/rui.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_ciphers !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES; access_log /var/log/nginx/nginx.vadc.access.log; error_log /var/log/nginx/nginx.vadc.error.log; ###Add security settings proxy_cookie_path / "/; SameSite=Lax; HTTPOnly; Secure"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-XSS-Protection "1; mode=block"; ###Enable user certificate(smartcard) authentication #ssl_verify_client optional; #ssl_client_certificate /etc/vmware/ssl/trustCerts.pem; location /broker { ###Forward user certificate #proxy_hide_header SSL-CLIENT-VERIFY; #proxy_hide_header X-SSL-CERT; #proxy_set_header SSL-CLIENT-VERIFY $ssl_client_verify; #proxy_set_header X-SSL-CERT $ssl_client_cert; proxy_pass https://localhost:8443; proxy_ssl_certificate /etc/vmware/ssl/rui.crt; proxy_ssl_certificate_key /etc/vmware/ssl/rui.key; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ###Enable Web Client location /portal/webclient { proxy_pass http://localhost:8080/portal/webclient; proxy_redirect http://$host:$server_port/ https://$host:$server_port/; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Content-Security-Policy "default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';font-src 'self' data:;img-src 'self' data: blob:;media-src 'self' blob:;connect-src 'self' wss:;frame-src 'self' blob:;child-src 'self' blob:;object-src 'self' blob:;frame-ancestors 'self'"; } location =/ { rewrite / /portal/webclient; } }
- 从 VMware 下载页面(网址是 https://my.vmware.com/web/vmware/downloads)下载 Horizon HTML Access portal.war zip 文件。
文件名为 VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip,其中 YYMM 是市场营销版本号,y.y.y 是内部的版本号,xxxxxx 是内部版本号。
- 部署 HTML Access warball。
#To get portal.war unzip VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip sudo cp portal.war /var/lib/tomcat/webapps/ sudo chown tomcat: /var/lib/tomcat/webapps/portal.war sudo chmod -R 750 /var/lib/tomcat/webapps/portal.war
- 重新启动计算机以使更改生效。
为 HTML Access 设置 RHEL/CentOS 8.x 桌面
- 从 https://tomcat.apache.org/ 下载 Tomcat 9 的最新版本。
- 安装 Tomcat 软件。
例如:
sudo useradd -m -U -d /opt/tomcat tomcat sudo chmod 755 /opt/tomcat wget https://downloads.apache.org/tomcat/tomcat-9/v9.0.43/bin/apache-tomcat-9.0.43.tar.gz sudo tar -xf apache-tomcat-9.0.43.tar.gz -C /opt/tomcat/ --strip-components 1 sudo chown -R tomcat: /opt/tomcat sudo chmod +x /opt/tomcat/bin/*.sh
- 要将 Tomcat 配置为作为服务运行,请编辑 /etc/systemd/system/tomcat.service 文件,使其包含以下内容。
[Unit] Description=Tomcat 9 servlet container After=network.target [Service] Type=forking User=tomcat Group=tomcat Environment="CATALINA_BASE=/opt/tomcat" Environment="CATALINA_HOME=/opt/tomcat" Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid" Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC" ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/opt/tomcat/bin/shutdown.sh [Install] WantedBy=multi-user.target
- 为 Tomcat 配置 SELinux 模块。
sudo /usr/lib/vmware/viewagent/vadc/tomcat_selinux.sh sudo systemctl restart tomcat
- 安装 nginx 软件包(如果尚未在 RHEL/CentOS 8.x 系统上安装)。
yum install epel-release yum install nginx
- 编辑 /etc/nginx/conf.d/vmwvadc.conf 配置文件,使其包含以下行。
server { listen 443 ssl; listen [::]:443 ssl; ###Enable https ssl_certificate /etc/vmware/ssl/rui.crt; ssl_certificate_key /etc/vmware/ssl/rui.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_ciphers !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES; access_log /var/log/nginx/nginx.vadc.access.log; error_log /var/log/nginx/nginx.vadc.error.log; ###Add security settings proxy_cookie_path / "/; SameSite=Lax; HTTPOnly; Secure"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-XSS-Protection "1; mode=block"; ###Enable user certificate(smartcard) authentication #ssl_verify_client optional; #ssl_client_certificate /etc/vmware/ssl/trustCerts.pem; location /broker { ###Forward user certificate #proxy_hide_header SSL-CLIENT-VERIFY; #proxy_hide_header X-SSL-CERT; #proxy_set_header SSL-CLIENT-VERIFY $ssl_client_verify; #proxy_set_header X-SSL-CERT $ssl_client_cert; proxy_pass https://localhost:8443; proxy_ssl_certificate /etc/vmware/ssl/rui.crt; proxy_ssl_certificate_key /etc/vmware/ssl/rui.key; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ###Enable Web Client location /portal/webclient { proxy_pass http://localhost:8080/portal/webclient; proxy_redirect http://$host:$server_port/ https://$host:$server_port/; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Content-Security-Policy "default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';font-src 'self' data:;img-src 'self' data: blob:;media-src 'self' blob:;connect-src 'self' wss:;frame-src 'self' blob:;child-src 'self' blob:;object-src 'self' blob:;frame-ancestors 'self'"; } location =/ { rewrite / /portal/webclient; } }
- 从 VMware 下载页面(网址是 https://my.vmware.com/web/vmware/downloads)下载 Horizon HTML Access portal.war zip 文件。
文件名为 VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip,其中 YYMM 是市场营销版本号,y.y.y 是内部的版本号,xxxxxx 是内部版本号。
- 部署 HTML Access warball。
#To get portal.war unzip VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip sudo cp portal.war /opt/tomcat/webapps/ sudo chown tomcat: /opt/tomcat/webapps/portal.war sudo chmod -R 750 /opt/tomcat/webapps/portal.war sudo service tomcat restart sudo service nginx restart
- 重新启动计算机以使更改生效。
设置适用于 HTML Access 的 SUSE 桌面
- 安装和配置 Tomcat 软件。
以下示例显示了在 SUSE 15 SP2 计算机上安装 Tomcat 的命令序列。在第一个命令行中,将示例地址替换为您的 SUSE 版本的 Java 下载 URL。
sudo zypper addrepo https://download.opensuse.org/repositories/Java:packages/SLE_15_SP2/Java:packages.repo sudo zypper refresh sudo zypper install tomcat #Link tomcat.service to /usr/libexec/tomcat/server cd /usr/ sudo ln -s lib libexec
- 安装 nginx 软件包(如果尚未在 SUSE 系统上安装)。
注: 在第一个命令行中,按如下所示替换 <download URL>:
- 对于 SLED/SLES 15.x,请替换为
'http://nginx.org/packages/sles/15'
。 - 对于 SLED/SLES 12.x,请替换为
'http://nginx.org/packages/sles/12'
。
sudo zypper addrepo -G -t yum -c '<download URL>' nginx wget http://nginx.org/keys/nginx_signing.key sudo rpm --import nginx_signing.key sudo zypper install nginx
- 对于 SLED/SLES 15.x,请替换为
- 编辑 /etc/nginx/conf.d/vmwvadc.conf 配置文件,使其包含以下行。
server { listen 443 ssl; listen [::]:443 ssl; ###Enable https ssl_certificate /etc/vmware/ssl/rui.crt; ssl_certificate_key /etc/vmware/ssl/rui.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_ciphers !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES; access_log /var/log/nginx/nginx.vadc.access.log; error_log /var/log/nginx/nginx.vadc.error.log; ###Add security settings proxy_cookie_path / "/; SameSite=Lax; HTTPOnly; Secure"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-XSS-Protection "1; mode=block"; ###Enable user certificate(smartcard) authentication #ssl_verify_client optional; #ssl_client_certificate /etc/vmware/ssl/trustCerts.pem; location /broker { ###Forward user certificate #proxy_hide_header SSL-CLIENT-VERIFY; #proxy_hide_header X-SSL-CERT; #proxy_set_header SSL-CLIENT-VERIFY $ssl_client_verify; #proxy_set_header X-SSL-CERT $ssl_client_cert; proxy_pass https://localhost:8443; proxy_ssl_certificate /etc/vmware/ssl/rui.crt; proxy_ssl_certificate_key /etc/vmware/ssl/rui.key; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ###Enable Web Client location /portal/webclient { proxy_pass http://localhost:8080/portal/webclient; proxy_redirect http://$host:$server_port/ https://$host:$server_port/; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; add_header Content-Security-Policy "default-src 'self';script-src 'self' 'unsafe-inline' 'unsafe-eval' data:;style-src 'self' 'unsafe-inline';font-src 'self' data:;img-src 'self' data: blob:;media-src 'self' blob:;connect-src 'self' wss:;frame-src 'self' blob:;child-src 'self' blob:;object-src 'self' blob:;frame-ancestors 'self'"; } location =/ { rewrite / /portal/webclient; } }
- 从 VMware 下载页面(网址是 https://my.vmware.com/web/vmware/downloads)下载 Horizon HTML Access portal.war zip 文件。
文件名为 VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip,其中 YYMM 是市场营销版本号,y.y.y 是内部的版本号,xxxxxx 是内部版本号。
- 部署 HTML Access warball。
#To get portal.war unzip VMware-Horizon-View-HTML-Access-YYMM-y.y.y-xxxxxx.zip cp portal.war /usr/share/tomcat/webapps/
- 重新启动计算机以使更改生效。