| VMware CA
Certainly! Below is a simple example of SQL queries for MariaDB:
-
Creating a Database and Table:
CREATE DATABASE mydb; USE mydb; CREATE TABLE mytable ( id INT PRIMARY KEY, name VARCHAR(20) ); -
Inserting Data:
INSERT INTO mytable VALUES (1, 'Will'); INSERT INTO mytable VALUES (2, 'Marry'); INSERT INTO mytable VALUES (3, 'Dean'); -
Selecting Data:
SELECT id, name FROM mytable WHERE id = 1; -
Updating Data:
UPDATE mytable SET name = 'Willy' WHERE id = 1; -
Deleting Data:
DELETE FROM mytable WHERE id = 1; -
Dropping the Database:
DROP DATABASE mydb; -
Counting Records:
SELECT COUNT(1) FROM mytable;
Remember to adapt these queries to your specific use case. If you need more advanced queries or have additional requirements, feel free to ask! 😊
Source: MariaDB Knowledge Base ¹..
Origen: Conversación con Bing, 9/2/2024
(1) Basic SQL Queries & SQL Cheat Sheet | MariaDB Knowledge Base. https://mariadb.com/kb/en/basic-sql-statements/.
(2) 20 Basic SQL Query Examples for Beginners: A Complete Overview. https://learnsql.com/blog/basic-sql-query-examples/.
(3) How To Perform Basic Queries in MySQL and MariaDB on a ... - DigitalOcean. https://www.digitalocean.com/community/tutorials/how-to-perform-basic-queries-in-mysql-and-mariadb-on-a-cloud-server.
(4) undefined. http://hashmysql.org/wiki/Basic_SQL_Statements.
(5) MariaDB - Consultas SQL básicas: una hoja de referencia rápida de SQL. https://runebook.dev/es/docs/mariadb/basic-sql-statements/index.
(6) Comandos SQL Básicos - MariaDB Knowledge Base. https://mariadb.com/kb/es/basic-sql-statements/.
(7) es.wikipedia.org. https://es.wikipedia.org/wiki/MariaDB.
Con un ejemplo vamos a configurar Filebrowser y Caddy en el mismo servidor para dar acceso vía web a la vista y edición del fichero Caddyfile y a la consola del servidor. De este modo podremos modificar desde web el fichero de configuración de Caddy y aplicar la nueva configuración vía systemctl desde la consola de Filebrowser
1.- Instalamos Filebrowser, damos por hecho que Caddy ya está instalado.
>curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
2.- Iniciamos Filebrowser apuntando a la carpeta de entrada que queremos hacer visible vía web, en nuestro caso la carpeta donde se encuentra el fichero de configuración de Caddy
>filebrowser -r /etc/caddy
Con este comando Filebrowser levanta el servidor web en 127.0.0.1:8080 y muestra el contenido de la carpeta /etc/caddy
3.- Editamos el fichero, en mi caso, /etc/caddy/Caddyfile para configurar la redirección del proxy para una determinada ip/cname y puerto hacia la dirección donde está escuchando Filebrowser, localhost:8080
(basic-auth) {
basicauth /* {
bob $2a$14$0Lh5yt4z7JzdafFIixLO8ehRN7hRmkJNPm1Jwy5TIuv6JcszRfjeG
}
}
caddy.mydns.dev {
import basic-auth
reverse_proxy
localhost:8080
}
4.- Hemos configurado además del usuario y contraseña propio de Filebrowser (admin admin por defecto) una validación básica previa con usuario bob en este caso.
5.- Ya podremos navegar por caddy.mydns.dev y editar el fichero Caddyfile. Además, para poder aplicar los cambios que hagamos en el mismo desde la misma web, configuraremos los comandos necesarios (systemctl en este caso para hacer restar de caddy.service) desde los settings del filebrowser, para el usuario admin.
Settings >> User Management >> admin >> Commands >> systemctl
6.- Y por último configuramos Filebrowser como servicio que pueda arrancar con systemctl
Primero creamos el fichero de servicio:
nano /etc/systemd/system/caddy_filebrowser.service
con el siguiente contenido:
[Unit]
Description=Run Caddy Filebrowser at startup
[Service]
# Replace with your actual username
User=username
# Substitute the paths to your storage folder and Filebrowser database file
# Make sure to use full paths instead of ~/filebrowser.db etc
ExecStart=/usr/local/bin/filebrowser -r /home/username/caddy_filebrowser -d /home/username/filebrowser.db
Type=simple
[Install]
WantedBy=multi-user.target
Guardamos desde nano y habilitamos el servicio con la sentencia:
sudo systemctl enable caddy_filebrowser.service
Y es todo, Filebrowser arrancará de forma automática en los reinicios de servidor.
HOW TO REMOVE PROXMOX CLUSTER
systemctl stop pve-cluster corosync
pmxcfs -l
rm -r /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
PROXMOX QUORUM, EVICT NODE
If quorum is lost you´ll see messages like "proxmox unable to open file '/etc/pve/nodes/"
If not gain temporary quorum you can reduce the number of live nodes for quorum
pvecm expected 1
Delete one node
pvecm delnode old-node-name
Show cluster status
pvecm statusOpen source documentation of Microsoft Azure. Contribute to MicrosoftDocs/azure-docs development by creating an account on GitHub.
Como ejemplo, para hacer accesible un recurso de una NAS externa al PVE.
1.- Montamos en el host PVE el share de la NAS donde se encuentran los directorios a presentar al contenedor LXC, por ejemplo:
mount 192.168.1.11:/share/CACHEDEV1_DATA/Multimedia /mnt/qnap_multimedia
Faltaría añadir el punto de montaje en /etc/fstab para que se produzca el mount en el arranque.
2.- Configuraremos el contenedor LXC para montar sobre el mismo la ruta que hemos montado en el host PVE en el punto anterior.
Esta configuración de montaje se refleja en el fichero de configuración del contenedor, 100.conf en nuestro ejemplo.
Para ello tenemos dos alternativas:
a.- Editar el fichero /etc/pve/lxc/100.conf y añadir la sentencia que produce el montaje
mp0: /mnt/qnap_multimedia/tv,mp=/var/syncthing/tv
b.- Sin editar el fichero, podemos añadir la sentencia en el mismo mediante línea de comando desde el host PVE:
pct set 100 -mp0 /mnt/qnap_multimedia/tv,mp=/var/syncthing/tvAn aggregation of all of the Microsoft Portals we could find.
The data transfer calculator finds how long it would take to download or copy all your files between two devices.
Explain complex systems using visuals and simple terms. Help you prepare for system design interviews. - GitHub - ByteByteGoHq/system-design-101: Explain complex systems using visuals and simple terms. Help you prepare for system design interviews.
In this article, we will show how to create your own alias and execute frequently used commands without having to type each command again and again.
Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
Caddy server would not start and displayed this error after upgrading to v0.9.3:
listen tcp :443: bind: permission denied
I was running caddy with systemd as user caddy. I checked that the bin...
Azure AD Connect allows you to sync identities between Azure AD and Active Directory Domain Services ( on premises). Get a step by step walk through of the wizard for setting up Azure Active Directory Connect in your environment. There are many options to consider and we explain which options you s