Create a folder to store the databases :
mkdir -p /usr/share/GeoIP
Download Country IP database
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
### This bash script below has been tested on Oracle Linux 8 | |
### Put these 3 lines in the bottom file of your ~/.bashrc | |
export SERVER_NAME="[MyServerName] " | |
export PS0='\[\e[1;33m\]└─ exec @ \D{%F %T%z} $(eval printf %.0s─ '{36..'"${COLUMNS:-$(tput cols)}"\}; echo)\[\e[m\]\n' | |
export PS1="\n\[\e[1;33m\]┌$(eval printf %.0s─ '{2..'"${COLUMNS:-$(tput cols)}"\}; echo)\n├─ \h ($(eval hostname -I|cut -f1 -d' ')) ${SERVER_NAME}@ \w\n├─ \[\e[1;36m\]\u \\$\[\e[m\] " | |
### Adjust env SERVER_NAME, save and execute command below | |
$ source ~/.bashrc |
Create a folder to store the databases :
mkdir -p /usr/share/GeoIP
Download Country IP database
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
echo "auto_prepend_file=/opt/www/proxy.php" >> /etc/php5/cli/php.ini |
cd ~/Downloads
wget http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+xenial_all.deb
dpkg -i zabbix-release_3.2-1+xenial_all.deb
apt-get update
should add /etc/apt/sources.list.d/zabbix.list
http { | |
log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time ' | |
'<"$request_body" >"$resp_body"'; | |
lua_need_request_body on; | |
set $resp_body ""; | |
body_filter_by_lua ' |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
# -*- coding: utf-8 -*- | |
# @author: Peter Lamut | |
import argparse | |
import os | |
import shutil | |
N = 10 # the number of files in seach subfolder folder | |
<?php | |
// http://25labs.com/alternative-for-file_get_contents-using-curl/ | |
function file_get_contents_curl($url, $retries=5) | |
{ | |
$ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36'; | |
if (extension_loaded('curl') === true) | |
{ |
/* Blink for Webkit and others | |
(Chrome, Safari, Firefox, IE, ...) | |
*/ | |
@-webkit-keyframes blinker { | |
from {opacity: 1.0;} | |
to {opacity: 0.0;} | |
} | |
.blink{ | |
text-decoration: blink; |