Skip to content

Instantly share code, notes, and snippets.

View jniltinho's full-sized avatar
🏠
Working from home

Nilton Oliveira jniltinho

🏠
Working from home
View GitHub Profile
@jniltinho
jniltinho / get_sasl.pl
Created March 27, 2016 18:12
Get sasl AUTH Postfix
#!/usr/bin/perl
$ENV{"LANG"}="C";
use strict;
$ENV{'PATH'} = "/bin:/sbin:/usr/bin:/usr/sbin";
my %hash_mail = ();
@jniltinho
jniltinho / install_zimbra.sh
Last active October 14, 2017 17:48
Install Zimbra 8.6.0
#!/bin/bash
## Install Zimbra 8.6
## Ubuntu 14.04 64Bits, 4GB RAM, 100GB HD
## For best performance use SSD.
## http://www.linuxpro.com.br/2015/06/instalacao-do-zimbra-8-6-0-no-ubuntu.html
## Download Zimbra: https://www.zimbra.com/downloads/zimbra-collaboration-open-source/
## http://serverfault.com/questions/707997/zimbra-8-6-sends-some-mail-into-black-hole
## Run as root
@jniltinho
jniltinho / install_php71_debian.sh
Last active October 22, 2017 03:37
Install PHP 7.1 on Debian 8.6 64Bits
#!/bin/bash
### Install PHP 7.1 on Debian 8.6 64Bits
### https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
### http://www.shaunfreeman.name/compiling-php-7-on-centos/
apt-get install build-essential nano autoconf
apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev
#!/bin/bash
### Install PHP 5.6.29 on Ubuntu 16.04 64Bits
### https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/
apt-get -y install build-essential libxml2-dev libxslt1-dev
apt-get -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev
apt-get -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev
apt-get -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev
apt-get -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-dev
@jniltinho
jniltinho / samba4-46-setup-opensuse-422.bash
Last active November 10, 2017 07:32
Samba4 4.6 Setup OpenSUSE 42.2
#!/bin/bash
## Install Samba4 4.6.4 on OpenSUSE 42.2
## Author: Nilton OS www.linuxpro.com.br
zypper ar http://download.opensuse.org/repositories/home:/jniltinho/openSUSE_Leap_42.2/home:jniltinho.repo
zypper --gpg-auto-import-keys refresh
zypper in samba4-4.6.4
##ln -s /opt/samba4/bin/samba-tool /usr/local/bin/
@jniltinho
jniltinho / gowget.go
Last active December 12, 2017 20:17
Download HTTP using Golang
package main
/*
Usage of ./gowget [URL] for download
URL: https://github.com/thbar/golang-playground/blob/master/download-files.go
URL: https://stackoverflow.com/questions/11692860/how-can-i-efficiently-download-a-large-file-using-go
*/
@jniltinho
jniltinho / setup-quokka-nginx-uwsgi-opensuse.sh
Last active December 21, 2017 04:02
Install Quokka Project + Nginx + uWSGI OpenSUSE 11.X, 12.X, 13.X
#!/bin/bash
# Author: Nilton OS -- www.linuxpro.com.br
# Version: 0.4
# Source: https://gist.github.com/jniltinho/6998822
echo 'setup-quokka-nginx-uwsgi-opensuse.sh'
echo 'Support OpenSUSE 11.X, 12.X, 13.X'
echo 'Installs Nginx + uWSGI + Quokka'
# Check if user has root privileges
@jniltinho
jniltinho / install_redmine_nginx.sh
Last active January 3, 2018 10:51
Install Redmine on Debian 8.7 64Bits + Nginx
#!/bin/bash
## Install Redmine + Nginx
## Tested on Debian 8.7 64Bits
## Author: Nilton OS -- www.linuxpro.com.br
## Version: 0.1
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
echo "You must run the script as root or using sudo"
@jniltinho
jniltinho / get_linux_dist.go
Last active January 12, 2018 20:33
Get Linux Dist
package main
import (
"log"
"os/exec"
"strings"
)
func main() {
@jniltinho
jniltinho / install_tidb_on_ispconfig.sh
Last active January 23, 2018 19:51
Install TiDB on ISPConfig as MariaDB
#!/bin/bash
## Install and Setup TiDB on Linux
## https://github.com/pingcap/tidb
## https://github.com/pingcap/docs/blob/master/sql/privilege.md
## https://pingcap.com/blog/2016-10-17-how-we-build-tidb/
## https://github.com/pingcap/tidb/blob/master/config/config.toml.example
## Remove MariaDB/Mysql
systemctl stop mysql mysqld