https://www.digitalocean.com/community/tutorials/how-to-protect-an-nginx-server-with-fail2ban-on-ubuntu-14-04 http://www.tothenew.com/blog/block-admin-login-page-attack-using-fail2ban/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#install nginx | |
apt install -y dpkg-dev build-essential \ | |
zlib1g-dev \ | |
libpcre3 \ | |
libpcre3-dev \ | |
unzip \ | |
python-software-properties \ | |
software-properties-common \ | |
libpcre3 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Stop mysql: | |
systemctl stop mysqld | |
2. Set the mySQL environment option | |
systemctl set-environment MYSQLD_OPTS="--skip-grant-tables" | |
3. Start mysql usig the options you just set | |
systemctl start mysqld | |
4. Login as root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#put this file to ~/.ncmpcpp/ | |
MUSIC_DIR=/home/user/Music/ #path to your music dir | |
COVER=/tmp/cover.jpg | |
function reset_background | |
{ |
- download and install java
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jre-8u102-linux-x64.rpm"
rpm -Uvh jre-8u102-linux-x64.rpm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# pptpd installation script on my own CentOS 7 box. | |
# inspired by: https://www.digitalocean.com/community/questions/how-to-install-pptp-vpn-on-centos-7 | |
# and http://unix.stackexchange.com/questions/150837/redhat-centos-7-firewalld-best-practice-for-pptp-or-l2tp-ipsec-rules | |
# | |
# Author: 2015 Steve Yang <[email protected]> | |
# The script comes with ABSOLUTELY NO WARRANTY. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
#config.vm.box = "centos/7" | |
#config.vm.provision :shell, :path => "bootstrap.sh" | |
config.vm.define "lab1" do |m| | |
m.vm.box = "centos/7" | |
m.vm.network "private_network", ip: "192.168.7.11" | |
m.vm.provision "shell", inline: "hostnamectl set-hostname lab1" | |
m.vm.provision "shell", inline: "cd /vagrant;sudo make repo;sudo yum install -y ntpdate ntp;sudo systemctl enable ntpd;sudo ntpdate id.pool.ntp.org;sudo service ntpd start" | |
m.vm.provision :shell, :inline => "sudo rm /etc/localtime && sudo ln -s /usr/share/zoneinfo/Asia/Jakarta /etc/localtime", run: "always" | |
end |
NewerOlder