Aylık Arşiv: Eylül 2020

Eyl 14

Ubuntu timezone Türkiye

sudo timedatectl set-timezone Europe/Istanbul

Eyl 14

İşletim sistemine uzak nfs bağlama ve koparma

sudo apt install nfs-common sudo groupadd -g 2000 moodledata-group sudo usermod -a -G moodledata-group root sudo mkdir /var/www/moodledata sudo echo ‘192.168.x.x:/mnt/datas/datawebs /var/www/moodledata nfs defaults 0 0’ >> /etc/fstab sudo pico /etc/fstab sudo mount -a cat /proc/mounts cat /proc/mounts | grep datawebs mount edile dizini koparmak için sudo umount -f -l 192.168.x.x:/mnt/datas/datawebs

Eyl 14

Nginx active kullanıcı sayıları.

location /nginx_status { # Turn on stats stub_status on; access_log off; # only allow access from 10.x.x.x # allow 10.x.x.0/24; deny all; }

Eyl 14

Nginx – php-fpm ayarları

sudo find / \( -iname “php.ini” -o -name “www.conf” \) /etc/php/7.4/fpm/pool.d/www.conf /etc/php/7.4/fpm/php.ini /etc/php/7.4/cli/php.ini pico /etc/nginx/conf.d/moodle.xx.xx veya /etc/nginx/sites-enabled/moodle.xx.xx location ~ [^/].php(/|$) { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } grep ^[^\;] /etc/php/7.4/fpm/pool.d/www.conf [www] user = www-data group = www-data listen = /run/php/php7.4-fpm.sock listen.owner = www-data listen.group = www-data pm = dynamic pm.max_children = …

Okumaya devam edin »

Eyl 14

MySQL Tuning

grep ^[^#] /etc/mysql/mysql.conf.d/mysqld.cnf [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking default_storage_engine = innodb innodb_file_per_table = 1 innodb_file_format = Barracuda innodb-buffer-pool-size=88G innodb_thread_concurrency = 30 bind-address = 0.0.0.0 key_buffer_size = 16M …

Okumaya devam edin »

Eyl 14

Ldap portunu dinle durmuşsa start et.

Farklı servisler içinde uyarlamanız mümkün. pico uptime.sh #!/bin/bash #service monitoring /bin/netstat -tulpn | awk ‘{print $4}’ | awk -F: ‘{print $2}’ | grep ^389$ > /dev/null 2>/dev/null a=$(echo $?) if test $a -ne 0 then echo “slapd service down” | ssmtp mail-adresi /dev/null 2>/dev/null else sleep 0 fi pico msg.txt To: mail-adresi From: gönderici-mail-adresi Subject: …

Okumaya devam edin »

Eyl 14

Locust (Yük test aracı) – An open source load testing tool

sudo apt install python3-pip sudo pip3 install -e git://github.com/locustio/locust.git@master#egg=locust locust -V locust –help locate sudo apt install mlocate sudo updatedb locate locust import time from locust import HttpUser, task, between class QuickstartUser(HttpUser): wait_time = between(1, 3) @task def index_page(self): self.client.get(“/login”) self.client.get(“/login/index.php”) @task(3) def view_item(self): for item_id in range(0): self.client.get(f”/?redirect={item_id}”, name=”/”) time.sleep(1) def on_start(self): self.client.post(“/login/index.php”, json={“username”:”admin”, …

Okumaya devam edin »

Eyl 14

Too many open files at /usr/share/perl5/PVE/INot

sanal1’deki lxc container makineyi sanal3’e migrate ettikten sonra ct locked oldu bunun üzerine pct unlock ct_id pct start ct_id olarak start verebilmek için aşağıdaki ayarları yaptım. root@sanal3:~# pico /proc/sys/fs/inotify/max_user_instances root@sanal3:~# pico /proc/sys/fs/inotify/max_user_watches Bu iki dosyadaki değerlerin sonuna 0 koydum yani 10 kat arttı 🙂 8192 81920 128 ise 1280 oldu. Hata buydu : Unable to …

Okumaya devam edin »

Eyl 14

PostgreSQL Tuning İşlemleri

https://pgtune.leopard.in.ua/ buradan ilgili parametreler ile tuning yapılabilir. https://severalnines.com/blog/benchmarking-postgresql-performance adresteki pgbench ile yukarıdaki tuning öncesi ve sonrası karşılaştırılabilir.

Eyl 14

Ocsinventory-NG (envanter toplama sistemi) Upgrade Adımları

service apache2 stop mkdir /home/backup_ocs cp /etc/apache2/conf-available/z-ocsinventory-server.conf /etc/apache2/conf-available/zz-ocsinventory-restapi.conf /etc/apache2/conf-available/ocsinventory-reports.conf /home/backup_ocs/ && cp /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php /home/backup_ocs/ mysqldump -u root -p –all-databases > /home/backup_ocs/ocsdbbackup.sql cp ocsinventory-reports.conf z-ocsinventory-server.conf zz-ocsinventory-restapi.conf /etc/apache2/conf-available/ && cp dbconfig.inc.php /usr/share/ocsinventory-reports/ocsreports/ tar –xvzf OCSNG_UNIX_SERVER-2.x.x.tar.gz cd OCSNG_UNIX_SERVER-2.x.x sh setup.sh cd /home/backup_ocs cp ocsinventory-reports.conf z-ocsinventory-server.conf zz-ocsinventory-restapi.conf /etc/apache2/conf-available/ && cp dbconfig.inc.php /usr/share/ocsinventory-reports/ocsreports/ rm /usr/share/ocsinventory-reports/ocsreports/install.php /usr/share/ocsinventory-reports/ocsreports# pico backend/AUTH/auth.php dosyasında “$list_methode …

Okumaya devam edin »

Eski yazılar «