Last active
December 16, 2015 11:49
-
-
Save jackbit/5430417 to your computer and use it in GitHub Desktop.
Cara Install Rails dari Awal
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
LINUX USER | |
-------------------- | |
Langkah 1: Install dependency libraries | |
$ sudo apt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev | |
Langkah 2: | |
Tambahkan user baru jangan gunakan root untuk production: | |
useradd -m -d /home/new_user -s /bin/bash -g staff new_user | |
Kemudian Ikuti langkah diweb berikut untuk membuat ssh-key agar bisa terhubung dengan github | |
https://help.github.com/articles/generating-ssh-keys | |
Langkah 3: Install ruby by rbenv | |
$ curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
atau lihat (untuk multi user) | |
https://github.com/rinrinne/install-shared-rbenv | |
sudo usermod -a -G staff <some_user> | |
sudo chgrp -R staff /usr/local/rbenv | |
sudo chmod -R g+w /usr/local/rbenv | |
Langkah 4: | |
pilih ruby yang ingin di install, untuk melihat daftar ruby yang bisa di install, ketik/jalankan perintah di bawah ini. | |
$ rbenv install -l | |
Langkah 5: | |
misalkan kita akan menginstall ruby versi 1.9.3-p392 maka perintah yang di jalankan adalah | |
$ rbenv install 1.9.3-p392 | |
Langkah 6: | |
setelah proses selesai. Atur ruby untuk dipakai secara global dengan menjalan perintah. | |
$ rbenv global 1.9.3-p392 | |
Langkah 7: | |
$ gem install bundler | |
$ gem install rails -v=3.2.12 | |
WINDOWS USER | |
------------------- | |
railsinstaller.org | |
MAC OS | |
-------------------- | |
Langkah 1: | |
Download dan install library berikut: | |
https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg | |
Langkah 2: | |
Install Homebrew: | |
https://github.com/mxcl/homebrew/wiki/installation | |
Langkah 3: | |
Install Git | |
$ brew install git | |
Langkah 4: | |
Ikutit langkah ke-3 sampai 7 dari Linux User diatas | |
------------------- | |
INSTALL MYSQL | |
------------------ | |
apt-get install mysql-client mysql-sever | |
if you are not asked for entering root password, please change root password by following steps: | |
sudo /etc/init.d/mysql stop | |
sudo mysqld --skip-grant-tables & | |
mysql -u root mysql | |
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit; | |
/etc/init.d/mysql stop | |
/etc/init.d/mysql start | |
Then add new user: | |
mysql -u root -p | |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; | |
FLUSH PRIVILEGES; | |
exit | |
------------------- | |
INSTALL NGINX | |
------------------- | |
https://github.com/pagespeed/ngx_pagespeed | |
-------------------- | |
UNINSTALL APACHE | |
-------------------- | |
sudo service apache2 stop | |
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common | |
sudo apt-get autoremove | |
whereis apache2 | |
sudo rm -rf /etc/apache2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment