Skip to content

速度快,操作简单的VPS

今天购买了一个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组件,命令:

  1. wget http://soft.vpser.net/lnmp/lnmp0.3.tar.gz
  2. tar xzvf lnmp0.3.tar.gz
  3. cd lnmp0.3
  4. ./centos.sh
  5. 等待组件安装完成会提示:安装目录列表

LNMP组件安装的各个目录如下:

  • mysql dir:   /usr/local/mysql
  • php dir:     /usr/local/php
  • nginx dir:   /usr/local/nginx
  • web dir      /home/wwwroot

4. 安装tokyo cabinet步骤如下:

  1. wget http://1978th.net/tokyocabinet/tokyocabinet-1.4.41.tar.gz
  2. tar xzvf tokyocabinet-1.4.41.tar.gz
  3. cd tokyocabinet-1.4.41
  4. ./configure
  5. make
  6. make install
  7. cd ..
  8. 以上是标准步骤,由于我选的CentOS可能是精简版,缺少bzlib,需要安装:yum bzlib,完成后再执行第4步

5.安装tokyotyrant步骤:

  1. wget http://1978th.net/tokyotyrant/tokyotyrant-1.1.39.tar.gz
  2. tar xzvf tokyotyrant-1.1.39.tar.gz
  3. cd tokyotyrant-1.1.39
  4. ./configure
  5. make
  6. make install

6.安装64位分词系统:

  1. cd /usr/local/
  2. wget http://httpcws.googlecode.com/files/httpcws-1.0.0-x86_64-bin.tar.gz
  3. tar zxvf httpcws-1.0.0-x86_64-bin.tar.gz
  4. rm -f httpcws-1.0.0-x86_64-bin.tar.gz
  5. cd httpcws-1.0.0-x86_64-bin/
  6. ulimit -SHn 65535
  7. /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目录中执行:

  1. ./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
  2. make ZEND_EXTRA_LIBS=’-liconv’
  3. make install
  4. 重新启动Nginx :kill -HUP `cat /usr/local/nginx/logs/nginx.pid`

8.安装memcached:

  1. tar zxvf libevent-1.3.tar.gz
  2. cd libevent-1.3
  3. ./configure –prefix=/usr
  4. make
  5. make install
  6. 64为系统:ln -s /usr/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2cd ../
    1. tar zxvf memcached-1.2.8.tar.gz
    2. cd memcached-1.2.8
    3. ./configure –with-libevent=/usr
    4. make
    5. make install
  7. 安装memcached的php扩展:
  1. wget http://pecl.php.net/get/memcache-2.2.5.tgz
  2. tar xzvf memcache-2.2.5.tgz
  3. cd memcache-2.2.5
  4. ./configure –enable-memcache  –with-php-config=/usr/local/php/bin/php-config
  5. make
  6. make install
  7. 提示:Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
  8. 打开php.ini设置:extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613″ 和extension=memcache.so
  9. 重启动nginx  :   kill -HUP `cat /usr/local/nginx/logs/nginx.pid`
  10. 查看phpinfo是否存在memcache,如果有,则memcache与php链接成功

9.安装subversion:yum install subversion

make ZEND_EXTRA_LIBS='-liconv(2)安装 memcached pkphp(1)centos 64位 php nginx mysql(1)bzlib yum install(1)

Share in Google Reader Share in Google Reader 分享到 FriendFeed 分享到 FriendFeed 推荐到豆瓣 推荐到豆瓣 分享到 Twitter 分享到 Twitter

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*