Skip to content

Instantly share code, notes, and snippets.

@jcpowermac
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save jcpowermac/d89556bf29ead1dbde9b to your computer and use it in GitHub Desktop.

Select an option

Save jcpowermac/d89556bf29ead1dbde9b to your computer and use it in GitHub Desktop.
yum install http://mirror.sfo12.us.leaseweb.net/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
yum install mongodb-server mongodb -y
systemctl restart mongod.service
systemctl start tomcat.service
yum install tomcat tomcat-admin-webapps
vi /etc/tomcat/tomcat-users.xml
systemctl status tomcat
systemctl start tomcat
systemctl list-unit-files
systemctl start mongod.service
systemctl enable mongod.service
systemctl enable tomcat
yum install tftp-server -y
vi /etc/xinetd.d/tftp
systemctl start xinetd.service
systemctl enable xinetd.service
yum install -y git patch make gcc-c++ gcc tftp-server tftp curl binutils perl syslinux genisoimage bison libffi-devel libtool readline-devel libyaml-devel openssl-devel krb5-devel keyutils-libs-devel libcom_err-devel zlib-devel libyaml ncurses-devel libselinux-devel libsepol-devel automake autoconf dhc
cd /var/lib/tftpboot/
mkdir -p /var/lib/tftpboot/pxelinux.cfg
cat > /var/lib/tftpboot/pxelinux.cfg/default <<EOF
default menu.c32
prompt 0
menu title Hanlon Boot Menu
timeout 50
f1 help.txt
f2 version.txt
label hanlon-boot
menu label Automatic hanlon Node Boot
kernel ipxe.lkrn
initrd hanlon.ipxe
label boot-else
menu label Bypass hanlon
localboot 1
EOF
cd ~
wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.gz
tar -zxvf syslinux-6.02.tar.gz --strip-components 3 -C /var/lib/tftpboot syslinux-6.02/bios/core/pxelinux.0
tar -zxvf syslinux-6.02.tar.gz --strip-components 4 -C /var/lib/tftpboot syslinux-6.02/bios/com32/menu/menu.c32
yum search ipxe
git clone https://github.com/ipxe/ipxe.git
curl -O https://gist.githubusercontent.com/jcpowermac/7cc13ce51816ce5222f4/raw/4384911a921a732e0b85d28ff3485fe18c092ffd/image_comboot.patch
patch -p0 < image_comboot.patch
cd ipxe/src
make
cp ipxe/src/bin/undionly.kpxe /var/lib/tftpboot/undionly.kpxe
cp ipxe/src/bin/ipxe.pxe /var/lib/tftpboot/ipxe.kpxe
cp ipxe/src/bin/ipxe.iso /var/lib/tftpboot/ipxe.iso
restorecon -Rv /var/lib/tftpboot/
vi /etc/xinetd.d/tftp
chown -R root:root /var/lib/tftpboot/
chmod -R 755 /var/lib/tftpboot/
useradd -m jcallen
vi /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
mkdir -p /opt/hanlon/image
chown -R /opt/hanlon
chown -R tomcat:tomcat /opt/hanlon
cd /opt/hanlon
wget http://centos.mirrors.tds.net/pub/linux/centos/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso
chown tomcat:users CentOS-6.5-x86_64-minimal.iso
### END HERE ###
top
history
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
systemctl restart tomcat.service
vi /etc/tomcat/server.xml
systemctl restart tomcat.service
cd /opt/hanlon/
ls
cd image/
ls
cd os/
ls
cd 52FiHGN16401mRpfnIg7a0/
ls
find . -name kickstart
find . -name kickstart*
find . -name "kickstart"
find . -name "kickstart*"
cd /
find . -name "kickstart*"
cd /opt/hanlon/image/
ls
cd os/
ls
cd 52FiHGN16401mRpfnIg7a0/
ls
cd ~
ls
history
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
systemctl restart tomcat.service
top
ls
cd /opt/hanlon/image/os/52FiHGN16401mRpfnIg7a0/
ls
find . -name "*.img"
cd isolinux/
ls
zcat
zcat initrd.img | cpio -it
yum search zcat
zcat --help
file initrd.img
ls
xzcat initrd.img
clear
xzcat initrd.img | cpio -it
xzcat initrd.img | cpio -it | grep cciss
xzcat initrd.img | cpio -it | grep hpsa
cd /var/lib/tomcat/webapps/
ls
cd h
cd hanlon/WEB-INF/config/
ls
cp hanlon_server.conf ~
cd /
cd ~
ls
history | grep cp
systemctl stop tomcat
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
systemctl start tomcat
cd /opt/
ls
cd hanlon/
ls
cd image/
ls
cd mk/
ls
cd ..
ls
cd ..
ls
cd /var/log/
ls
cd tomcat/
ls
tail catalina.out
touch /var/lib/tomcat/webapps/hanlon/WEB-INF/log/project_hanlon.log
ls
cd /var/lib/tomcat/webapps/hanlon/WEB-INF/
ls
mkdir -p log
touch /var/lib/tomcat/webapps/hanlon/WEB-INF/log/project_hanlon.log
pwd
cd log/
ls
ls -alh
cd ..
chown -R tomcat:tomcat log/
systemctl stop tomcat
top
systemctl start tomcat
top
ls
cd log/
ls
tail project_hanlon.log
ls -alh
top
iotop
yum install iotop
ls
cd /var/lib/tomcat/webapps/hanlon/
ls
cd WEB-INF/
ls
cd config/
ls
cat hanlon_server.conf
vi hanlon_server.conf
cp ~/hanlon_server.conf .
systemctl restart tomcat
top
systemctl stop tomcat
mongo
systemctl start tomcat
mongo
top
mongo
cd /opt/hanlon/
ls
cd image/
ls
rm -Rf
ls
rm -Rf *
top
ls
cd ..
ls
wget https://www.dropbox.com/s/ks1p94j7cdrna7i/hnl_mk_debug-image.1.0%2B1-gde0b0fc.iso?dl=0
ls
mv hnl_mk_debug-image.1.0+1-gde0b0fc.iso\?dl\=0 hnl_mk_debug-image.1.0+1-gde0b0fc.iso
ls
vi /var/lib/tftpboot/hanlon.ipxe
systemctl restart xinetd.service
chown tomcat:users /opt/hanlon/hnl_mk_debug-image.1.0+1-gde0b0fc.iso
cd /var/log/
ls
cd tomcat/
ls
grep hanlon catalina.out
cd /var/lib/tomcat/webapps/
ls
cd h
cd hanlon/
ls
cd WEB-INF/
l
ls
cd log/
ls
vi project_hanlon.log
vi /var/lib/tftpboot/hanlon.ipxe
systemctl restart xinetd.service
vi /var/lib/tftpboot/hanlon.ipxe
systemctl restart xinetd.service
vi /var/lib/tftpboot/hanlon.ipxe
vi /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
systemctl restart tomcat.service
top
ls
history
vi /var/lib/tomcat/webapps/hanlon/WEB-INF/config/hanlon_server.conf
systemctl restart tomcat.service
top
ls
cp hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config/
ls -alh
cd /var/lib/tomcat/webapps/hanlon/WEB-INF/config/
ls
ls -alh
systemctl restart tomcat.service
top
cd /var/log/
ls
cd tomcat/
ls
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
history
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
history
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl start tomcat
top
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
mongodb project_hanlon
mongo project_hanlon
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
mongo project_hanlon
systemctl restart tomcat.service
top
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
mongo project_hanlon
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
systemctl restart tomcat.service
top
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
top
history
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
mongo project_hanlon
systemctl restart mongod.service
ps- ef
ps -ef
systemctl restart tomcat.service
top
curl -g 'http://10.53.252.253:8080/hanlon/v1/boot?uuid=4237602D-90D3-BEDD-11A7-93F83AE08E69&dhcp_mac=01-00-50-56-b7-96-5d'
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
cd /var/lib/tomcat/webapps/hanlon/
ls
cd WEB-INF/
ls
cd log/
ls
vi project_hanlon.log
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
top
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
systemctl restart tomcat.service
cp ~/hanlon_server.conf /var/lib/tomcat/webapps/hanlon/WEB-INF/config
:sys
systemctl restart tomcat.service
top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment