Newcomer Seeking Help with Installation Issues

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

Original topic: 新人请教安装的问题

| username: TiDBer_CQ3lVdeD

I followed the “Deploy a Local Test Cluster” section of the TiDB Quick Start Guide and used the command curl --proto '=https' --tlsv1.2 -sSf | sh to install it directly online on a CentOS 7.6 virtual machine. Later, I found that it was installed by default in the /root directory. I wanted to install it in my large-capacity hard drive path /tidb, so I downloaded and modified “TIUP_HOME=$HOME/.tiup” to “TIUP_HOME=/tidb/.tiup”. Then I ran for installation, and the following information appeared:

total 4
-rwxr-xr-x 1 root root 2096 Sep 23 03:12
[root@192 tidb]# ./
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6971k  100 6971k    0     0  6671k      0  0:00:01  0:00:01 --:--:-- 6677k
Failed to set mirror: open /root/.tiup/bin/root.json: no such file or directory

Error: open /root/.tiup/bin/root.json: no such file or directory
Detected shell: bash
Shell profile:  /root/.bash_profile
/root/.bash_profile has been modified to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /tidb/.tiup/bin/tiup
Have a try:     tiup playground

I did not find the root.json configuration item in the script. I found that it was reported when executing `tiup mirror set`. What is the reason? How to solve it?
| username: wuxiangdong | Original post link

Create a new TiDB account, and then use this TiDB account to execute the curl command.

| username: buptzhoutian | Original post link

Strange, why is this script related to the /root/.tiup directory when it runs for the second time?

When you have time, you can provide more output to see what’s going on. Execute the installation script like this and then share the results.

# This is just to install the tiup command-line tool, you can execute it repeatedly
bash -x
| username: xiaohetao | Original post link

If you decide to start the TiDB cluster with a non-root user, then clean up the tiup-related items under the root directory, and then install and configure tiup under the cluster start user.

| username: TiDBer_CQ3lVdeD | Original post link

I have run sh -x, but I didn’t see anything that could be used to determine the issue.

I can’t think of any reason. A brother in the group said that root.json is an RSA certificate key, and it is possible that the tiup program has set this path.

| username: TiDBer_CQ3lVdeD | Original post link

Thank you, it should not be due to user permissions.

| username: buptzhoutian | Original post link

Hmm, it looks like a BUG.

You can clean up the existing directory and execute it like this, so it won’t trigger the BUG:

export TIUP_HOME=/tidb/.tiup
bash /path/to/
| username: TiDBer_CQ3lVdeD | Original post link

I have tried everything, even using a new virtual machine to start running again, and the issue still persists, indicating that it is not caused by the environment after the first installation. I can’t solve it right now, so I can only use a soft link ln -s /tidb/.tiup /root/.tiup, and then let the default installation run first.

| username: buptzhoutian | Original post link

First, export TIUP_HOME environment variable, is there still an issue? I can’t reproduce it.

| username: TiDBer_CQ3lVdeD | Original post link

Oh, I haven’t tried this yet. I can try it later and reply after testing.

| username: gary | Original post link

Is it possible that the online mirror wasn’t downloaded properly? You can try offline installation.

| username: TiDBer_CQ3lVdeD | Original post link

I have tried several times, and if installed by default, it can be installed smoothly, so it shouldn’t be the reason! However, as I continue to learn, I found that the local test installation steps are only limited to getting the system up and running to try out TiDB’s features, which is quite different from the production environment. In the production environment, you can specify the installation directory and data directory in the topo.yaml configuration file, so this issue does not exist. Thank you!

| username: system | Original post link

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