Skip to content

Instantly share code, notes, and snippets.

View erselbey's full-sized avatar
💻
🤯🤬⚔️

erselbey erselbey

💻
🤯🤬⚔️
View GitHub Profile
@erselbey
erselbey / gist:0b61153827f6f0f47554a9d56ffb14c8
Created July 24, 2017 07:24
Linux izin ayarları ve komutları
Linux'da Kullanıcı Haklarının Belirlenmesi
NOT: Aşağıdaki komutları herhangi bir unix sistemde çalıştırabilmeniz için kesinlikle root olmanız geremketedir. Kullanıcı iseniz, ve root şifresini biliyorsanız; root olmak için "su -" komutunu kullanabilirsiniz.
Öncelikle bir dizin veya dosya için kimin hangi izninin olduğunu görmek için ls komutuna -l parametresini ekleyerek kullanıyoruz. Şöyle ki :
ls -l /home/irfaN/dokumanlarim
karşıma aşağıdaki gibi bir sonuç çıkıyor :
d r w x r - - r - -
@erselbey
erselbey / 0_user-accounts.md
Created September 28, 2017 02:46 — forked from sayz/0_user-accounts.md
linux sistem yönetimi kampında tuttuğum notlar...

##useradd komutu.

-c "açıklama"

ex: -c "müdür bey"

-s kabukı-adı

ex:

@erselbey
erselbey / my.cnf
Created February 11, 2018 20:31 — forked from fevangelou/my.cnf
Optimized MySQL configuration [socket & PID paths taken from stock Ubuntu Server setups] (updated July 2017)
# Optimized MySQL configuration by Fotis Evangelou - Updated July 2017
#
# The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
# should be adjusted for your system by using MySQL DB diagnostics tools like:
# http://mysqltuner.com/
# or
# https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6)
#!/bin/bash
echo "Building extended du reports for $1 in $2 ...";
cd $1
du -sh $1/* $1/.[a-zA-Z0-9]* $1/. > $2/du-output.txt
cat $2/du-output.txt | egrep '([0-9]M)' > $2/du-output-MB.txt
cat $2/du-output.txt | egrep '[0-9]G'> $2/du-output-GB.txt
cat $2/du-output-MB.txt | sort -hr > $2/du-output-MB-sorted.txt
cat $2/du-output-GB.txt | sort -hr > $2/du-output-GB-sorted.txt
echo ""
echo '[du extended report]:';
@erselbey
erselbey / rsync_lxc_container.sh
Created December 23, 2019 15:32 — forked from TsutomuNakamura/rsync_lxc_container.sh
Rsync an LXC container
rsync --archive --compress --partial --append --delete --numeric-ids \
--exclude=/rootfs/cdrom/* --exclude=/rootfs/dev/* --exclude=/rootfs/media/* --exclude=rootfs/mnt/* \
--exclude=/rootfs/proc/* --exclude=/rootfs/run/* --exclude=/rootfs/sys/* --exclude=/rootfs/tmp/* \
/var/lib/lxc/${container}/ user@desthost:/var/lib/lxc/${container}
@erselbey
erselbey / install-kimchi-ubuntu18.04.sh
Created September 29, 2020 07:51 — forked from ndunks/install-kimchi-ubuntu18.04.sh
Install kimchi on ubuntu 18.04 bionic
#For Indonesian server
#locale fix
sudo locale-gen id_ID.UTF-8
#change miror
sudo sed -i_old 's/archive.ubuntu.com/kambing.ui.ac.id/' /etc/apt/sources.list
sudo apt update
#INSTALL WOK
#build depencies
cd ~
apt install -y python3-pip gcc make autoconf automake git python3-pip python3-requests \
python3-mock gettext pkgconf xsltproc python3-dev pep8 pyflakes python3-yaml systemd \
logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema \
openssl nginx python3-cherrypy3 python3-pam python-m2crypto gettext python3-openssl \
python3-configobj python3-lxml python3-magic python3-paramiko python3-ldap spice-html5 \
novnc qemu-kvm python3-libvirt python3-parted python3-guestfs python3-pil python3-cherrypy3 \
libvirt0 libvirt-daemon-system libvirt-clients nfs-common sosreport open-iscsi libguestfs-tools \
libnl-route-3-dev
@erselbey
erselbey / 2019-https-localhost.md
Created August 12, 2021 08:08 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@erselbey
erselbey / jenkins-docker-compose.yml
Created August 25, 2021 10:54 — forked from Gogetter/jenkins-docker-compose.yml
Jenkins container installation
version: "3.8"
services:
jenkins-docker:
image: docker:dind
restart: always
privileged: "true"
environment:
- DOCKER_TLS_CERTDIR=/certs
ports:
- "2376:2376"