This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-- Esta versão da lib somente suporta c++20 ou superior | |
cmake_minimum_required(VERSION 3.0.0) | |
project(nome_do_projeto_cmake VERSION 0.1.0 LANGUAGES C CXX) | |
#-- Adiciona o caminho para o arquivo FindPQXX.cmake | |
list(APPEND CMAKE_MODULE_PATH "caminho para o arquivo FindPQXX.cmake") | |
#-- Seta flags para o compilador | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -lpqxx -lpq -lfmt") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /var/lib/postgresql/13/main | |
# Create a self-signed certificate | |
openssl req -new -nodes -text -out server.csr \ | |
-keyout server.key -subj "/CN=postgresql.otaviomiranda.com.br" | |
openssl x509 -req -in server.csr -text -days 3650 \ | |
-extfile /etc/ssl/openssl.cnf -extensions v3_ca \ | |
-signkey server.key -out server.crt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Executar comandos a seguir para atualizar os pacotes | |
sudo apt update -y | |
sudo apt upgrade -y | |
# Instalar pacotes a seguir | |
sudo apt install dkms make perl gcc build-essential git curl -y | |
# Instalar Python 3.10 (opcional) |