less than 1 minute read

Summary:

  • Created a ec2 instance t3.medium with 20GB EBS volume
  • Created a key pair to connect to the instance
  • Using key pair, connected to the server updated permission using chmod
  • Updated the amazon linux server to fetch the latest sources infos
  • Installed Java
  • Fetched the nexus sonatype application using wget
  • Extracted it
  • Created new user nexus for running the nexus service
  • Change the owner of the folders after extraction using chown
  • Updated nexus.rc files to use nexus user only while starting it
  • Started the nexus service as a process
  • Used admin username and pw generated during extraction
  • Tried to run nexus as a service so that it is robust and faliure resistant
  • Tried to kill the process, but came back up
  • Used commands sudo systemctl list-units
  • sudo systemctl list-unit-files
  • sudo systemctl status| start | stop nexus

Takeaways:

  • Create a separate user to run apps and services
  • Thinks about permissions, ownerships of files and folder
  • Make sure to give minimum permission
  • Run processes as services to make it resilliant
  • Check logs and allow proper permission for read and write