Publishing Delinea Credentials Cache on Linux
Run the commands in the order listed below to publish Delinea Credentials Cache on Linux.
-
Create cred-cache directory
mkdir credcache
-
Copy published artifacts into the 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.
C:\Dev\linux-x64\*
is the location of the Delinea Credentials Cache code. -
Create a new cred-cache service configuration file to run the application in the background
sudo nano /etc/systemd/system/credcache.service
-
Update the data in the configuration file
-
In the configuration file, insert the data below and replace the value of WorkingDirectory and ExecStart attributes.
Copy[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
-
-
Get the dotnet path
which dotnet
-
Get the path of your application
realpath credcache
-
Reload daemon
sudo systemctl daemon-reload
-
Start service
sudo systemctl start credcache.service
-
Enable service
sudo systemctl enable credcache.service
-
Check status of service
sudo systemctl status credcache.service
-
Stop service when required
sudo systemctl stop credcache.service
-
Enable site
sudo a2ensite credcache
-
Check the error log
sudo tail -f /var/log/apache2/error.log