Last active
February 22, 2024 06:59
-
-
Save Ichinya/540aa1baff9f75f31ee476c0a3ae5eb4 to your computer and use it in GitHub Desktop.
Шпаргалка по командам настройки серверов
This file contains 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
show status like 'wsrep%'; | |
SELECT * FROM performance_schema.data_locks; | |
SELECT * FROM performance_schema.processlist; | |
SHOW VARIABLES LIKE 'validate_password%'; | |
SET GLOBAL validate_password.policy = LOW; | |
CREATE USER 'sstuser'@'localhost' IDENTIFIED BY 's3cretPass'; | |
GRANT PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'; | |
FLUSH PRIVILEGES; |
This file contains 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
# После установки Proxmox 8 нужно установить PostInstall скрипты | |
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/post-pve-install.sh)" | |
# Обновление микрокода Intel (по желанию). | |
bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/misc/microcode.sh)" |
This file contains 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
# копирование папки или файлов через rsync (должен быть установлен на обоих серверах) | |
rsync -avpP -e ssh /path/to/backupdir Replica:/path/to/mysql/ | |
# добавить пользователя | |
sudo adduser ichinya | |
# добавить пользователя к sudo | |
# sudo usermod -a -G sudo <username> | |
sudo usermod -aG sudo ichinya | |
# добавить ключ | |
mkdir ~/.ssh && cat >> ~/.ssh/authorized_keys | |
# потом ctrl+v и ctrl+d для подтверждения | |
# или | |
echo содержимое_ключа >> ~/.ssh/authorized_keys | |
# отключаем запросы пароля для пользователя | |
sudo visudo | |
# откроется конфиг, куда нибудь побавляем (лучше перед include в конце) | |
ichinya ALL=(ALL) NOPASSWD: ALL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment