Archive for April, 2014


nginx


# nginx installation
sudo useradd nginx
sudo yum instal pcre-devel
cd ~/Downloads
wget http://nginx.org/download/nginx-1.5.12.tar.gz
tar -xzvf nginx-1.5.12.tar.gz
cd nginx-1.5.12
./configure --prefix=/usr/local/nginx
make
sudo make install
sudo chown -R nginx:nginx /usr/local/nginx

postgres


# postgresql installation
cd ~/Downloads
wget http://ftp.postgresql.org/pub/source/v9.3.4/postgresql-9.3.4.tar.gz
tar -xzvf postgresql-9.3.4.tar.gz
cd postgresql-9.3.4
./configure --prefix=/usr/local/postgresql
make
make install
sudo createuser postgres
sudo passwd postgres
# initial database
mkdir /usr/local/postgresql/data
chown postgres:postgres -R /usr/local/postgresql/data
su - postgres
/usr/local/postgresql/bin/initdb -D /usr/local/postgresql/data/
# start postgresql
/usr/local/postgresql/bin/postmaster -D /usr/local/postgresql/data/ > postgresql.log 2>&1 &
cat postgresql.log
# create database
/usr/local/postgresql/bin/createdb testdb
/usr/local/postgresql/bin/psql testdb

elasticsearch

cd ~/Downloads/
wget http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
tar -xzvf jdk-7u51-linux-x64.tar.gz
sudo mv jdk1.7.0_51 /usr/local/.
sudo cp -si /usr/local/jdk1.7.0_51/bin/* /usr/local/bin/
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.tar.gz
tar -xzvf elasticsearch-1.1.0.tar.gz
sudo mv elasticsearch-1.1.0 /usr/local/.
sudo useradd elasticsearch
sudo chown -R elasticsearch:elasticsearch /usr/local/elasticsearch-1.1.0



memcahced installation


# memcached installation
sudo yum install libevent-devel
cd ~/Downloads/
wget http://www.memcached.org/files/memcached-1.4.17.tar.gz
tar -xzvf memcached-1.4.17.tar.gz 
cd memcached-1.4.17
./configure --prefix=/usr/local/memcached
make
sudo make install
# start memcached
/usr/local/memcached/bin/memcached &

test


# install Python 3.3.5
sudo yum install ncurses-devel ncurses-libs ncurses sqlite-devel readline-devel openssl-devel xz-devel bzip2-devel
mkdir ~/Downloads
cd ~/Downloads
wget wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tgz
tar -xvf Python-3.3.5.tgz
cd Python-3.3.5
./configure --prefix=/usr/local/python-3.3.5
make
sudo make install
cp -s /usr/local/python-3.3.5/ /usr/local/bin
cp -s /usr/local/python-3.3.5/ /usr/bin

# create virutalenv for mangaconnect
cd ~
pyvenv-3.3 production_env
cd production_env
source bin/activate
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py