Post-Installation Configuration Options › How to Complete the Installation › Set Up Autostart on Data Repository (Optional)
Set Up Autostart on Data Repository (Optional)
You can set up autostart on Data Repository. If autostart is set up and you reboot the computer where Data Repository is installed, Data Repository starts automatically.
Important! This feature may not work properly if Data Repository did not shut down gracefully. If the database did not shut down gracefully, the database might require manual intervention during startup to restore the last good epoch. If the Vertica database does not start automatically after an ungraceful shutdown, use admintools to start it manually.
Data Aggregator stops automatically when Data Repository becomes inaccessible. Restart Data Aggregator manually once Data Repository is online again. To restart Data Aggregator, open a command prompt and type the following command:
/etc/init.d/dadaemon start
Follow these steps:
- To become the Linux user account for the database administrator user, type the following command:
su - dradmin
- To navigate to the /opt/vertica/config/users/Linux_user_account_for_database_administrator_user directory, type the following command:
cd /opt/vertica/config/users/Linux_user_account_for_database_administrator_user
- To copy the installed.dat file to a new file called dbinfo.dat, type the following command:
cp -p installed.dat dbinfo.dat
The dbinfo.dat file is created.
- Be sure that the Linux user account for the database administrator user is set up with a passwordless ssh key:
- To see if a passwordless ssh key is already set up, type the following command:
ssh hostname ls
- hostname
-
Indicates the name of the host where Data Repository is installed.
If the passwordless ssh key is set up, you are not prompted for a password. You do not need to do anything further. However, if you are asked if you want to continue connecting, enter Yes.
- If you are prompted for a password, ignore the prompt and hit Ctrl+C.
- To set up the Linux user account for the database administrator user with a passwordless ssh key, do the following steps:
- To become the Linux user account for the database administrator user, type the following command:
su - dradmin_username
- To generate a public key, type the following command. In a cluster installation, type this command on each host that is participating in the cluster:
ssh-keygen -N "" -t rsa -f ~/.ssh/id_rsa
- Copy the contents of the public key to the authorized_keys2 file on the same computer. In a cluster installation, copy the contents of the public key to the authorized_keys2 file on each host that is participating in the cluster:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys2
- (Cluster installation only) Copy the contents of the public key from each host to each of the other hosts:
- As the database administrator user on the first host, type the following command and copy the content of the file:
vi ~/.ssh/id_rsa.pub
- As the database administrator user on the second host, type the following command:
vi ~/.ssh/authorized_keys2
Paste the contents from the id_rsa.pub file on the first host to the end of the authorized_keys2 file on the second host.
- As the database administrator user on the third host, type the following command:
vi ~/.ssh/authorized_keys2
Paste the contents from the id_rsa.pub file on the first host to the end of the authorized_keys2 file on the third host.
To enable you to ssh from one host to another without being prompted for a password, repeat these steps for all hosts in the cluster.
- To set permissions for the authorized_keys2 file, type the following command. In a cluster environment, type these commands on each host in the cluster:
chmod 644 ~/.ssh/authorized_keys2
- As the root user, type the following commands to restart the ssh daemon. In a cluster environment, type this command on each host in the cluster:
su - root
/etc/init.d/sshd restart
- (Single-node installation only) To confirm that you are not prompted for a password, type the following commands:
su - dradmin
ssh dradmin@hostname ls /tmp
- (Cluster installation only) To confirm that you are not prompted for a password, type the following commands on the first host in the cluster:
su - dradmin
ssh dradmin@host1 ls /tmp
ssh dradmin@host2 ls /tmp
ssh dradmin@host3 ls /tmp
Repeat this step on each host in the cluster.
Important! If you do not set up the passwordless ssh key, you cannot configure autostart on Data Repository.
- Type the following command:
/opt/vertica/bin/adminTools
The Administration Tools dialog opens.
- Select (6) Configuration Menu and select OK.
- Select (4) Set Restart Policy and select OK.
The Select Database dialog opens.
- Select the database name and select OK.
The Select policy dialog opens.
- Select 'always' when doing a single-node Data Repository installation. Select 'ksafe' when doing a cluster installation.
Select OK.
Note: In a single-node installation, ‘always’ means that, Data Repository automatically restarts when the system restarts. In a cluster installation, ‘ksafe’ means that, upon the system restarting, the Data Repository node automatically restarts if the database still has a status of ‘UP’.
The Restart Policy setting is saved.
- Select OK to close the Select policy dialog.
- Return to the (M) Main Menu.
- Select (E) Exit.
- (Optional) Test that Data Repository starts when you reboot the computer where Data Repository is installed:
- Reboot the computer where Data Repository is installed.
Note: Log in as the root user or sudo user to reboot the computer.
- Become the Linux user account for the database administrator user. Type the following command:
su - dradmin
- Type the following command:
/opt/vertica/bin/adminTools
The Administration Tools dialog opens.
- Select (1) View Database Cluster State and select OK.
- The state is "UP." Select OK.
Note: Data Repository can take several minutes to start up after you reboot.
More information:
How to Complete the Installation
Copyright © 2015 CA Technologies.
All rights reserved.
|
|