这几天,我的博客所在的虚拟主机不稳定。今天下午,我购买了位于美国德克萨斯州达拉斯市的VPS(CentOS 5.2 操作系统),在上面配置了“Nginx 0.7.19 + PHP 5.2.6 + MySQL 5.1.26”环境,然后将博客内容迁移到了VPS上。

  该VPS是从瑞豪开源(http://rashost.com/)购买的,电信、网通访问速度都不错,稳定性也非常好。

  VPS(Virtual Private Server 虚拟专用服务器)技术,将一部服务器分割成多个虚拟专享服务器的优质服务。每个VPS都可分配独立公网IP地址、独立操作系统、独立超大空间、独立内存、独立执行程序和独立系统配置等。



  配置过程中的一些笔记:

  一、VPS只有一个根分区,没有swap交换分区。VPS内存不大,于是,我为其增加了一个swap交换文件。
  1、进入一个目录
cd /var/


  2、获取256M的文件块:
dd if=/dev/zero of=swapfile bs=1024 count=262144


  3、创建swap文件
/sbin/mkswap swapfile


  4、激活swap文件
/sbin/swapon swapfile


  5、查看一下swap是否正确:
/sbin/swapon -s


  6、加到fstab文件中让系统引导时自动启动
vi /etc/fstab

在末尾增加以下内容:
引用
/var/swapfile swap swap defaults 0 0



  二、系统默认为美国东部时间,修改Linux时区为东八区
cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


Tags:



技术大类 » 其他Unix技术 | 评论(105) | 引用(0) | 阅读(78515)
shz Email
2022-9-3 19:49
I will be interested in more similar topics. i see you got really very useful topics , i will be always checking your blog thanks  Automated Income System
shzz Email
2022-9-3 19:50
Hi buddies, it is great written piece entirely defined, continue the good work constantly.  Rachel Rofe
shz Email
2022-9-3 19:54
Thanks for the nice blog. It was very useful for me. I'm happy I found this blog. Thank you for sharing with us,I too always learn something new from your post.  Automated Income System
shzz Email
2022-9-3 20:05
I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . .  Rehab Valuator
shz Email
2022-9-3 20:09
Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon!  Rehab Valuator
分页: 6/6 第一页 上页 1 2 3 4 5 6 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]