Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Nilton Oliveira jniltinho

🏠
Working from home
View GitHub Profile
@jniltinho
jniltinho / install-caddy-linux.sh
Last active May 13, 2020
Install Caddy Web Server on Linux
View install-caddy-linux.sh
#!/bin/bash
## Install Caddy 2 Web Server Linux
## https://temelkuran.ist/caddy-server-2-php-fpm-installation-on-ubuntu-server-19-10/
## https://caddy.community/t/fastcgi-using-unix-socket-with-caddy-2/6376
## https://caddy.community/t/v2-subfolder-proxy-to-upstream-root/7095/7
## https://caddyserver.com/
# https://github.com/caddyserver/caddy
wget https://github.com/caddyserver/caddy/releases/download/v2.0.0/caddy_2.0.0_linux_amd64.tar.gz
tar -xvf caddy_2.0.0_linux_amd64.tar.gz
@jniltinho
jniltinho / install-dotnet-core-linux.sh
Last active Nov 27, 2019
Install DotNet Core SDK on Linux
View install-dotnet-core-linux.sh
#!/bin/bash
## Install DotNet Core on Linux 64Bits
## Author: Nilton OS www.linuxpro.com.br
## https://gist.github.com/richlander/467813274cea8abc624553ee72b28213
## https://dotnet.microsoft.com/download/linux-package-manager/sdk-current
## Dependencies
## .NET Core has the following dependencies, on Ubuntu (other distros will vary):
## libc6, libgcc1, libgssapi-krb5-2, libicu60, liblttng-ust0, libssl1.0.0, libstdc++6, zlib1g
View install-mt7612u-ubuntu.sh
#!/bin/bash
## Install USB WiFi adapter AC-1200 on Ubuntu 18.04
## Bus 002 Device 006: ID 0e8d:7612 MediaTek Inc.
## https://askubuntu.com/questions/1119004/usb-wifi-adapter-problem
## https://bbs.archlinux.org/viewtopic.php?id=250273
## http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=2830&view=next
## https://github.com/kaduke/Netgear-A6210
sudo apt install git dkms build-essential
git clone https://github.com/jeremyb31/mt7612u.git
@jniltinho
jniltinho / install_rtmp_ubuntu.sh
Last active May 18, 2019
Install RTMP Nginx on Ubuntu 18.04
View install_rtmp_ubuntu.sh
#!/bin/bash
### Author: Nilton OS <jniltinho dot gmail.com>
### Version 0.1
## https://opensource.com/article/19/1/basic-live-video-streaming-server
## https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50
## https://gist.github.com/tabvn/cb58cf621ddc346c19e44542ed5e800c
## https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/
## https://illegalpornography.com/computers/2018/09/14/hls-streaming-with-nginx-that-works.html
## https://dev.to/samuyi/how-to-setup-nginx-for-hls-video-streaming-on-centos-7-3jb8
@jniltinho
jniltinho / install-gitlab-runner.sh
Last active Mar 3, 2020
Install GitLab Runner on Ubuntu 16.04
View install-gitlab-runner.sh
#!/bin/bash
## Install GitLab Runner on Ubuntu 16.04
## https://docs.gitlab.com/runner/install/linux-manually.html
## Config do Runner /etc/gitlab-runner/config.toml
## Para registrar e usar uma CA auto assinada
## gitlab-runner register --tls-ca-file="/home/gitlab-runner/data/certs/ca.crt"
## Install Docker
apt-get update
apt-get upgrade
@jniltinho
jniltinho / install-kubernetes-ubuntu.sh
Last active Sep 20, 2019
Install kubernetes on Ubuntu 18.04
View install-kubernetes-ubuntu.sh
#!/bin/bash
## Install Install kubernetes on Ubuntu 18.04 64Bits
## Author: Nilton Oliveira
## https://www.linuxtechi.com/install-configure-kubernetes-ubuntu-18-04-ubuntu-18-10/
## https://www.learnitguide.net/2018/08/install-and-configure-kubernetes-cluster.html
## https://www.ostechnix.com/how-to-configure-ip-address-in-ubuntu-18-04-lts/
## https://kubernetes.io/docs/setup/independent/install-kubeadm/
## https://www.howtoforge.com/tutorial/how-to-install-kubernetes-on-ubuntu/
## https://github.com/kubernetes/dashboard
## https://kubernetes.github.io/ingress-nginx/deploy/
@jniltinho
jniltinho / install-gitlab-debian.sh
Last active Apr 18, 2020
Install GitLab on Debian
View install-gitlab-debian.sh
#!/bin/bash
## Install GitLab 11.6.5-ce on Debian 9 | Ubuntu 18.04
## https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-debian-9
## https://www.digitalocean.com/community/tutorials/how-to-build-docker-images-and-host-a-docker-image-repository-with-gitlab
## https://docs.docker.com/registry/deploying/
## https://about.gitlab.com/install/#debian
## VM HD 80GB, swap 2GB, / 78GB | Filesystem ext4 | 8GB RAM
## apt-cache madison gitlab-ce
## gitlab-ce=10.7.3-ce.0 gitlab-ce=11.6.5-ce.0
## Run as root (sudo su)
@jniltinho
jniltinho / create-rpm-opensuse-samba4.sh
Last active Nov 8, 2018
Create RPM Samba4 4.9.2 OpenSUSE Leap 15
View create-rpm-opensuse-samba4.sh
#!/bin/bash
## Create RPM package Samba4 4.9.2 (OpenSUSE 15)
## http://sig9.hatenablog.com/entry/2017/12/04/000000
## Run as root (sudo su)
## docker run --rm -it -v "${PWD}:/usr/src" -e LANG=en_US.UTF-8 opensuse/leap:15 /bin/bash
zypper in -y ruby-devel rpm-build wget tar gzip
zypper in -y pkg-config libblkid-devel autoconf make python-devel gdb sqlite3-devel libgnutls-devel libjansson-devel
zypper in -y perl perl-TimeDate git-core pam-devel libsepol-devel ccache cracklib-devel gdbm-devel libgpgme-devel
@jniltinho
jniltinho / golang-sending-email.go
Last active Dec 22, 2019
Postfix and Golang - Sending emails
View golang-sending-email.go
package main
import (
"fmt"
"net/mail"
"net/smtp"
"strings"
)
var host = "127.0.0.1"
@jniltinho
jniltinho / create-deb-samba4.sh
Last active May 26, 2020
Create Deb Samba4
View create-deb-samba4.sh
#!/bin/bash
## Create DEB package Samba4 4.12.3 (Ubuntu 18.04)
## http://sig9.hatenablog.com/entry/2017/12/04/000000
## https://wiki.samba.org/index.php/Package_Dependencies_Required_to_Build_Samba
## https://github.com/jniltinho/go-samba4/releases
## https://www.tecmint.com/install-samba4-active-directory-ubuntu/
## https://blog.ricosharp.com/posts/2019/Samba-4-Active-Directory-Domain-Controller-on-Ubuntu-18-04-Server
## http://www.bosontreinamentos.com.br/linux/samba-4-instalacao-e-provisionamento/
## https://wiki.samba.org/index.php/Installing_RSAT
## https://www.tecmint.com/manage-samba4-ad-from-windows-via-rsat
You can’t perform that action at this time.