Skip to content

Instantly share code, notes, and snippets.

@psachin
Last active January 3, 2017 10:52
Show Gist options
  • Save psachin/85c3b6141bd05a20bd82b5191f89e28f to your computer and use it in GitHub Desktop.
Save psachin/85c3b6141bd05a20bd82b5191f89e28f to your computer and use it in GitHub Desktop.
ManageIQ on Fedora(single script setup)
# Single script to setup ManageIQ development environment on Fedora
# Usage:
# - It is recommended to have fresh(and dedicated) Fedora installation
# - Download THIS script and execute using the command
# ~~~
# bash setup_manageiq_fedora.sh
# ~~~
# Tested on Fedora 24, 25
hostnamectl set-hostname ManageIQ
dnf install -y emacs \
git-all \
memcached \
postgresql-devel \
postgresql-server \
bzip2 \
libffi-devel \
readline-devel \
libxml2-devel \
libxslt-devel \
patch \
sqlite-devel \
nodejs \
gcc-c++ \
libcurl-devel \
npm \
openssl-devel \
cmake
npm install -g bower
systemctl enable memcached
systemctl start memcached
postgresql-setup initdb
grep -q '^local\s' /var/lib/pgsql/data/pg_hba.conf || echo "local all all trust" | tee -a /var/lib/pgsql/data/pg_hba.conf
sed -i.bak 's/\(^local\s*\w*\s*\w*\s*\)\(peer$\)/\1trust/' /var/lib/pgsql/data/pg_hba.conf
systemctl enable postgresql
systemctl start postgresql
sudo -u postgres psql -c "CREATE ROLE root SUPERUSER LOGIN PASSWORD 'smartvm'"
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
pushd ~/.rbenv
src/configure
make -C src
popd
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'source ~/.bash_profile'
source ~/.bash_profile
type rbenv
# Add install command to rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
rbenv install -v 2.3.1
rbenv global 2.3.1
gem install bundler
git clone https://github.com/ManageIQ/manageiq.git
pushd manageiq
bin/setup
bundle exec rake evm:start
popd
firewall-cmd --zone=FedoraServer --add-port=3000/tcp --permanent
firewall-cmd --reload
# ManageIQ should be running on <IP address>:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment