#version=DEVEL # System authorization information auth --enableshadow --passalgo=sha512 # Use network installation url --url="http://repos.sopnet.com.ar/centos/7/os/x86_64" # Use graphical install text # Run the Setup Agent on first boot firstboot --enable ignoredisk --only-use=sda # Keyboard layouts keyboard --vckeymap=es --xlayouts='es' # System language lang en_US.UTF-8 selinux --disabled eula --agreed reboot # Network information #network --bootproto=dhcp --device=eth0 --ipv6=auto --activate #network --bootproto=dhcp --device=eth1 --ipv6=auto --activate #network --bootproto=dhcp --device=eth2 --onboot=off --ipv6=auto network --hostname=localhost.localdomain # Root password rootpw --iscrypted $6$Y7fVuKltizRAc6ja$2W/IDo.LGGsrX8nh4j4FCLz95XYx54CGSXDlg0kABis4St4dq/a/YmdbzjbpTMTWzcPfxKJtPGaqMKExz4vfs1 # System timezone timezone America/Argentina/Buenos_Aires --isUtc user --name=vboxuser --password=$6$UJW2sBS62wNbOL9b$nQxyUHQjjI4t15.sXglpOSsHJTEwQZCToR81zBFajufJr2q9EZBrMitI/7lnmXXhJaZ47SrZb8xEmhxBxnxId/ --iscrypted --gecos="VirtualBoxUser" # System bootloader configuration bootloader --location=mbr --boot-drive=sda # Partition clearing information clearpart --all --initlabel --drives=sda # Disk partitioning information part swap --fstype="swap" --ondisk=sda --size=8000 part /boot --fstype="ext4" --ondisk=sda --size=2048 part / --fstype="ext4" --ondisk=sda --size=100 --grow %packages @^minimal @core @Development Tools httpd mod_ssl psmisc net-tools mc nano wget binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel #dkms php php-devel php-common php-soap php-gd SDL tcpdump %end %addon com_redhat_kdump --disable --reserve-mb='auto' %end %post /bin/echo Port 9559 >>/etc/ssh/sshd_config /bin/echo "NOZEROCONF=yes" >> /etc/sysconfig/network /sbin/chkconfig firewalld off /sbin/chkconfig NetworkManager off /sbin/chkconfig network on /sbin/chkconfig httpd on /bin/sed -i 's/^mirrorlist/#mirrorlist/g;s/#baseurl/baseurl/g;s/mirror.centos.org/repos.sopnet.com.ar/g' /etc/yum.repos.d/CentOS-Base.repo /usr/bin/yum -y update --exclude=kernel* /usr/bin/yum -y update /bin/cat >/etc/default/virtualbox << __EOF__ VBOXWEB_USER=vboxuser VBOXAUTOSTART_DB=/etc/vbox VBOXAUTOSTART_CONFIG=/etc/vbox/vboxauto.cfg __EOF__ /bin/cat >/etc/yum.repos.d/virtualbox.repo << __EOF__ [virtualbox] name=Oracle Linux / RHEL / CentOS-\$releasever / \$basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/el/\$releasever/\$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc __EOF__ /bin/mkdir /root/bin /bin/cat >/root/bin/instalarvb.sh << __EOF__ #!/bin/bash yum -y install VirtualBox-5.1 /usr/lib/virtualbox/vboxdrv.sh setup usermod -a -G vboxusers vboxuser wget 'http://sourceforge.net/projects/phpvirtualbox/files/latest/download' -O /tmp/phpvb.zip unzip /tmp/phpvb.zip -d /var/www/html mv /var/www/html/phpvirtualbox-* /var/www/html/phpvb cp -pf /var/www/html/phpvb/config.php-example /var/www/html/phpvb/config.php sed -i "s/var..username.*/var \\\$username = \'vboxuser\';/g" /var/www/html/phpvb/config.php sed -i "s/var..password.*/var \\\$password = \'s0pn3t+\';/g" /var/www/html/phpvb/config.php ver=\`rpm -qa VirtualBox-*|sed 's/_el.*//g;s/.*-//g'\` v1=\`echo \$ver|sed 's/_.*//g'\` v2=\`echo \$ver|sed 's/.*_//g'\` pushd /tmp extpack=Oracle_VM_VirtualBox_Extension_Pack-\$v1-\$v2.vbox-extpack wget http://download.virtualbox.org/virtualbox/\$v1/\$extpack -O \$extpack VBoxManage extpack install \$extpack service vboxweb-service restart popd __EOF__ chmod 700 /root/bin/instalarvb.sh %end