文章目录
- 环境
- 步骤
- 其他指令
- 参考
环境
虚拟机:VMware
Ubuntun:20.04LTS
Tango:9.3.4
步骤
为tango-controls安装:
sudo apt-get install g++ openjdk-8-jdk mariadb-server libmariadb-dev zlib1g-dev libomniorb4-dev libcos4-dev omniidl libzmq3-dev make
开始 mariadb :
sudo service mariadb start
设置mariabdb密码
sudo mariadb -u root
或
sudo mysql -u root -p
下载 source:
wget https://github.com/tango-controls/TangoSourceDistribution/releases/download/9.3.4/tango-9.3.4.tar.gz
在名为tango的子目录中解包:
mkdir tango
cd tango
tar xzvf tango-9.3.4.tar.gz
mariabdb root user设置密码为 ‘mypassword’:
sudo mariadb -u root
ALTER USER 'root'@'localhost' IDENTIFIED BY 'mypassword';
UPDATE mysql.user SET authentication_string = '' WHERE user = 'root';
UPDATE mysql.user SET plugin = '' WHERE user = 'root';
这一步在Ubuntu22.04中会报错:ERROR 1356 (HY000): View ‘mysql.user’ references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them。在Ubuntu20.04中不会。
配置 tango-controls 构建安装在 /usr/local/tango:
cd /home/gw2/tango/tango-9.3.4
./configure –enable-java=yes –enable-mariadb=yes –enable-dbserver=yes –enable-dbcreate=yes –with-mysql-admin=root –with-mysql-admin-passwd='mypassword' –prefix=/usr/local/tango
如果报错:bash: ./configure: 没有那个文件或目录。在/usr/local下sudo mkdir tango.
编译tango-controls,这一步需要挺久:
make
安装tango-controls:
sudo make install
添加以下行以启动脚本 /usr/local/tango/bin/tango:
sudo gedit /usr/local/tango/bin/tango
# add lines near the top:
export MYSQL_USER=root
export MYSQL_PASSWORD=mypassword
开启tango-controls database server:
sudo /usr/local/tango/bin/tango start
在~/.bashrc 设置 TANGO_HOST 变量
export TANGO_HOST=localhost:10000
开启 test device server:
/usr/local/tango/bin/TangoTest test &
Test Jive:
/usr/local/tango/bin/jive &
其他指令
显示数据库
show databases;
参考
https://tango-controls.readthedocs.io/en/latest/installation/tango-on-linux.html
https://www.tango-controls.org/community/forum/c/general/installation/installing-tango-934-on-ubuntu-lts-2004/