管理员指南 > Codebeamer 维护 > 管理许可证 > 安装 FlexNet 服务器
安装 FlexNet 服务器
本页面提供有关在 Windows 和 Linux 操作系统上安装 FlexNet 服务器的指南。
Windows
要在 Windows 操作系统上安装 FlexNet 服务器,请执行以下步骤:
2. 创建 <new_folder>,然后将下载的文件复制到其中。例如:C:\Program Files\PTC
3. 将下载的存档解压缩到 <new_folder>
4. <new_folder>\PTCEswlm\ptc_e\ptc_e.exe 文件移动到 <new_folder>\PTCEswlm\bin
5. 将接收到的许可证包解压缩到 <new_folder>
6. 编辑 <new_folder> 中的 .lic 文件,在以 SERVER 开头的行中插入许可证服务器的主机名
示例:SERVER WrongHostName 00246735CC83 行需要替换为 SERVER CorrectsHostName 00246735CC83
7. 创建服务 FlexLM server for PTC
a. 以管理员身份运行 <new_folder>\PTCEswlm\bin\lmtools.exe 命令来启动 lmtools
b. 转至 Config Services 选项卡。
c. 创建新服务 FlexLM server for PTC
d. 浏览到 lmgrd.exe 文件的位置:< new_folder >\PTCEswlm\bin\
e. 浏览到 .lic 文件的位置。该文件应位于 <new_folder> 中。
f. 选中 Use ServicesStart Server at Power Up 复选框。
g. 单击 Save Service
h. 转至 Windows Services 配置 > 右键单击 FlexLM server for PTC service > Properties
a. 单击 General 选项卡 > Startup Type 下拉菜单 >  Automatic 选项卡。
b. 单击 Log On 选项卡 >  Local System Account 选项卡。
c. 单击  Apply  >  OK
8. 启动 FlexLM server for PTC 服务。
Linux
要在基于 Redhat 的 Linux 分发版上安装 FlexNet,请执行以下步骤:
1. 设置安装选项。
BASEDIR="/etc/flexnet/"
CFGFILE="/etc/flexnet/flexnet.cfg"
LOGFILE="/etc/flexnet/flexnet.log"
LICFILE="/etc/flexnet/flexnet.lic"
DOMAIN="FLEXNET.CODEBEAMER.COM"
HOSTID="0123456789AB"
2. FlexNet 服务器安装。
# install dependencies
yum -y install redhat-lsb || ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
## Note: If the above fails, you will probably be unable to run lmgrd (No such file or directory error)
# Download and install FlexNet Server
mkdir -p "$BASEDIR"
cd "$BASEDIR"
FLEXNET_DOWNLOAD_URL="[https://download.ptc.com/download2/products/FLEXnet/PTC_E_11.19.1.0_Linux.zip]"
wget $${FLEXNET_DOWNLOAD_URL}
unzip $${FLEXNET_DOWNLOAD_URL##*/}
rm -rf $${FLEXNET_DOWNLOAD_URL##*/}
mv PTCEswlm/* "$BASEDIR"
ln -s "$BASEDIR/ptc_e/ptc_e" "$BASEDIR/bin/ptc_e"
rm -rf PTCEswlm
# set hostname
hostname -b $DOMAIN
3. 将 FlexNet 配置为服务。
# Create FlexNet user
useradd flexnet -c "FlexNet Service User" -s /sbin/nologin -d $BASEDIR
# set permission on files
## Note: You need to ensure you license file is in place
touch "$LOGFILE" "$CFGFILE"
chown flexnet: "$LOGFILE"
chown flexnet: "$LICFILE"
chown flexnet: "$CFGFILE"
chown -R flexnet "$BASEDIR/"
# create config
cat > "$CFGFILE" <<EOF
LOGFILE="$LOGFILE"
LICFILE="$LICFILE"
EOF
# create systemd file
cat > /etc/systemd/system/flexnet.service <<EOF
[Unit]
Description=FlexNet Licence Server
Requires=network.target
After=local_fs.target network.target
[Service]
EnvironmentFile=$CFGFILE
Type=simple
User=flexnet
Group=flexnet
Restart=always
WorkingDirectory=$BASEDIR
ExecStart=$BASEDIR/bin/lmgrd -c \${LICFILE} -l +\${LOGFILE} -z -2 -p -local
ExecStop=$BASEDIR/bin/lmgrd lmdown -c \${LICFILE}
SuccessExitStatus=15
[Install]
WantedBy=multi-user.target
EOF
# enable the service
systemctl daemon-reload
systemctl enable flexnet
systemctl start flexnet
这对您有帮助吗?