Friday, December 30, 2011
start using git
$ sudo apt-get install git-core
$ git config –global user.name “YOUR NAME”
$ git config –global user.email “YOUR EMAIL”
$ git config –list
want to install Grails, Groov on Ununtu 11.04
Tuesday, December 13, 2011
install rvm on CentOS for aws ec2
$ bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ source ~/.bash_profile
$ yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison
888 sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison
$ $ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.6-head
[ruby-]1.8.7[-p352]
[ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431]
[ruby-]1.9.1-head
[ruby-]1.9.2-p180
[ruby-]1.9.2[-p290]
[ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3[-p0]
[ruby-]1.9.3-head
ruby-head
# GoRuby
goruby
# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby-1.6.1
jruby-1.6.2
jruby-1.6.3
jruby-1.6.4
jruby[-1.6.5]
jruby-head
# Rubinius
rbx-1.0.1
rbx-1.1.1
rbx-1.2.3
rbx-1.2.4
rbx[-head]
rbx-2.0.0pre
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2011.03]
ree-1.8.6-head
ree-1.8.7-head
# Kiji
kiji
# MagLev
maglev[-head]
maglev-1.0.0
# Mac OS X Snow Leopard Only
macruby[-0.10]
macruby-nightly
macruby-head
# IronRuby -- Not implemented yet.
ironruby-0.9.3
ironruby-1.0-rc2
ironruby-head
http://beginrescueend.com/rvm/install/
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ source ~/.bash_profile
$ yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison
888 sudo yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison
$ $ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.6-head
[ruby-]1.8.7[-p352]
[ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431]
[ruby-]1.9.1-head
[ruby-]1.9.2-p180
[ruby-]1.9.2[-p290]
[ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3[-p0]
[ruby-]1.9.3-head
ruby-head
# GoRuby
goruby
# JRuby
jruby-1.2.0
jruby-1.3.1
jruby-1.4.0
jruby-1.6.1
jruby-1.6.2
jruby-1.6.3
jruby-1.6.4
jruby[-1.6.5]
jruby-head
# Rubinius
rbx-1.0.1
rbx-1.1.1
rbx-1.2.3
rbx-1.2.4
rbx[-head]
rbx-2.0.0pre
# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2011.03]
ree-1.8.6-head
ree-1.8.7-head
# Kiji
kiji
# MagLev
maglev[-head]
maglev-1.0.0
# Mac OS X Snow Leopard Only
macruby[-0.10]
macruby-nightly
macruby-head
# IronRuby -- Not implemented yet.
ironruby-0.9.3
ironruby-1.0-rc2
ironruby-head
http://beginrescueend.com/rvm/install/
Friday, December 2, 2011
How to solve this problem: curl: (7) couldn't connect to host for cuuchDB
if you configure couchdb for CentOS.
please refer to http://opikanoba.org/linux/couchdb-centos6
if you ok for curl http://localhost:5984 but not for curl http://domainName:5984
change your bind IP in local.ini as follows
$ sudo vi /usr/local/etc/couchdb/local.ini
change bind 127.0.0.1 to bind 0.0.0.0
please refer to http://opikanoba.org/linux/couchdb-centos6
if you ok for curl http://localhost:5984 but not for curl http://domainName:5984
change your bind IP in local.ini as follows
$ sudo vi /usr/local/etc/couchdb/local.ini
change bind 127.0.0.1 to bind 0.0.0.0
Thursday, November 24, 2011
add swap on AWS EC2 for CentOS
To add 512MB swap for example:
$ sudo dd if=/dev/zero of=/usr/swap0 bs=1M count=512
$ mkswap /usr/swap0
$ sudo swapon /usr/swap0
To use "top" command, you can see the swap is on.
To make it available on restart. Add following line to the end of your /etc/fstab file
/usr/swap0 swap swap defaults 0 0
$ sudo dd if=/dev/zero of=/usr/swap0 bs=1M count=512
$ mkswap /usr/swap0
$ sudo swapon /usr/swap0
To use "top" command, you can see the swap is on.
To make it available on restart. Add following line to the end of your /etc/fstab file
/usr/swap0 swap swap defaults 0 0
Monday, November 14, 2011
install ejabberd on CentOS for EC2 server
1. download and install ejabberd
$ git clone git://git.process-one.net/ejabberd/mainline.git ejabberd
$ cd ejabberd
$ git checkout -b 2.1.x origin/2.1.x
$ cd src
$ ./configure
$ make
$ sudo make install
if you miss expat package,
$ wget http://fossies.org/unix/www/expat-2.0.1.tar.gz
$ gzip -d expat-2.0.1.tar.gz
$ tar xvf expat-2.0.1.tar
$ ./configure
$ make
$ sudo make install
$ sudo ejabberdctl start
$ sudo ejabberdctl status
to make sure ejabberd is installed successfully.
1.1 make a script file in /etc/init.d
$ cd src
$ sudo cp ejabberd.init /etc/init.d/ejabberd
$ cd /etc/rc2.d (and rc3.d, rc4.d, rc5.d, rc6.d
$ ln -s ../init.d/ejabberd S97ejabberd
$ cd /etc/rc0.d (and rc1.d)
$ ln -s ../init.d/ejabberd K87ejabberd
2. configuration
$ cd /etc
$ sudo vi ejabberd/ejabberd.cfg
add your domain name in the configuration file, such as
{hosts, ["url0.info", "localhost"]}.
3. register an user account
$ ejabberdctl register USERNAME DOMAINNAME PASSWORD
for example:
$ ejabberdctl register admin url0.info passwd
4. start the server
$ cd /etc/init.d
$ sudo ./ejabberd start
make sure the server process is keep running.
$ ps -ef | grep ejabberd root 1341 1 4 08:45 ? 00:00:00 /usr/local/lib/erlang/erts-5.8.3/bin/beam -K true -P 250000 -- -root /usr/local/lib/erlang -progname erl -- -home //var/lib/ejabberd -- -sname ejabberd@localhost -noshell -noinput -noshell -noinput -pa //lib/ejabberd/ebin -mnesia dir "//var/lib/ejabberd" -kernel inet_dist_use_interface {127,0,0,1} -s ejabberd -sasl sasl_error_logger {file,"//var/log/ejabberd/erlang.log"} -smp auto start
or
$ sudo ejabberdctl status
The node ejabberd@localhost is started with status: started ejabberd 2.1.x is running in that node
5. testing
$ epmd -names
epmd: up and running on port 4369 with data: name ejabberd at port 59502
$ sudo netstat -tpan | grep "beam\|epmd"
tcp 0 0 127.0.0.1:59502 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 1131/epmd
tcp 0 0 0.0.0.0:5269 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 0.0.0.0:5280 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 10.146.47.148:59840 0.0.0.0:* LISTEN 965/beam
tcp 0 0 0.0.0.0:5222 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 127.0.0.1:4369 127.0.0.1:52165 ESTABLISHED 1131/epmd
tcp 0 0 10.146.47.148:5280 210.71.153.52:49533 ESTABLISHED 1341/beam
tcp 0 0 127.0.0.1:52165 127.0.0.1:4369 ESTABLISHED 1341/beam
6. open your TCP ports in your Security Groups for the ports you use for xmpp server or web binding.
such as 5280, 5222 and 59502 (custom TCP ports).
7. open web page from your browser, such as
http://url0.info:5280/admin
you need to login with your admin user name and password, which you create one in step 3.
8. Good reference for testing server: http://lists.jabber.ru/pipermail/ejabberd/2007-October/003186.html
$ git clone git://git.process-one.net/ejabberd/mainline.git ejabberd
$ cd ejabberd
$ git checkout -b 2.1.x origin/2.1.x
$ cd src
$ ./configure
$ make
$ sudo make install
if you miss expat package,
$ wget http://fossies.org/unix/www/expat-2.0.1.tar.gz
$ gzip -d expat-2.0.1.tar.gz
$ tar xvf expat-2.0.1.tar
$ ./configure
$ make
$ sudo make install
$ sudo ejabberdctl start
$ sudo ejabberdctl status
to make sure ejabberd is installed successfully.
1.1 make a script file in /etc/init.d
$ cd src
$ sudo cp ejabberd.init /etc/init.d/ejabberd
$ cd /etc/rc2.d (and rc3.d, rc4.d, rc5.d, rc6.d
$ ln -s ../init.d/ejabberd S97ejabberd
$ cd /etc/rc0.d (and rc1.d)
$ ln -s ../init.d/ejabberd K87ejabberd
2. configuration
$ cd /etc
$ sudo vi ejabberd/ejabberd.cfg
add your domain name in the configuration file, such as
{hosts, ["url0.info", "localhost"]}.
3. register an user account
$ ejabberdctl register USERNAME DOMAINNAME PASSWORD
for example:
$ ejabberdctl register admin url0.info passwd
4. start the server
$ cd /etc/init.d
$ sudo ./ejabberd start
make sure the server process is keep running.
$ ps -ef | grep ejabberd root 1341 1 4 08:45 ? 00:00:00 /usr/local/lib/erlang/erts-5.8.3/bin/beam -K true -P 250000 -- -root /usr/local/lib/erlang -progname erl -- -home //var/lib/ejabberd -- -sname ejabberd@localhost -noshell -noinput -noshell -noinput -pa //lib/ejabberd/ebin -mnesia dir "//var/lib/ejabberd" -kernel inet_dist_use_interface {127,0,0,1} -s ejabberd -sasl sasl_error_logger {file,"//var/log/ejabberd/erlang.log"} -smp auto start
or
$ sudo ejabberdctl status
The node ejabberd@localhost is started with status: started ejabberd 2.1.x is running in that node
5. testing
$ epmd -names
epmd: up and running on port 4369 with data: name ejabberd at port 59502
$ sudo netstat -tpan | grep "beam\|epmd"
tcp 0 0 127.0.0.1:59502 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 1131/epmd
tcp 0 0 0.0.0.0:5269 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 0.0.0.0:5280 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 10.146.47.148:59840 0.0.0.0:* LISTEN 965/beam
tcp 0 0 0.0.0.0:5222 0.0.0.0:* LISTEN 1341/beam
tcp 0 0 127.0.0.1:4369 127.0.0.1:52165 ESTABLISHED 1131/epmd
tcp 0 0 10.146.47.148:5280 210.71.153.52:49533 ESTABLISHED 1341/beam
tcp 0 0 127.0.0.1:52165 127.0.0.1:4369 ESTABLISHED 1341/beam
6. open your TCP ports in your Security Groups for the ports you use for xmpp server or web binding.
such as 5280, 5222 and 59502 (custom TCP ports).
7. open web page from your browser, such as
http://url0.info:5280/admin
you need to login with your admin user name and password, which you create one in step 3.
8. Good reference for testing server: http://lists.jabber.ru/pipermail/ejabberd/2007-October/003186.html
Tuesday, November 8, 2011
how to install Expat library on aws ec2 CentOS server.
how to install Expat library on aws ec2 CentOS server.
1. download the source code from http://fossies.org/unix/www/expat-2.0.1.tar.gz
2. gzip -d expat-2.0.1.tar.gz
3. tar xvf expat-2.0.1.tar
4. cd expat-2.0.1
5. ./configure
6. make
7. sudo make install
It's a requirement for build openfire on CentOS for a xmpp (jabber) server.
1. download the source code from http://fossies.org/unix/www/expat-2.0.1.tar.gz
2. gzip -d expat-2.0.1.tar.gz
3. tar xvf expat-2.0.1.tar
4. cd expat-2.0.1
5. ./configure
6. make
7. sudo make install
It's a requirement for build openfire on CentOS for a xmpp (jabber) server.
Monday, October 31, 2011
Subscribe to:
Posts (Atom)

