I hereby claim:
- I am enoot on github.
- I am en00t (https://keybase.io/en00t) on keybase.
- I have a public key ASAqNpALjpUnGa2iyEFgSr6TAia1KvEGDlzASulyh6uPAAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
Let Tomcat is download and installed under /opt/tomcat.
Also, let tomcat be a non-provileged user under which the server will be running.
We assume that we keep server's binaries under /opt/tomcat and we will create a server instance named foo under /var/tomcat/ (carrying its own conf, logs, webapps, work, lib directories).
See also https://dzone.com/articles/running-multiple-tomcat.
Create a template service unit file at /etc/systemd/system/[email protected]:
| #!/bin/bash | |
| # | |
| # description: Apache Tomcat init script | |
| # processname: tomcat | |
| # chkconfig: 234 20 80 | |
| # | |
| # | |
| # Copyright (C) 2014 Miglen Evlogiev | |
| # | |
| # This program is free software: you can redistribute it and/or modify it under |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |