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
#pgpool installation | |
yum localinstall -y http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-redhat93-9.3-1.noarch.rpm | |
yum install -y pgpool-II-93 postgresql93 | |
scp -r cz01-psql01.example.com:/root/{.ssh,.pgpass} /root/ | |
scp cz01-psql01.example.com:/root/.pgpass /root/ | |
cp /etc/pgpool-II-93/pcp.conf.sample /etc/pgpool-II-93/pcp.conf | |
echo "admin:`pg_md5 password123`" >> /etc/pgpool-II-93/pcp.conf |
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
tmsh create sys application service dns-ext-vip1_53 { \ | |
description "DNS VIP - External - NS1 53" \ | |
strict-updates disabled \ | |
tables add { \ | |
vs_pool__members { \ | |
column-names { addr port conn_limit } \ | |
rows { \ | |
{ row { 10.0.1.10 53 0 } } \ | |
{ row { 10.0.1.20 53 0 } } \ | |
} \ |
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
tmsh create sys application service ds-vip_389 { \ | |
description "Directory Server VIP 389" \ | |
strict-updates disabled \ | |
lists add { irules__irules { } } \ | |
tables add { \ | |
vs_pool__pool_members { \ | |
column-names { addr port conn_limit } \ | |
rows { \ | |
{ row { 10.0.0.150 389 0 } } \ | |
{ row { 10.0.0.151 389 0 } } \ |
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
tmsh create sys application service https-vip_443 { \ | |
description "HTTPS Server VIP 443" \ | |
strict-updates disabled \ | |
tables add { \ | |
pool__hosts { \ | |
column-names { name } \ | |
rows { { row { config.cloud.example.com } } } \ | |
} \ | |
pool__members { \ | |
column-names { addr port_secure connection_limit } \ |
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
# Turn OFF Firewall | |
chkconfig firewalld off | |
service firewalld stop | |
echo "192.168.122.46 centos7-client.ec.example.com centos7-client" >> /etc/hosts | |
# Change DNS server to 192.168.122.247 (ad.example.com) | |
cat >> /etc/dhcp/dhclient-eth0.conf << EOF | |
supersede domain-name-servers 192.168.122.247; |
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
#Download the nodosplash compiled for Turris router (mpc85xx) [if it's not already in the "main repository"] | |
curl -L --insecure "https://github.com/ruzickap/linux.xvx.cz/raw/gh-pages/files/turris_configured/root/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk" -O /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk | |
#Install the package (try first: opkg install nodogsplash) | |
opkg install /tmp/nodogsplash_0.9_beta9.9.8-2_mpc85xx.ipk | |
#Backup the original config file | |
mv /etc/nodogsplash/nodogsplash.conf /etc/nodogsplash/nodogsplash.conf-orig | |
#Create main config file |
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
@echo Change DNS to AD server | |
netsh interface ipv4 add dnsserver "Local Area Connection" address=192.168.122.247 index=1 | |
@echo Change TimeZone | |
tzutil /s "Central Europe Standard Time" | |
@echo Configure NTP server | |
net start w32time | |
w32tm /config /manualpeerlist:"ntp.cesnet.cz" /reliable:yes /update |
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
@echo Change TimeZone | |
tzutil /s "Central Europe Standard Time" | |
@echo Configure NTP server | |
net start w32time | |
w32tm /config /manualpeerlist:"ntp.cesnet.cz" /reliable:yes /update | |
@echo Change hostname | |
powershell -NoProfile -command "$sysInfo = Get-WmiObject -Class Win32_ComputerSystem; $sysInfo.Rename('ad');" |
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
:: Tested on Windows 7 | |
echo on | |
rem for /f "tokens=3" %%i in ('netsh interface ip show addresses "Local Area Connection" ^|findstr IP.Address') do set IP=%%i | |
rem for /f "tokens=2 delims=. " %%j in ('nslookup %IP% ^|find "Name:"') do set HOSTNAME=%%j | |
@echo. | |
@echo Enable Administrator |
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 -x | |
URL="http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/bin/virtio-win-0.1-65.iso" | |
ISO=`basename $URL` | |
sudo rm autostart.iso | |
wget --continue $URL | |
sudo mount -o loop ./$ISO /mnt/iso |