Using Centos 8 notes
Download and install ‘BitVise Windows SSH Client’
- New SFTP window for drag and drop upload / download / Erase / Rename
- New terminal console for cmd access.
Note: Linux is CASE SENSITIVE, file.txt and File.txt are can be two separate files.
General
cd- To navigate folder structure eg.cd /nas/nopCommerce-testls- To list files / folders in directoryls -la- To list files / folders with information of who owns the files and byte size and timestamppwd- To display current pathexit- Ends terminal session
Ownership
sudo chown www-data:www-data fileName- Change ownership of files infileNameto belong towww-dataNOTE: When files are uploaded using the drag and drop (scp) files are written using your account. For Kestrel to be able to run / access then, the ownership needs to be changed to the account which kestrel runs under
www-data
Start / Stop / Status of running daemon process
sudo systemctl start _servicenamehere_.service- This command starts the daemon service called_servicenamehere_.serviceStarts the kestrel instance daemon processsudo systemctl stop _servicenamehere_.service- This command stops the daemon service called_servicenamehere_.servicesudo journalctl -fu _servicenamehere_- Tails the STDOUT / STDERR from the service called_servicenamehere_CTRL-C to end console output.
Miscellaneous
du -cha --max-depth=1 / | grep -E "M|G"- To find out where disk space is being used from root directory folderdu -cha --max-depth=1 /var/nginx | grep -E "M|G"- To find out where disk space is being used from /var/nginx directory folder
Periodic maintenance
sudo yum updateanswer y when promptedsudo yum upgradeanswer y when prompted
Important directories
/etc/systemd/system - Contains the service daemon files which run the applications and restart the apps on crash