# Percona

## Install thru apt-get

* Debian and Ubuntu packages from Percona are signed with a key so
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A

* Add the sources to /etc/apt/sources.list
deb http://repo.percona.com/apt <YOUR_DIST_CODENAME> main
deb-src http://repo.percona.com/apt <YOUR_DIST_CODENAME> main

> $ lsb_release -c --> This can tell you the dist codename

* $ sudo apt-get update

* sudo apt-get install percona-server-server-x.x percona-server-client-x.x

> Ref:
* https://www.digitalocean.com/community/tutorials/how-to-install-a-fresh-percona-server-or-replace-mysql
* https://www.percona.com/doc/percona-server/5.5/installation/apt_repo.html

# rbenv and ruby-build

## Install rbenv

* $ cd ~

* $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

* Add ~/.rbenv/bin to your $PATH plus init each time

+ $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/<YOUR_BASH_ENV_FILE>
+ $ echo 'eval "$(rbenv init -)"' >> ~/<YOUR_BASH_ENV_FILE>

> YOUR_BASH_ENV_FILE = Ubuntu ? .bahrc : .bash_profile
http://rubyonrails.org/download/
* Restart the terminal or reload your enviroment

* $ type rbenv --> Check if works

> Ref: https://github.com/sstephenson/rbenv#basic-github-checkout

## Install ruby-build

* Install the latest development version of ruby-build into the ~/.rbenv/plugins/ruby-build directory
+ $ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

## Install your ruby version

* Check out the availabel ruby versions

+ $ rbenv install -l

* $ rbenv install <RUBY_VERSION>

## Manage your ruby

* $ rbenv global <RUBY_VERSION>

+ This sets the global version to the ~/.rbenv/version file

* $ rbenv local <RUBY_VERSION>
http://rubyonrails.org/download/
+ This sets the local app-specific version to the local .rbenv-version file

+ $ rbenv local --unset --> If you want unset

+ The local overrides the global

+ If meet the error of The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

Try $ apt-get install libssl-dev --> It installs the dev ssl. Maybe you get openssl already but it does the trick

> Ref: https://github.com/sstephenson/ruby-build/issues/377

* $ rbenv shell <RUBY_VERSION>

+ This sets the shell-specific version to the RBENV_VERSION variable

+ $ rbenv shell --unset --> If you want unset

+ The shell overrides all

* $ which ruby --> If fine, should see /home/YOUR_ACCOUNT/.rbenv/shims/ruby

# Rails

## Installation

* $ gem install rails

## Simple start

* $ rails new <PATH_TO_YOUR_APP>

* $ cd <PATH_TO_YOUR_APP>

* $ rails server

> Ref: http://rubyonrails.org/download/

# Redis

## Installation

* $ wget http://download.redis.io/redis-stable.tar.gz

* $ tar xvzf redis-stable.tar.gz

* $ cd redis-stable

* $ make

> Ref: http://redis.io/topics/quickstart

## Quick start Redis

* $ redis-server

## Work with redis-cli

* $ ~redis-stable/src/redis-cli

> Ref: http://redis.io/topics/quickstart

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Foxbrush 的頭像
    Foxbrush

    Foxbrush

    Foxbrush 發表在 痞客邦 留言(0) 人氣()