Skip to content

Instantly share code, notes, and snippets.

🌴
On vacation

Yujin Boby serverok

🌴
On vacation
View GitHub Profile
View gist:06c15c3ffc50a08ba0bb85b455a4eb15
First install squid proxy with commands
wget https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid3-install.sh
chmod 755 squid3-install.sh
sudo ./squid3-install.sh
To make proxy work with out password, edit file
/etc/squid/squid.conf
View gist:cd6c3f900d7db89f9b9c28b20c1dcc5b
curl -i "http://suggestqueries.google.com/complete/search?output=firefox&client=firefox&hl=pl-PL&q=serverok"
View gist:9872b08a6bf534af6abe4f979c09d8b4
To add a stream, you need to edit file
/etc/stunnel/stunnel.conf
Find
[shoutcast1]
accept=8000
connect=108.170.15.78:8001
cert = /etc/letsencrypt/live/jroradio.com/fullchain.pem
View phpmyadmin apache config
Alias /phpmyadmin "/usr/serverok/phpmyadmin"
<Directory "/usr/serverok/phpmyadmin">
AllowOverride All
Options FollowSymlinks
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
<RequireAny>
Require all granted
View iredmail increase mailbox size
ssh into server as user root
To make attachment size 100 MB (104857600 bytes)
run following 3 commands.
postconf -e message_size_limit=104857600
postconf -e mailbox_size_limit=104857600
systemctl restart postfix
View gist:dbe6140bb47efc896b4764db385ac2b5
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/sitemap/public
<Directory "/var/www/sitemap/public">
Options All
AllowOverride All
Require all granted
Order allow,deny
allow from all
</Directory>
View gist:d3ec618d90da31083cffb4cc31dcfe8e
-----BEGIN CERTIFICATE-----
MIIGFzCCA/+gAwIBAgIQckB41CE86gO/FOVeP1YCNzANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTQw
ODIyMDAwMDAwWhcNMjkwODIxMjM1OTU5WjCBkzELMAkGA1UEBhMCVVMxEzARBgNV
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
aGUgVVNFUlRSVVNUIE5ldHdvcmsxOTA3BgNVBAMTMFVTRVJUcnVzdCBSU0EgRG9t
YWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBAMTDft1Zl+V3Koj2wygf++oaX4pvUTmt0zbGzThksBeN
View prometheus.yml
root@web:~# cat /etc/prometheus/prometheus.yml
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
View node_exporter install
#!/bin/bash
useradd --no-create-home --system --shell /bin/false node_exporter
cd /usr/local/src
wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz
tar xvf node_exporter-0.18.1.linux-amd64.tar.gz
cd /usr/local/src/node_exporter-0.18.1.linux-amd64/
mv node_exporter /usr/local/bin/
View gist:7a2cbb6663e2ab11c7a8626adef5e9e5
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
You can’t perform that action at this time.