TL;DR
sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 main
TL;DR
sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 main
#!/bin/bash | |
cd /home/student | |
# download tilix from official repo | |
wget https://github.com/gnunn1/tilix/releases/download/1.6.4/tilix.zip | |
sudo unzip tilix.zip -d / | |
cd / |
# change the provided default configuration for the ejb-multi-server quickstart | |
# stop the preconfigured server for the domain | |
batch | |
# first stop the default servers, block until the server is down | |
/host=master/server-config=server-one:stop(blocking=true) | |
/host=master/server-config=server-two:stop(blocking=true) | |
# remove the default server configuration and server-groups |
Gerenciando o certificado com o Java keytool: | |
Para gerar um certificado válido por 180 dias, usando algoritmo RSA:: | |
keytool -genkey -keyalg RSA -alias livraria -keystore caelum_keystore.jks -storepass caelum -validity 180 | |
Obs: Para usar com Tomcat usa a mesma senha para o keystore e para o certificado! | |
Para listar todo o conteudo do keystore: |
What is in a keystore | |
======================= | |
keytool -list -v -keystore keystore-file.jks | less | |
======================= | |
show certificates website | |
======================= | |
openssl s_client -host internet.onprvp.fgov.be -port 443 -showcerts | |
======================= |
#!/bin/bash | |
export PW=`cat password` | |
# Create a self signed key pair root CA certificate. | |
keytool -genkeypair -v \ | |
-alias exampleca \ | |
-dname "CN=exampleCA, OU=Example Org, O=Example Company, L=San Francisco, ST=California, C=US" \ | |
-keystore exampleca.jks \ | |
-keypass:env PW \ |
#!/bin/bash | |
export PW='12p@R3dH4t123!' | |
# ------------------------------------------------------------------------------------- | |
# JBoss (Wildfly) vault keystore creation for use with encrypted passwords | |
# ------------------------------------------------------------------------------------- | |
# docs: https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html | |
# https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.3/html/security_guide/create_a_java_keystore_to_store_sensitive_strings | |
# http://www.ensor.cc/2014/02/aes-256-encryption-with-java-and-jceks.html |
#!/bin/bash | |
export PW='98p@R3dH4t777' | |
# ------------------------------------------------------------------------------------- | |
# JBoss (Wildfly) RSA self-signed certificate for using with secure connections | |
# ------------------------------------------------------------------------------------- | |
# docs: https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html | |
# https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6/html/administration_and_configuration_guide/generate_a_ssl_encryption_key_and_certificate | |
# https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/6.4/html-single/how_to_configure_server_security/ |
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" | |
version="1.0"> | |
<!-- derby --> |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence | |
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> | |
<persistence-unit name="MyAppUnit" transaction-type="JTA"> | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<jta-data-source>java:/myAppDS</jta-data-source> | |
<!-- Package: uk.co.example.domain --> |