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
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI) | |
# This should be performed as root since it's going to be installing a bunch of stuff | |
# --- Update things to make sure we have the latest patches --- | |
# Add EPEL so we can get reasonably recent packages | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# --- Install all the packages --- # | |
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached |
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
# vim: set ft=pf | |
# /etc/pf.conf | |
ext_if="vtnet0" | |
webports = "{http, https}" | |
int_tcp_services = "{domain, ntp, smtp, www, https, ftp}" | |
int_udp_services = "{domain, ntp}" | |
set skip on lo |
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 | |
# | |
# Build a chroot with a CentOS 6.5 base install. | |
# | |
CHROOT=/tmp/chroot | |
mkdir -p $CHROOT | |
mkdir -p $CHROOT/var/lib/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
# Shutdown the VM and rename storage (optional) | |
$ virsh shutdown old_vm | |
$ mv /path/to/old_vm.img /path/to/new_vm.img | |
# Edit virsh template with the new name and storage | |
$ virsh dumpxml old_vm > new_vm.xml | |
$ vim new_vm.xml | |
~~~ new_vm.xml | |
<name>new_vm</name> # <-- change this line | |
... |
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 | |
# Определяем qualify_domain — он необходим для удаления всяческого мусора | |
domain=`exim -bP | grep -i "^qualify_domain" | sed -e s/.*\=\ //g` | |
# Прощаемся со всеми замороженными сообщениями | |
exim -bpr | grep '<' | awk '{print $2}' | grep '-' | xargs exim -Mrm 2> /dev/null | |
# при передаче скрипту параметра c, включаем агрессивный режим | |
if [ "$1" == "c" ]; then |
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
#!/usr/bin/env bash | |
# Works fine on Ubuntu 14.0.4 LTS | |
NGINX_VERSION="1.9.9" | |
NCHAN_VERSION="0.97" | |
HEADERS_MORE_VERSION="0.29" | |
DEV_KIT_VERSION="0.2.19" | |
ECHO_VERSION="0.58" | |
FANCY_INDEX_VERSION="0.3.5" |
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 | |
DISC="sda"; \ | |
cat /sys/block/$DISC/queue/scheduler; \ | |
for T in noop deadline cfq; do \ | |
echo $T > /sys/block/$DISC/queue/scheduler; \ | |
cat /sys/block/$DISC/queue/scheduler; \ | |
sync && /sbin/hdparm -tT /dev/$DISC && echo "----"; \ | |
sleep 15; \ | |
done |
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
# frontend | |
server { | |
listen 80; | |
server_name yii2.lo; | |
server_tokens off; | |
client_max_body_size 128M; | |
charset utf-8; | |
access_log /var/log/nginx/yii2-access.log main buffer=50k; |
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
# user http; | |
# user www-data; | |
worker_processes 4; | |
# [ debug | info | notice | warn | error | crit ] | |
error_log /var/log/nginx/error.log warn; | |
events { | |
worker_connections 1024; |
OlderNewer