mkdir /mnt/media/www/conf
ln -s /mnt/media/www/conf /etc/httpd/conf.d/local
/etc/httpd/conf.d/local.conf
include conf.d/local/*.conf semanage fcontext -a -t httpd_sys_content_t "/mnt/media/www(/.*)?" semanage fcontext -a -t httpd_config_t "/mnt/media/www/conf(/.*)?" restorecon -Rv /mnt/media/www /mnt/media/www/conf/vhost_default.conf <VirtualHost _default_:*> ServerAdmin webmaster@localhost DocumentRoot /mnt/media/www/vhosts/default/html/ ErrorLog logs/default-error_log TransferLog logs/default-access_log <Directory "/mnt/media/www/vhosts"> AllowOverride None # Allow open access: Require all granted </Directory> <Directory "/mnt/media/www/vhosts/default/html"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> </VirtualHost>
Simple pxeboot environment on a Fedora 15 system. This is useful if machines you are trying to build are on a network that cannot see the internet. My particular case is a home server which I want to setup from a place that doesn’t have cabling. I will move it into the cupboard that does have cabling when done but for the time being it is more convenient to set it up on the desk in my bedroom.
Configuration for libvirt to get serial and graphics working at the same time:
virt-install \ --name centos6_golden \ --ram 2048 \ --arch x86_64 \ --vcpus 4 \ --disk path=/var/lib/libvirt/images/centos6_golden.disk,format=qcow2,sparse=true,size=24,bus=virtio \ --location http://repos.example.com/repos/centos/6.4/os/x86_64/ \ --hvm \ --accelerate \ --nographics \ --os-type linux \ --os-variant virtio26 \ --extra-args 'acpi=force noipv6 console=tty0 console=ttyS0,115200 ks=http://repos.example.com/kickstarts/el6.ks ksdevice=52:54:00:A8:7A:0A ip=192.168.122.10 gateway=192.168.122.1 netmask=255.255.255.0 dns=192.168.122.1 ' \ --network bridge:br250 \ --mac 52:54:00:A8:7A:0A Serial console in GRUB:
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1 terminal --timeout=15 serial console Change the kernel command line to attach ttys in the right spots.
This is a simple VPN for those times when you want the ease of use of a VPN but only have a ssh server available.
Both servers need to have ssh configured to allow tunnels. You need to change the configs for ssh under /etc/ssh
Remote server sshd_config:
PermitTunnel yes Local server ssh_config:
Tunnel yes Remote server Setting up the tunnels requires you to use root when sshing.
This is just a simple script for doing a diff of two web pages.
#!/bin/bash TMP1=$(mktemp) TMP2=$(mktemp) wget -q $1 -O $TMP1 wget -q $2 -O $TMP2 diff $TMP1 $TMP2 rm -f $TMP1 $TMP2
I recently signed up for a small dedicated server at Kimsufi.co.uk for the grand price of £14 a month which I think is pretty good price for what you get.
Brand
Intel
Model
Celeron / Atom
Frequency
1.20+ GHz
Architecture
64 bits
NIC
The txqueuelen is a value in the kernel on network interfaces that sets the transmit queue length. This value can be tuned for different work loads. In the case of modern networking the defaults can sometimes be changed to get better line speeds over ethernet. Most people will do this using a rc.local command to set it on the physical ethX devices like this.
vim /etc/rc.local Add the following
Reverting to a previous snapshot has been possible for over a year!!!!! How did I miss that ?? This has for a long time been one of my only real criticisms of LVM and I just discovered that it was quietly committed into the kernel back in 2.6.33
The command used to do the revert is contained within lvconvert. From the lvconvert man page:
--merge Merges a snapshot into its origin volume.
I HATE THE CAPS_LOCK KEY!!!! I don’t like it when people send me messages with full caps and I don’t like accidentally pressing it and then sending messages to other people who then think I am yelling at them. It also wastes too much keyboard space and is in an easy place to accidentally hit. Time to get rid of it.
The following method is for Fedora 15 but will probably work on other Gnome 3 systems.
This is quite handy to know if you need to create a new network bond on a live system without disrupting traffic.
First of all create your bond configs in the normal way so that in the event of a reboot it will come back up working. See the Redhat documentation for how to do it in RHEL6.
Now because we cannot just restart the networking to bring that up we need to construct it by hand.