今天购买了一个VPS, 是https://www.linode.com的,这家是老牌的VPS供应商,机房速度快,特别是到中国可以有5个机房供你选择,同时,你可以任何时候在这几个机房进行转移,方便简单。下面是我安装使用的记录,开通帐号后,会提示按照步骤进行操作安装系统:
1. 我选择安装CentOS 64是因为特殊需要,采用LNMP,LNMP是一个基于CentOS编写的Nginx、PHP、MySQL、phpMyAdmin、eAcelerator一键安装包。使用起来非常方便。
2.安装完成CentOS后,需要下载东西,发现没有wget命令,于是使用命令在线安装:yum install -y wget
3.下载LNMP组件,命令:
- wget http://soft.vpser.net/lnmp/lnmp0.3.tar.gz
- tar xzvf lnmp0.3.tar.gz
- cd lnmp0.3
- ./centos.sh
- 等待组件安装完成会提示:安装目录列表
LNMP组件安装的各个目录如下:
- mysql dir: /usr/local/mysql
- php dir: /usr/local/php
- nginx dir: /usr/local/nginx
- web dir /home/wwwroot
4. 安装tokyo cabinet步骤如下:
- wget http://1978th.net/tokyocabinet/tokyocabinet-1.4.41.tar.gz
- tar xzvf tokyocabinet-1.4.41.tar.gz
- cd tokyocabinet-1.4.41
- ./configure
- make
- make install
- cd ..
- 以上是标准步骤,由于我选的CentOS可能是精简版,缺少bzlib,需要安装:yum bzlib,完成后再执行第4步
5.安装tokyotyrant步骤:
- wget http://1978th.net/tokyotyrant/tokyotyrant-1.1.39.tar.gz
- tar xzvf tokyotyrant-1.1.39.tar.gz
- cd tokyotyrant-1.1.39
- ./configure
- make
- make install
6.安装64位分词系统:
- cd /usr/local/
- wget http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz
- tar zxvf httpcws-1.0.0-x86_64-bin.tar.gz
- rm -f httpcws-1.0.0-x86_64-bin.tar.gz
- cd httpcws-1.0.0-x86_64-bin/
- ulimit -SHn 65535
- /usr/local/httpcws-1.0.0-x86_64-bin/httpcws -d -x /usr/local/httpcws-1.0.0-x86_64-bin/dict/
7. 安装mysql_pdo:直接修改LNMP下载的文件centos.sh,找到php安装命令,在下载的php目录中执行:
- ./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc –with-mysql=/usr/local/mysql –with-pdo-mysql=/usr/local/mysql -with-pdo=shared –with-mysqli=/usr/local/mysql/bin/mysql_config –with-iconv-dir=/usr/local –with-freetype-dir –with-jpeg-dir –with-png-dir –with-zlib –with-libxml-dir=/usr –enable-xml –disable-rpath –enable-discard-path –enable-safe-mode –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –with-curlwrappers –enable-mbregex –enable-fastcgi –enable-fpm –enable-force-cgi-redirect –enable-mbstring –with-mcrypt –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-ftp –without-pear –with-mime-magic=/usr/share/file/magic.mime
- make ZEND_EXTRA_LIBS=’-liconv’
- make install
- 重新启动Nginx :kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
8.安装memcached:
- tar zxvf libevent-1.3.tar.gz
- cd libevent-1.3
- ./configure –prefix=/usr
- make
- make install
- 64为系统:ln -s /usr/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2cd ../
- tar zxvf memcached-1.2.8.tar.gz
- cd memcached-1.2.8
- ./configure –with-libevent=/usr
- make
- make install
- 安装memcached的php扩展:
- wget http://pecl.php.net/get/memcache-2.2.5.tgz
- tar xzvf memcache-2.2.5.tgz
- cd memcache-2.2.5
- ./configure –enable-memcache –with-php-config=/usr/local/php/bin/php-config
- make
- make install
- 提示:Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
- 打开php.ini设置:extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613″ 和extension=memcache.so
- 重启动nginx : kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
- 查看phpinfo是否存在memcache,如果有,则memcache与php链接成功
9.安装subversion:yum install subversion

Post a Comment