Modifying a TimesTen Instance to Enable Management by systemd

This example assumes you have created the myinstance_2 TimesTen instance without systemd configured. It walks you through the process for modifying the myinstance_2 instance such that it is configured for systemd. It then performs the necessary steps for systemd to automatically manage the TimesTen daemon.

  1. Run the $TIMESTEN_HOME/bin/ttInstanceModify utility with the -systemd option. TimesTen stops the TimesTen daemon and modifies the instance to configure it for systemd.
    % $TIMESTEN_HOME/bin/ttInstanceModify -systemd
    Configuring TimesTen daemon with systemd.
    Stopping TimesTen daemon.....
    TimesTen Daemon (PID: 29038, port: 6640) stopped.
    The startup script is located here :
            '/scratch/ttuser2/myinstance_2/startup/myinstance_2.service'
    
    Run the 'setuproot' script :
            /scratch/ttuser2/myinstance_2/bin/setuproot -install -systemd
    This will move the TimesTen startup script into its appropriate location.
    
    Please manage the TimesTen daemon with systemd
    
  2. As the root user, run the $TIMESTEN_HOME/bin/setuproot -install -systemd script.
    # $TIMESTEN_HOME/bin/setuproot -install -systemd
    Would you like to install the TimesTen daemon startup scripts into /lib/systemd/system? [ yes ]
    Copying /scratch/ttuser2/myinstance_2/startup/tt_myinstance_2.service to /lib/systemd/system/tt_myinstance_2.service
    
    Successfully installed the following scripts :
    /lib/systemd/system/tt_myinstance_2.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/tt_myinstance_2.service to /lib/systemd/system/tt_myinstance_2.service.
    Created symlink from /etc/systemd/system/tt_myinstance_2.service to /lib/systemd/system/tt_myinstance_2.service.
    
    Use 'systemctl [start|stop] tt_myinstance_2.service' to manage the service
    
  3. As the root user, run the systemd systemctl start command to start the TimesTen service (tt_myinstance_2.service, in this example).
     # systemctl start tt_myinstance_2.service
  4. Run the systemd systemctl status command to verify the TimesTen daemon for the instance is automatically managed by systemd.
    % systemctl status tt_myinstance_2.service
    ● tt_myinstance_2.service - TimesTen Service
       Loaded: loaded (/lib/systemd/system/tt_myinstance_2.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2021-08-18 05:55:00 PDT; 39s ago
      Process: 30976 ExecStart=/scratch/ttuser2/myinstance_2/bin/ttDaemonAdmin -start -force -systemd (code=exited, status=0/SUCCESS)
     Main PID: 30984 (timestend)
       Memory: 53.3M
       CGroup: /system.slice/tt_myinstance_2.service
               ├─30984 /scratch/ttuser2/myinstance_2/install/bin/timestend -init...
               ├─30988 installation_dir/tt22.1.1.25.0/bin/timestensubd -ve...
               ├─30989 installation_dir/tt22.1.1.25.0/bin/timestensubd -ve...
               └─30991 installation_dir/tt22.1.1.25.0/bin/ttcserver -verbo...
  5. Run the TimesTen ttStatus utility to verify the TimesTen daemon for the instance is automatically managed by systemd.
    $TIMESTEN_HOME/bin/ttStatus
    TimesTen status report as of Wed Aug 18 12:59:15 2021
    
    Daemon pid 30984 port 6640 instance myinstance_2
    TimesTen server pid 30991 started on port 6641
    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
    Accessible by group g900
    TimesTen daemon is managed by systemd
    End of report
    
You have successfully modified the TimesTen instance to use systemd. The TimesTen daemon is automatically managed by systemd.