Deploying TiDB on a Linux Virtual Machine

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 在linux虚拟机部署tidb

| username: 喵父666

What needs to be done in advance to the machines for deploying distributed TiDB on virtual machines (checking for omissions)?

| username: 喵父666 | Original post link

Not sinking, not sinking

| username: 喵父666 | Original post link

Welcome, expert, to answer.

| username: Fly-bird | Original post link

You don’t need to do anything, just pass the check. As long as the CPU and memory are sufficient, it’s fine.

| username: 喵父666 | Original post link

This post is for filling in gaps and correcting omissions.

| username: 像风一样的男子 | Original post link

Most users deploy TiDB on virtual machines, just follow the official manual for installation.

| username: 喵父666 | Original post link

ok :yum:

| username: Kongdom | Original post link

Note this, learned the hard way~ :yum:

Starting from v6.3.0, when deploying TiFlash on a Linux AMD64 hardware platform, the CPU must support the AVX2 instruction set. Ensure that the command cat /proc/cpuinfo | grep avx2 has output. When deploying TiFlash on a Linux ARM64 hardware platform, the CPU must support the ARMv8 architecture. Ensure that the command cat /proc/cpuinfo | grep 'crc32' | grep 'asimd' has output. By using vector extension instruction sets, TiFlash’s vectorized engine can provide better performance.

| username: TiDBer_小阿飞 | Original post link

  1. Virtual machine settings, such as: network card, system, hard disk memory allocation, etc., must meet the minimum installation requirements of TiDB.
  2. Time zone and hostname settings.
  3. System check.
  4. Disable virtual network card, configure hosts.
  5. Turn off firewall and SELinux.
  6. Disable startup programs.
  7. Disable transparent huge pages and SWAP.
  8. Synchronize clocks between virtual machines and set up a clock synchronization server.
  9. Set disk I/O scheduler to noop for storage media.
  10. Set the cpufreq module for CPU frequency adjustment to performance mode.
  11. Modify system parameters: fs.file-max, net.core.somaxconn, net.ipv4.tcp_tw_recycle, net.ipv4.tcp_syncookies, vm.overcommit_memory.
  12. Install numactl tool, manually configure SSH mutual trust and password-free sudo.
  13. Download and install the TIUP tool.
  14. Apply environment variables in .bash_profile.
  15. Install TiUP cluster component.
  16. Update TiUP and TiUP cluster components to the latest version.
  17. Verify the current TiUP cluster version information.
  18. Initialize cluster topology, modify parameters and configuration files for each module.
  19. Check and automatically fix potential risks in the cluster with tiup cluster check ./topology.yaml.
  20. Deploy TiDB cluster with tiup cluster deploy.
  21. View the status of clusters managed by TiUP with tiup cluster list and tiup cluster display.
| username: Kongdom | Original post link

:+1: :+1: :+1:

| username: 像风一样的男子 | Original post link

Write a column on installing clusters, many newcomers really need it.

| username: zhanggame1 | Original post link

Actually, there’s no need to install anything in advance. First, run tiup check to inspect, then apply fixes. Finally, manually handle any issues that can’t be resolved.

| username: TiDBer_小阿飞 | Original post link

I have written it, but it’s not in a virtual environment :smile:

| username: Kongdom | Original post link

Let’s have another virtual machine practice column~ Go go go~

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.