Skip to content

Instantly share code, notes, and snippets.

@matthewcosgrove
Last active February 11, 2019 12:19
Show Gist options
  • Select an option

  • Save matthewcosgrove/0f69102adda26af8a76d43f9ccddeec6 to your computer and use it in GitHub Desktop.

Select an option

Save matthewcosgrove/0f69102adda26af8a76d43f9ccddeec6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# login with an account in wheel group and clone this gist to run
# Tested on
# $[cosgrom@vps ~]$ cat /etc/redhat-release
# CentOS Linux release 7.6.1810 (Core)
# $ cat /etc/os-release
# NAME="CentOS Linux"
# VERSION="7 (Core)"
# ID="centos"
# ID_LIKE="rhel fedora"
# VERSION_ID="7"
# PRETTY_NAME="CentOS Linux 7 (Core)"
# ANSI_COLOR="0;31"
# CPE_NAME="cpe:/o:centos:centos:7"
# HOME_URL="https://www.centos.org/"
# BUG_REPORT_URL="https://bugs.centos.org/"
#
# CENTOS_MANTISBT_PROJECT="CentOS-7"
# CENTOS_MANTISBT_PROJECT_VERSION="7"
# REDHAT_SUPPORT_PRODUCT="centos"
# REDHAT_SUPPORT_PRODUCT_VERSION="7"
# $ uname -msr
# Linux 2.6.32-042stab129.1 x86_64
# Prereqs
# source: https://concourse-ci.org/install.html
# On Linux you'll need kernel v3.19 or later, with user namespace support enabled.
# So...
# https://www.howtoforge.com/tutorial/how-to-upgrade-kernel-in-centos-7-server
sudo yum -y update
sudo yum -y install yum-plugin-fastestmirror
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
sudo yum repolist
sudo yum --enablerepo=elrepo-kernel install kernel-ml
# oh dear No grub.cfg on centos 7https://unix.stackexchange.com/questions/400754/no-grub-cfg-on-centos-7
# 2.6 means that it's a virtual server. Which means that its boot kernel is probably outside your control
sudo awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
sudo grub2-set-default 0
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo reboot
# bosh cli centos dependencies
sudo yum install gcc gcc-c++ ruby ruby-devel mysql-devel postgresql-devel postgresql-libs sqlite-devel libxslt-devel libxml2-devel patch openssl
gem install yajl-ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment