Last active
November 22, 2016 19:01
-
-
Save romanblanco/00df8d0feddb0a7c1b2a8db88d45f61a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://manageiq.org/documentation/development/developer_setup/ | |
___ | |
# Ubuntu | |
sudo apt-get install ruby | |
sudo apt-get install git | |
sudo apt-get install memcached | |
sudo atp-get install postgresql libpq-dev | |
sudo apt-get install bzip2 libffi-dev libreadline-dev | |
sudo apt-get install libxml2-dev libxslt-dev patch | |
sudo apt-get install libsqlite-dev | |
sudo apt-get install nodejs nodejs-legacy npm | |
sudo apt-get install libcurl4-gnutls-dev | |
sudo apt-get install cmake | |
sudo apt-get install libgit2-dev pkg-config | |
sudo apt-get install g++ | |
sudo apt-get install libsqlite3-dev | |
sudo npm install -g npm | |
sudo npm install -g bower yarn gulp-cli webpack | |
sudo systemctl enable memcached | |
sudo systemctl start memcached | |
# ↑ will ask to choose a password | |
sudo grep -q '^local\s' /etc/postgresql/9.5/main/pg_hba.conf || echo "local all all trust" | sudo tee -a /etc/postgresql/9.5/main/pg_hba.conf | |
sudo sed -i.bak 's/\(^local\s*\w*\s*\w*\s*\)\(peer$\)/\1trust/' /etc/postgresql/9.5/main/pg_hba.conf | |
sudo systemctl restart postgresql | |
sudo su postgres -c "psql -c \"CREATE ROLE root SUPERUSER LOGIN PASSWORD 'smartvm'\"" | |
# ↑ type the password you chose above | |
git clone https://github.com/sstephenson/rbenv.git .rbenv | |
git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
~/.rbenv/bin/rbenv init | |
echo "eval \"\$(rbenv init -)\"" >> ~/.bashrc | |
exit # restart your shell so that PATH changes take effect | |
rbenv install 2.3.1 | |
rbenv global 2.3.1 | |
git clone https://github.com/ManageIQ/manageiq.git | |
cd manageiq | |
bin/setup | |
___ | |
# Fedora | |
# instalace systemovych balicku | |
``` | |
sudo dnf -y install \ | |
memcached \ | |
postgresql-devel postgresql-server \ | |
bzip2 libffi-devel readline-devel \ | |
libxml2-devel libxslt-devel patch \ | |
gcc-c++ \ | |
sqlite-devel \ | |
nodejs \ | |
openssl-devel \ | |
cmake | |
``` | |
# nastaveni memcached | |
``` | |
sudo systemctl enable memcached | |
sudo systemctl start memcached | |
``` | |
# nastaveni postgresql databaze | |
``` | |
sudo passwd postgres | |
## ↑ will ask to choose a password | |
sudo postgresql-setup initdb | |
sudo grep -q '^local\s' /var/lib/pgsql/data/pg_hba.conf || echo "local all all trust" | sudo tee -a /var/lib/pgsql/data/pg_hba.conf | |
sudo sed -i.bak 's/\(^local\s*\w*\s*\w*\s*\)\(peer$\)/\1trust/' /var/lib/pgsql/data/pg_hba.conf | |
sudo systemctl enable postgresql | |
sudo systemctl start postgresql | |
su postgres -c "psql -c \"CREATE ROLE root SUPERUSER LOGIN PASSWORD 'smartvm'\"" | |
## ↑ type the password you chose above | |
``` | |
# rbenv kvuli ruznym ruby verzim a bundler (sprava gemu) | |
``` | |
git clone https://github.com/sstephenson/rbenv.git .rbenv | |
git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build | |
## eval "$(rbenv init -)" do .bashrc | |
reset | |
rbenv install 2.3.1 | |
rbenv global 2.3.1 # prepnuti zpet `rbenv global 2.3.1` | |
gem install bundler | |
``` | |
# instalace boweru | |
``` | |
sudo npm install -g bower | |
``` | |
# naklonovani repozitare | |
``` | |
git clone [email protected]:<tvujnick>/manageiq.git | |
cd manageiq | |
git config user.name "<tvoje jmeno>" | |
git config user.email <tvuj email> | |
git remote add upstream [email protected]:ManageIQ/manageiq.git | |
git fetch upstream | |
``` | |
# priprava ke spusteni | |
``` | |
bin/setup | |
``` | |
# nahrani testovaci databaze | |
``` | |
sudo su - postgres | |
-bash-4.3$ psql | |
postgres=# DROP DATABASE vmdb_development; | |
postgres=# CREATE DATABASE vmdb_development OWNER root; | |
postgres=# \q | |
-bash-4.3$ cd backups | |
-bash-4.3$ wget http://file.brq.redhat.com/~rblanco/db_backups/vmdb_development_rblanco.sql | |
-bash-4.3$ psql vmdb_development < vmdb_development_rblanco.sql | |
logout | |
``` | |
# migrace databaze | |
``` | |
bundle exec rake db:migrate | |
``` | |
# spusteni | |
``` | |
bundle exec rails s -b [::] -p 3000 | |
``` |
himdel
commented
Nov 20, 2016
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment