Last active
October 24, 2022 16:54
-
-
Save sidor1989/c4f0da80f7795e75803748ff227af05f 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
#входим в контенер | |
docker exec -it app /bin/bash | |
#================================ | |
#отправка письма с помощью curl smtp | |
curl --url 'smtps://smtp.yandex.ru:465' --ssl-reqd mail-from '...' --mail-rcpt '...' upload-file mail.txt --user 'login:pass' | |
========================================= | |
#смотрим запросы рантайм | |
sudo tcpdump port not 22 and not arp | |
======================================== | |
#обновляем openssh | |
sudo apt update | |
sudo apt install build-essential zlib1g-dev libssl-dev | |
sudo mkdir /var/lib/sshd | |
sudo chmod -R 700 /var/lib/sshd/ | |
sudo chown -R root:sys /var/lib/sshd/ | |
wget -c https://mirror.yandex.ru/pub/OpenBSD/OpenSSH/portable/openssh-9.0p1.tar.gz | |
tar -xzf openssh-9.0p1.tar.gz | |
cd openssh-9.0p1/ | |
sudo apt install libpam0g-dev libselinux1-dev libkrb5-dev | |
./configure --with-kerberos5 --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh | |
make | |
sudo make install | |
================================================ | |
# в битриксе так можно посмотреть ветку | |
$output = shell_exec('git branch'); | |
echo "<pre>$output</pre>"; | |
============================================ | |
#appdynamics | |
sudo mkdir -p /opt/appdynamics/php-agent | |
sudo cp ~/appdynamics-php-agent-x64-linux-22.3.0.501_NoLogs.tar.bz2 /opt/appdynamics/php-agent | |
cd /opt/appdynamics/php-agent | |
sudo tar -xvjf appdynamics-php-agent-x64-linux-22.3.0.501_NoLogs.tar.bz2 | |
sudo chmod -R 755 /opt/appdynamics/php-agent/appdynamics-php-agent-linux_x64 | |
sudo chmod -R 777 /opt/appdynamics/php-agent/appdynamics-php-agent-linux_x64/logs | |
sudo ./install.sh \ | |
-a=customer1@<KEY> \ | |
-e /usr/lib/php/20170718 \ | |
-i /etc/php/7.2/apache2/conf.d \ | |
-p /usr/bin \ | |
-v 7.2 \ | |
10.17.1.111 80 <APP_NAME> <TIER_NAME> <NODE_NAME> | |
sudo service apache2 restart | |
======================================================= | |
sudo useradd RepinIIu | |
sudo usermod -a -G sudo RepinIIu | |
sudo mkdir /home/RepinIIu | |
sudo mkdir /home/RepinIIu/.ssh | |
sudo nano authorized_keys - сохраняем в файл ключ | |
cd home | |
sudo chown -R RepinIIu:RepinIIu RepinIIu | |
sudo chmod 755 RepinIIu | |
sudo chmod 700 RepinIIu/.ssh | |
sudo chmod 600 RepinIIu/.ssh/authorized_keys | |
sudo chsh -s /bin/bash RepinIIu | |
==================================================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment