星期四, 9月 21, 2017

Pure-ftpd with openSUSE Leap 42.2 小記

Pure-ftpd with openSUSE Leap 42.2 小記

OS: openSUSE Leap 42.2

安裝相關套件
# zypper  -n  install   pure-ftpd   yast2-ftp-server
正在載入套件庫資料...
正在讀取已安裝的套件...
正在解決套件相依性...

將會安裝下列 4 個新的套件:
 libmysqlclient18 libpq5 pure-ftpd yast2-ftp-server

4 要安裝的新套件.
全部下載大小:1017.5 KiB。已快取:0 B。 完成操作後,將使用額外的 4.6 MiB。
要繼續嗎? [y/n/...? 顯示所有選項] (y): y

# systemctl  status  pure-ftpd
● pure-ftpd.service - Pure-FTPd FTP server
  Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; disabled; vendor preset: disabled)
  Active: inactive (dead)

這次預計使用虛擬使用者的方式, 所以使用 sed 將相關設定開啟

# sed  -i  's/# PureDB  /PureDB/g'   /etc/pure-ftpd/pure-ftpd.conf

CreateHomeDir  這個參數我有啟動, 但是實際上還是沒有自動建立
# sed  -i  's/#CreateHomeDir/CreateHomeDir/g'    /etc/pure-ftpd/pure-ftpd.conf

建立一個群組給之後虛擬使用者使用

# groupadd  virtualgrp

建立一個使用者 virtualuser 來讓之後的虛擬使用者使用
# useradd  -g  virtualgrp  -m  virtualuser

使用 pure-pw  來建立虛擬使用者 sakana

# pure-pw   useradd  sakana   -u   virtualuser  -d  /home/virtualuser/sakana  -m
Password:
Enter it again:
  • -u 使用者 UID
  • -d 使用者家目錄
  • -m 更新 db, 好處是不用再去下 pure-pw  mkdb


非互動的方式建立 虛擬使用者sakana, 方便日後使用 ansible 或是其他方式

#  ( echo passwd; echo passwd)  |  pure-pw   useradd  sakana   -u   virtualuser  -d  /home/virtualuser/sakana  -m
  • passwd 為要設定給 sakana 的密碼, 請自行調整


觀察相關資訊
# ls   /etc/pure-ftpd/
pure-ftpd.conf  pureftpd.passwd  pureftpd.pdb vhosts

建立 DB
# pure-pw  mkdb

# ls   /etc/pure-ftpd/
pure-ftpd.conf  pureftpd.passwd  pureftpd.pdb  vhosts

因為 CreateHomeDir 這個參數沒有生效, 所以手動建立使用者家目錄

# mkdir  /home/virtualuser/sakana

修改相關權限( 對應到之前建立的使用者與群組 )
# chown  virtualuser:virtualgrp   /home/virtualuser/sakana/

更改 pure-ftpd 的設定, 取消只讓匿名使用者登入的設定, 使用驗證機制
# sed  -i  's/AnonymousOnly/#AnonymousOnly/g'  /etc/pure-ftpd/pure-ftpd.conf


啟動 pure-ftpd 服務

# systemctl  start  pure-ftpd


觀察相關資訊

# systemctl  status  pure-ftpd
● pure-ftpd.service - Pure-FTPd FTP server
  Loaded: loaded (/usr/lib/systemd/system/pure-ftpd.service; disabled; vendor preset: disabled)
  Active: active (running) since 二 2017-09-19 16:34:56 CST; 14s ago
 Process: 4695 ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf --daemonize (code=exited, status=0/SUCCESS)
Main PID: 4698 (pure-ftpd)
   Tasks: 1 (limit: 512)
  CGroup: /system.slice/pure-ftpd.service
          └─4698 pure-ftpd (SERVER)


設定開啟啟動 pure-ftpd
# systemctl  enable  pure-ftpd
Created symlink from /etc/systemd/system/multi-user.target.wants/pure-ftpd.service to /usr/lib/systemd/system/pure-ftpd.service.

觀察相關資訊

# systemctl  is-enabled  pure-ftpd
enabled


列出目前的使用者

# pure-pw  list
sakana              /home/virtualuser/sakana/./

觀察相關使用者資訊

# pure-pw  show  sakana

相關指令
# pure-pw  userdel  使用者帳號


Reference




星期二, 8月 15, 2017

VMware Horizon ICM Day 2

Day 2

9:30 ~ 11:00
Lesson 5: Managing Users and Groups

Global Policies
  • MMR
  • USB 重導向
  • PCoIP Hardware 加速

Overriding Policies at the User Level

Group Policy Administrative Templates


Module 5: Horizon Client Options

SSO Timeout Configuration

Horizon Client SSL Connectivity

Common Login Issues

URL Content Redirection
  • Client 端只限定  Windows 平台與 IE 瀏覽器

Creating a White List

VMware Horizon Client Configuration ( vdm_client.adm )

Client System Information Sent to the Desktop

Lab Time

== Class break ==

11:30 ~ 12:30

Lesson 2: Virtual Printing with Horizon Client

Virtual printing
  • 所見即所得
  • Location Based

Lab 5: Configuring and Using Virtual Printing

== Class break ==

13:30 ~ 3:30

Module 6: Creating Automated Desktop Pools

Automatic Pool
  • Full-clone ( Template )
  • Linked-clone (Composer)
  • Instant clone
    • 必須是 Automatic Desktop Pool
    • 必須是 Floating-Assignment

Provisioning Setting
  • 手動命名
  • 自動產生

Floating-Assignment Pool Settings

Lab 6: ( Optional ) Creating and Using an Automated Pool


== Class break ==

3:30 ~ 5:00

Module 7: Configuring and Managing Linked-Clone Desktop Pools

View Composer

Key Concepts
  • Parent Virtual Machine
  • Snapshot
  • Replica
    • Base on 快照產生的 VM, Read only, 用來產生 Linked Clone
    • Linked Clone
      • 磁碟類型有 3 種
        • OS Disk
          • 針對 OS 的變動都會寫入到這邊
        • Persistent Disk
          • Optional disk for each user profile
          • 存放使用者的檔案
        • disposable disk
          • Disposable data: Paging file and temp-file folder
          • 存放 page file, 不要讓 OS disk 肥大

Tiered storage for three disk is supported
  • 可以把不同的磁碟放在不同的 datastore

Storage Overcommitment Levels
  • None
    • 不可以 over commit
  • Conservative
    • 4 倍實體空間
  • Moderate
    • 7 倍實體空間
  • Aggressive
    • 15 倍實體空間
  • Unbounded
    • 不限制

Files for a Linked Clone
  • sdd 資料夾: 用來產生初始化的 disposable disk, 因為如果關機 disposable disk 就會被刪除, 開機之後再從 sdd 資料夾複製出來

View Composer Limitations
  • Linked-clone virtual machines must not be managed in vSphere Web Client
    • The vCenter Server system has no knowledge of linked clones
    • 使用 Composer 來管理

Lesson 2: Installing Composer

Lab time:

星期一, 8月 14, 2017

VMware Horizon ICM Day 1

9:30 ~ 11:15

Day 1

Module 1 課程介紹

架構

Client
  • Horizon Client

Horizon Connection Server

Desktop Pool
  • Horizon Agent
  • Desktop 產生方式
    • Manual 5 - 10 mins
    • Full clone ( Template )
    • Linked clone ( 2 - 3 mins )
    • Instant clone ( 30 secs )

文件

Module 2 Introduction to VMware Horizon

VMware Horizon Architecture Layers
  • User
  • Client Access Devices
  • Access Infrastructure
  • Profile / Session / Application Provisioning
  • Virtual Desktop
  • VMware Infrastructure

View Connection Server
  • Desktop connection broker
  • Support TrueSSO, RSA SecurID, RADIUS and smart card authentication
  • Use VMware vCenter to provision virtual machines as needed
  • Support multiple Windows OS for VMware Horizon desktop
  • Support multiple Linux OS for VMware Horizon desktop ( from 6 )

Horizon Client System
  • VMware Horizon desktop access
    • HTML 5 client
    • Horizon Client for multiple os and devices
    • VMware Horizon API: Embedded in certain thin-client devices
  • SSO to remote desktop session

Instant Clone
  • 必須要 ESXi 配合
  • 更快速的部署方式
  • A desktop is destroyed every time a user logs out. A new, refreshed instant clone is created the next time the user logs in. ( 使用者登出就會清除 VM )

View Composer
  • Can be install on a standalone system( 5.1 版以後 ) or on the vCenter system.
  • Features
    • Uses linked-clone technology
    • Image separation
    • QuickPrep or Sysprep for user personalization
    • Supports vCenter Server
    • VMware vCenter Server Appliance

App Volumes Architecture

Managed Application Containers
  • 安裝 App Volumes Agent
    • AppStack
      • 唯讀的應用程式
    • Writable Volume

ThinApp and Virtual Printing
  • ThinApp
    • 綠色程式, 單一執行檔
  • Virtual Printing
    • 讓使用者可以安裝印表機( 一般使用者沒有權限安裝印表機 )

Extensibility to Third-Party Management Tools
  • Windows powershell

Required Active Directory Components
  • Domain membership is required for
    • All virtual machines
    • View Connection Server

Required vSphere Components
  • VMware ESXi
  • vCenter Server
  • 不同功能需要不同版本以上支援

== Class break ==

11:30  ~ 12:30

Lesson 2: Defining the Use Case

Use-Case Information
  • Current and projected workload details
  • Access scenario
  • Key applications
  • User activity
  • Category of user

透過 Use-case 來規劃相關的環境

Module 3: View Connection Server

View Connection Server Prerequisites
  • A supported version of vSphere
  • At least one ESXi host
  • At least one vCenter Server instance
  • Host systems that are running View Connection Server must be members in AD

Preinstallation Checklist

初始化 View Connection Server
  • https://FQDN/admin

== Class break ==

13:30 ~  14:00
Lab Time

14:00 ~ 15:30

Monitoring PCoIP Session Statisitics

Windows Management Instrumentation
  • 透過 WMI 來監控 PCoIP session statistics

Module 4 VMware Horizon Pools and Desktops

Desktop Pool type
  • Manual Desktop Pool
  • Automatic Desktop Pool
  • RDS Desktop Pool

Remote Enabled Users

Firewall Port
  • TCP / UDP 4172 for PCoIP
  • TCP 3389 for RDP
  • TCP 32111 for UsB redirection
  • TCP 9427 for MMR and client drive redirection
  • 安裝時會自動設定

Windows Power options
  • 建議停用, 使用最高效能

調整 Windows
  • 分頁檔設定手動調整
  • 停用還原點
  • 電源選項調整為全效
  • 使用 VMware OS Optimization Tool

VMware OS Optimization Tool

Disabling the Themes Service

vCenter Server Resource Pools

Remote Display Protocol
  • PCoIP Remote Display Protocol
    • 使用 Progressive Build ( 漸進式成像 )
  • Blast Extreme
    • 基於 H.264
  • RDP

PCoIP Administrative Template

Configuring Image Cache Size on the Client System
  • Default enable

Blast Extreme Remote Display Protocol
  • 基於 H.264

Blast Extreme Networking
  • 使用 TCP / UDP, 如果 UDP 無法使用會切換 TCP

Remote Desktop Protocol


== Class break ==

15:45 ~  16:00

Lesson 3: Horizon Agent

Configuring the Desktop for HTML Access
  • 以下 3 各部分都要設定
    • Connection Server
    • 桌面池
    • 桌面

Windows Media Multimedia Redirection ( MMR )
  • 針對 Windows 7 以後的版本支援

Horizon Agent on Desktop with Multiple NICs
  • 如果 VM 有多網卡, 要指定哪一張網卡跟 Connection Server 連線, 要修改 Register key

16:00 ~ 16:30

Lab time : Lab 2

16:30 ~ 17:15

Lesson 4: Configuring Desktop Pool

Desktop Pool type
  • Manual Desktop Pool
  • Automatic Desktop Pool
  • RDS Desktop Pool

User Assignment
  • Dedicated Assignment
  • Floating Assign

Configuring 3D Graphic-Intensive Applications
  • Hardware-base
    • Virtual Dedicated Graphics Acceleration ( vDGA ): vSphere 5.5 or later
    • NVIDIA GRID vGPU ( virtual graphics processing unit ): vSphere 6.0 or later
  • Software-base
    • ESXi host uses software 3D graphics rendering
    • vSphere 5.0 or later
  • Automatic

Adobe Flash Bandwidth Reduction
Adobe Flash Throttling
  • Throttling mode does not affect audio
  • Throttling is disabled in full-screen mode

Reclaiming Virtual Machine Disk Space
  • In vSphere 5.1 and later, you can enable the disk space reclamation feature for VMware Horizon
    • 2 components
      • Space-efficient disk format
        • 達到要求的空間量就回收
      • Space reclamation operations
        • vShpere 5.1 版以後就可以

Enable View Storage Accelerator

Native NFS snapshots
  • The View Composer Array Integration (VCAI) feature uses native NFS snapshots

Entitling Users and Groups
  • 桌面池建立好之後, 要經由授權才能被使用
    • 新增授權可以針對 Domain 內的群組或是使用者來進行授權

Restricted Entitlements ( 限定存取 )
  • 限制指定的 Connection Server 只能看到特定的 Pool ( 使用 Tag 識別 )
  • Normally, all pools are accessible through any connection server
    • Entitlements are assigned to pools
  • Using restricted entitlements, you associate one or more pools with a specific connection server.
    • 如果有多標籤( Tag )用逗號 ( , ) 分隔

Tagging a Pool

Tag-Matching Rules


Connection Server
Pool
Access Permitted?
No tags
No tags
Yes
No tags
One or more tags
No
One or more tags
No tags
Yes
One or more tags
One or more tags
Only when tags match

17:15 ~ 17:30

Lab time