Publishing Deliena Credential Cache on Linux

Run the commands in the order listed below to perform Deliena Credential Cache publishing.

  1. Create cred-cache directory

    mkdir credcache

  2. Copy published artifacts into cred-cache directory

    To run the following command, go back to Windows system32 directory.

    scp -r C:\Dev\linux-x64\* ubuntu@10.00.00.100:credcache

    Ubuntu is the user name followed by IP address of the Linux machine. The C:\Dev\linux-x64\*: location of Delinea credential cache code.

  3. Create a new cred-cache service config file to run the application in the background

    sudo nano /etc/systemd/system/credcache.service

  4. Update the data in the configuration file

    1. In the config file, insert the data below and replace the value of WorkingDirectory and ExecStart attributes.

    [Unit] Description=My .NET Core Application After=network.target [Service] WorkingDirectory=/home/ubuntu/credcache ExecStart=/usr/bin/dotnet /home/ubuntu/credcache/DelineaCredentialCache.dll Restart=always # Restart service after 10 seconds if it crashes RestartSec=10 SyslogIdentifier=mydotnetapp User=yourusername Environment=ASPNETCORE_ENVIRONMENT=Production [Install] WantedBy=multi-user.target

  5. Get the dotnet path

    which dotnet

  6. Get the path of your application

    realpath credcache

  7. Reload daemon

    sudo systemctl daemon-reload

  8. Start service

    sudo systemctl start credcache.service

  9. Enable service

    sudo systemctl enable credcache.service

  10. Check status of service

    sudo systemctl status credcache.service

  11. Stop service when required

    sudo systemctl stop credcache.service

  12. Enable site

    sudo a2ensite credcache

  13. Check the error log

    sudo tail -f /var/log/apache2/error.log