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
sudo su | |
yum -y install gcc make |
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
#!/bin/sh | |
#chkconfig: - 90 90 | |
#description: Redis and Gentlemen! | |
REDISPORT=6379 | |
EXEC=/usr/local/bin/redis-server | |
CLIEXEC=/usr/local/bin/redis-cli | |
PIDFILE=/var/run/redis_${REDISPORT}.pid | |
CONF="/etc/redis/${REDISPORT}.conf" | |
case "$1" in |
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
# phpizeインストール | |
yum -y install php-devel | |
cd /usr/local/src | |
git clone git://github.com/nicolasff/phpredis.git | |
cd phpredis | |
phpize | |
./configure | |
make | |
make test |
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
# root へswitch | |
sudo su - | |
Password: (パスワード入力) | |
# ソース置き場へ移動 | |
cd /usr/local/src | |
# Pythonのソース圧縮ファイルをダウンロード | |
# -O はサーバからのレスポンスを標準出力に出力するのではなく、リモートファイルと同じ名前のファイルに保存します。 | |
curl -O https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz |
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
sudo su - | |
Password: (root権限のパスワード入力) | |
# get-pip.py実行 | |
curl -kL https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python | |
# pip バージョン確認 | |
pip --version | |
pip 6.0.8 from /usr/local/lib/python2.7/site-packages (python 2.7) |
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
# paramiko インストール | |
pip install paramiko | |
# paramiko インストール確認 | |
pip list | grep paramiko | |
paramiko (1.15.2) | |
# pysftp インストール | |
pip install pysftp |
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
# gmp バージョン確認 | |
rpm -qa |grep gmp | |
gmp-4.1.4-10.el5 | |
gmp-4.1.4-10.el5 | |
gmp-devel-4.1.4-10.el5 | |
gmp-devel-4.1.4-10.el5 | |
# モジュール置き場で gmp-5系インストール(今回は5.1.1) | |
cd /usr/local/src/ | |
wget ftp://ftp.gmplib.org/pub/gmp/gmp-5.1.1.tar.bz2 |
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
cd ~/Downloads | |
# memcache ダウンロード | |
wget http://pecl.php.net/get/memcache-2.2.4.tgz | |
tar -zxvf memcached-2.2.4.tgz | |
cd memcached-2.2.4 | |
# コンパイル | |
phpize && ./configure --enable-memcache && make |
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
<?php | |
$memcache = new Memcache; | |
$memcache->connect( 'localhost', 11211 ) or die ( "Could not connect" ); | |
$cache_key = 'test'; | |
$cache_data = array( 'hoge', 1, array( 1, "text" ) ); | |
# キャッシュ書き込み | |
$memcache->set( $cache_key, $cache_data, 0, $expire ); |
OlderNewer