Last active
December 23, 2020 14:49
-
-
Save iTeeLion/8a8196eeac01ca9ca52d59ae264bc145 to your computer and use it in GitHub Desktop.
Linux basic web admin commands / Базовые команды администратора web сервера linux
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
# CentOS выбор основного редактора | |
export EDITOR=mcedit | |
#Grep: | |
grep -ilnr 'search' /indir --include=*.php | |
grep -ilnr 'search' /indir --exclude=*.php | |
grep -ilnr 'search' /indir --exclude-dir=cache | |
#CreateUser and Permissions: | |
useradd -s /bin/bash -d /home/iteelion -m -U -G user | |
#SCP copy | |
scp -r login@host:/from/file.txt login@host:/to/dir/ | |
#FTP | |
ftp ftp.example.com | |
lcd | |
get file | |
put file | |
Put * | |
#Backup/UnBackup: | |
tar -czvf backup.tar.gz ./bitrix --exclude=./bitrix/backup | |
tar -xzvf backup.tar.gz -C /path/to/folder | |
#Dump/UnDump: | |
mysqldump -uUSER -p DBNAME > /pathto/dump.sql | |
mysql -uUSER -p DBNAME < dump.sql | |
#Files | |
ls -la | |
#Screen | |
screen -AmdS backup ./command | |
#SSL | |
ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Базовые команды для работы с linux