Skip to content

Instantly share code, notes, and snippets.

View AndresLesmesg's full-sized avatar

AndresLesmesg

  • Bogota - Colombia
View GitHub Profile
#! bin/bash
# autor: AndresLesmesg
# backup
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old
# edit file
sed 's!#X11!X11!' /etc/ssh/sshd_config
sed 's/X11Fordwarding no/X11Fordwarding yes/1' /etc/ssh/sshd_config
sed 's/X11X11UseLocalHost no/X11UseLocalHost yes/1' /etc/ssh/sshd_config
@AndresLesmesg
AndresLesmesg / run_rpm_zsh.sh
Created April 12, 2019 03:45
install basic component for optimize workflow in distributions with packet RPM.
#!/bin/bash
echo "Run Install Basic Components"
#install basic components
sudo yum install git curl wget nano mailx -y
install & configuration of themes
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
cd ~/.zshrc
#change default theme for zsh
grep -lr -e 'ZSH_THEME="robbyrussell"' * | xargs sed -i "s/ZSH_THEME=""robbyrussell""/ZSH_THEME=""avit""/g"
chsh -s /bin/zsh
@AndresLesmesg
AndresLesmesg / run_deb_zsh.sh
Last active July 14, 2020 11:50
install basic component for optimize workflow.
#!/bin/bash
echo "Run Install Basic Components"
#install basic components
sudo apt-get install git curl wget nano mailutils -y
#install & configuration of themes
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cd ~
#change default theme for zsh
grep -lr -e 'ZSH_THEME="robbyrussell"' * | xargs sed -i "s/ZSH_THEME=""robbyrussell""/ZSH_THEME=""agnoster""/g"
chsh -s /bin/zsh
#!/bin/bash
# instlaccion de programas basicos
yum -y install epel-release
yum -y install yum-utils
yum -y install net-tools nano wget mlocate
#añadir para MariaDB 10.+
touch /etc/yum.repos.d/MariaDB.repo
echo "[mariadb]" > /etc/yum.repos.d/MariaDB.repo
#!/bin/sh
# BACKUP DEL ARCHIVO A CONNFIGURAR
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.old
# INPUT DEL PUERTO
echo ingrese el valor del puerto
read port
# DATOS DEL USUARIO Y FECHA
info=$(whoami)
info+=" / "
info+=$(date +%d-%m-%y)
@AndresLesmesg
AndresLesmesg / run_ldap.sh
Last active June 6, 2018 00:45
install LDAP Centos 7
#!/usr/bin/env bash
# install opldap
yum install openldap-servers migrationtools openldap-clients
# delete configure default or old LDAP
rm -rfv /etc/openldap/slapd.d/*
# load template of configuration
cp /usr/share/openldap-servers/slapd.ldif /etc/openldap/slapd.conf
@AndresLesmesg
AndresLesmesg / run_syspass.sh
Last active June 5, 2018 06:47
install syspass - centos 7
#!/usr/bin/env bash
# intall syspass centos 7
#remove php old
yum erase php php-pear php-mysql php-cli php-common
# install php 5.6
yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install php56w-fpm php56w-opcache