# 安裝 Memcache wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz tar zxvf memcached-1.4.15.tar.gz cd memcached-1.4.15 ./configure --prefix=/usr/local/memcached make && make install
# 安裝 Nginx groupadd www && useradd -g www -s /sbin/nologin www wget http://nginx.org/download/nginx-1.4.0.tar.gz tar zxvf nginx-1.4.0.tar.gz cd nginx-1.4.0 ./configure --prefix=/usr/local/nginx --add-module=../memc-nginx-module-master --add-module=../srcache-nginx-module-master --user=www --group=www --with-select_module --with-poll_module --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_secure_link_module --with-http_stub_status_module --with-pcre make && make install
# 安裝 MySQL wget http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.31.tar.gz/from/http://cdn.mysql.com/ tar zxvf mysql-5.5.31.tar.gz cd mysql-5.5.31 groupadd mysql && useradd -s /sbin/nologin -g mysql mysql cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=complex -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_USER=mysql; make make install chmod +w /usr/local/mysql chown -R mysql:mysql /usr/local/mysql wget https://gist.github.com/zeuxisoo/cfc69868ae65f88ef61b/raw/f3a9b7e806907df2e10229af15ffeb1c36a21952/my.cnf -O /etc/my.cnf /usr/local/mysql/scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data /usr/local/mysql/support-files/mysql.server start /usr/local/mysql/bin/mysqladmin password [[[PASSWORD]]] /usr/local/mysql/bin/mysql -hlocalhost -uroot -p USE mysql; DELETE FROM user WHERE user=''; UPDATE user SET password=PASSWORD('[[[PASSWORD]]]') WHERE user='root'; DELETE FROM user WHERE NOT (user='root'); DROP USER ''@'%'; FLUSH PRIVILEGES; EXIT;
# 安裝 PHP cd .. wget http://hk1.php.net/get/php-5.4.14.tar.gz/from/this/mirror tar zxvf php-5.4.14.tar.gz cd php-5.4.14 ./configure --prefix=/usr/local/php --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-openssl --with-pcre-regex --with-zlib --with-curl --with-curlwrappers --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --with-iconv --with-mysql=/usr/local/mysql --with-mysqli --with-pdo-mysql --with-readline --enable-soap --enable-sockets --enable-zip --enable-mysqlnd --disable-fileinfo make make install # 安裝 PHP-Memcached cd .. wget http://pecl.php.net/get/memcache-3.0.8.tgz tar zxvf memcache-3.0.8.tgz cd memcache-3.0.8 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config make make install
cp php.ini-development /usr/local/php/lib/php.ini vim /usr/local/php/lib/php.ini
# 安裝 Python 2.7.4 cd .. wget wget http://python.org/ftp/python/2.7.4/Python-2.7.4.tar.bz2 tar xvf Python-2.7.4.tar.bz2 cd Python-2.7.4 ./configure --prefix=/usr/local make make altinstall
# 安裝 Python distribute cd .. wget https://pypi.python.org/packages/source/d/distribute/distribute-0.6.36.tar.gz tar zxvf distribute-0.6.36.tar.gz cd distribute-0.6.36 python2.7 setup.py install
# 安裝 Python 的 virtualenv cd .. easy_install-2.7 virtualenv