centos

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

yum / rpm

# list installed packages
yum list installed

# get instaled version
rpm -qa --qf "%{version}-%{release}" openssl

CentOS

# show release
cat /etc/redhat-release

# update packages
yum update
yum upgrade -y

# allow sudo for a user
usermod -a -G wheel

# PHP 5.6 on CentOS 7
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html#instgde-prereq-php56-install-centos

# Nework configuration
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=00:11:22:33:12:8a
BOOTPROTO=static
NETMASK=255.255.255.0

https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-dhcp-configuring-client.html

# rundeck + ansible

Create CentOS 6 DomU

wget https://raw.githubusercontent.com/panticz/xen/master/domains/centos.6.sh -O - | bash -

#!/bin/bash

#
# IP    : dhcp
# user  : root
# pass  : t00r
#

#
# TODO
# use separate partitions for root (/dev/vg0/centos6-disk) and swap (/dev/vg0/centos6-swap) instead of harddisk image
#

# create disk
lvcreate --name centos6-disk --size 8G vg0

# download installation kernel and initrd
[ -d /tmp/centos6 ] || mkdir /tmp/centos6
wget -q http://mirror.netcologne.de/centos/6/os/x86_64/images/pxeboot/initrd.img -O /tmp/centos6/initrd.img
wget -q http://mirror.netcologne.de/centos/6/os/x86_64/images/pxeboot/vmlinuz -O /tmp/centos6/vmlinuz

# create installation configuration
cat <<EOF> /tmp/centos6-inst
kernel      = '/tmp/centos6/vmlinuz'
ramdisk     = '/tmp/centos6/initrd.img'
memory      = '512'
disk        = [ 'phy:/dev/vg0/centos6-disk,xvda,w' ]
name        = 'centos6-inst'
dhcp        = 'dhcp'
vif         = [ 'mac=00:00:00:00:ce:ce' ]
on_poweroff = 'destroy'
on_reboot   = 'destroy'
on_crash    = 'destroy'
extra       = "text ip=dhcp ks=http://preseed.panticz.de/preseed/centos6-minimal.cfg"
EOF

# install
xm create -c /tmp/centos6-inst

# create CenOS 6 configuration
cat <<EOF> /etc/xen/centos6
bootloader  = "/usr/lib/xen-4.1/bin/pygrub"
memory      = '512'
disk        = [ 'phy:/dev/vg0/centos6-disk,xvda,w' ]
name        = 'centos6'
dhcp        = 'dhcp'
vif         = [ 'mac=00:00:00:00:ce:ce' ]
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
EOF

# OPTIONAL: add to autostart
ln -s /etc/xen/centos6 /etc/xen/auto/centos6

# start CenOS 6
xm create -c centos6

Links
http://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-kickstart2-startinginstall.html

CentOS DomU under Debian Lenny Dom0

# new
http://www.panticz.de/DomU-CentOS-6
 
# xen-create-image + rinse
# http://serverfault.com/questions/347881/how-to-create-a-centos-xen-domu-on-debian-squeeze-using-xen-create-image
xen-create-image --hostname=foo.example.com --ip=1.2.3.4 --gateway=1.2.3.1 --netmask=255.255.255.0 --install-method=rinse --dist=centos-6 --mirror=http://mirror.centos.org/centos/5/os/x86_64/CentOS/ --arch=amd64 --lvm=vg0
 
xm create -c /etc/xen/foo.example.com.cfg
 
#
# OLD
#
 
# configure domU
DOMAIN_NAME=cenos6
DOMAIN_MAC=00:12:11:21:aa:bb
DOMAIN_RAM=1Gb
DOMAIN_HDD=8Gb
 
# create domU on LVM
Syndicate content