RHEL7: Configure a system to forward all email to a central mail server.

https://www.certdepot.net/rhel7-configure-system-forward-email-central-mail-server/ # yum install -y postfix # systemctl enable postfix # systemctl restart postfix # /etc/postfix/main.cf  # postfix check # postconf -n # systemctl restart postfix # postconf -e ‘relayhost = 192.168.1.1’ # echo “This is a test.” | mail -s “Test” me@example.com # mailq # postsuper -r 822FA3DE4 # postsuper -d 822FA3DE4 # tail…

Custom CloudWatch Tomcat JVM Metrics

http://johnhunsley.blogspot.com.au/2016/03/custom-cloudwatch-tomcat-jvm-metrics.html To set this up you will need to do the following: Have an AWS account Set up a IAM Role to be applied to a running instance which you want to monitor Start EC2 instance hosting Tomcat which has outbound access to the internet Download the AWS CLI package Create a script to extract…

How to deploy on Amazon EC2 with Vagrant

http://www.iheavy.com/2014/01/16/how-to-deploy-on-amazon-ec2-with-vagrant/ Why do I want Vagrant? Vagrant is a really powerful tool for managing virtual machines. If you’re a developer it can make it push-button simple to setup a dev box on your laptop. It manages the images, and uses configuration files to describe specifics of your machines. In the amazon environment, you can deploy…

Generate a CSR with OpenSSL

https://support.rackspace.com/how-to/generate-a-csr-with-openssl/   #rpm -qa | grep -i openssl #yum install openssl openssl-devel #dpkg -l |grep openssl #apt-get install openssl #mkdir ~/domain.com.ssl/ #cd ~/domain.com.ssl/ #openssl genrsa -out ~/domain.com.ssl/domain.com.key 2048 #openssl req -new -sha256 -key ~/domain.com.ssl/domain.com.key -out ~/domain.com.ssl/domain.com.csr #openssl req -noout -text -in ~/domain.com.ssl/domain.com.csr