欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

vtune自动化安装脚本

程序员文章站 2023-11-22 10:18:10
复制代码 代码如下:#!/bin/bash#!/usr/bin/expect -f#!/usr/bin/env bashyum install -y expect wget...

复制代码 代码如下:

#!/bin/bash
#!/usr/bin/expect -f
#!/usr/bin/env bash
yum install -y expect wget
cd /root
wget http://172.16.92.99/share/tar/vtune_amplifier_xe_2013_update15.tar.gz
wget http://172.16.92.99/share/tar/eval_l_vt__vgxb-rdcjpn8x.lic
tar -zxvf vtune_amplifier_xe_2013_update15.tar.gz
expect -c "spawn sh /root/vtune_amplifier_xe_2013_update15/install.sh;
set timeout 5; expect "*enter*"; send \"\r\n\";
expect "*enter*"; send \"\r\n\";
expect "*enter*"; send \"\r\n\";
while {1} {
expect {
"*--more--*" {send \"\r\n\"}
"*accept*" {break}
}
}
expect "*accept*"
send "accept\\r"
expect "*selection*";send "3\\r";
expect "*choice*"; send "2\\r";
send "/root/eval_l_vt__vgxb-rdcjpn8x.lic"
expect "*enter*"; send \"\r\n\";
expect "*selection:*"; send "1\\r";
expect "*enter*"; send \"\r\n\";
set timeout 25;
expect "*enter*"; send \"\r\n\";
expect "*enter*"; send \"\r\n\";
expect eof;"
rm -rf /root/*
source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh