Skip to content

Commit

Permalink
Устранение системных ограничений на сетевые операции
Browse files Browse the repository at this point in the history
  • Loading branch information
Rolariali authored and Ririconj committed Jul 30, 2021
1 parent d88ad81 commit 5ab62e0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 11 deletions.
8 changes: 8 additions & 0 deletions configs/sysctl/sysctl.conf
@@ -0,0 +1,8 @@
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304

net.core.wmem_default = 4194304
net.core.wmem_max = 4194304

net.core.somaxconn = 8184
net.core.netdev_max_backlog = 65536
3 changes: 3 additions & 0 deletions configs/systemd/system.conf
@@ -0,0 +1,3 @@

[Manager]
DefaultLimitNOFILE=524288:524288
4 changes: 2 additions & 2 deletions install
Expand Up @@ -7,7 +7,7 @@ fi

echo "Started"

chmod 777 ./install_deps ./install_configs ./install_services
chmod 777 ./install_*

./install_deps

Expand Down Expand Up @@ -99,8 +99,8 @@ ldconfig
cd $INSTALL_DIR
./install_asterisk
./install_configs
./install_system_configs
./install_services
systemctl restart systemd-journald

# for hlr base
mkdir -p /var/lib/osmocom
Expand Down
9 changes: 0 additions & 9 deletions install_configs
Expand Up @@ -13,17 +13,8 @@ rm -rf /etc/osmocom

cp -r $INSTALL_DIR/configs/osmocom /etc/osmocom
cp -r $INSTALL_DIR/configs/asterisk/* /etc/asterisk/
cp $INSTALL_DIR/configs/journalctl/journald.conf /etc/systemd/journald.conf

chown asterisk:asterisk /etc/asterisk
chown asterisk:asterisk /etc/asterisk/*

echo "Config update ended"








22 changes: 22 additions & 0 deletions install_system_configs
@@ -0,0 +1,22 @@
#!/bin/bash

if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi

echo "System config update started"

INSTALL_DIR=`pwd`

cp $INSTALL_DIR/configs/journalctl/journald.conf /etc/systemd/journald.conf
systemctl restart systemd-journald

cp -v $INSTALL_DIR/configs/sysctl/sysctl.conf /etc/sysctl.conf
# reload system settings(read /etc/sysctl.conf)
sysctl --system

cp -v $INSTALL_DIR/configs/systemd/system.conf /etc/systemd/system.conf
systemctl daemon-reload

echo "System config update ended"

0 comments on commit 5ab62e0

Please sign in to comment.