Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[教程] Debian + Nginx + PHP + MySQL 最省资源一键安装包

[复制链接]
cookie 发表于 2011-9-23 21:57:46 | 显示全部楼层 |阅读模式

安装方法:
  1. wget http://github.com/waynechen/vps/raw/master/setup-cheap-debian.sh
  2. bash setup-cheap-debian.sh
复制代码
以下是改过的:
  1. #!/bin/bash

  2. mv /etc/apt/sources.list /etc/apt/sources.list.backup

  3. cat > /etc/apt/sources.list <<END
  4. deb http://ftp.us.debian.org/debian lenny main contrib non-free
  5. deb http://ftp.debian.org/debian lenny main contrib non-free
  6. deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
  7. deb http://security.debian.org/ lenny/updates main contrib non-free
  8. deb http://packages.dotdeb.org stable all
  9. deb-src http://packages.dotdeb.org stable all
  10. END

  11. gpg --keyserver keys.gnupg.net --recv-key 89DF5277
  12. gpg -a --export 89DF5277 | apt-key add -

  13. apt-get update

  14. wget http://github.com/lowendbox/lowendscript/raw/master/setup-debian.sh

  15. bash setup-debian.sh system

  16. bash setup-debian.sh exim4

  17. bash setup-debian.sh nginx

  18. bash setup-debian.sh mysql

  19. bash setup-debian.sh php

  20. cat > ./restart.sh <<END
  21. #!/bin/bash
  22. invoke-rc.d nginx restart
  23. invoke-rc.d php-cgi restart
  24. invoke-rc.d mysql restart
  25. END

  26. invoke-rc.d nginx stop

  27. cat >> /etc/apt/sources.list <<END
  28. deb http://ftp.us.debian.org/debian sid main
  29. END

  30. apt-get update

  31. apt-get -y install nginx

  32. bash ./restart.sh

  33. sed -i '$d' /etc/apt/sources.list

  34. apt-get update

  35. apt-get -y upgrade

  36. # Optional operation
  37. cat >> /etc/apt/sources.list <<END
  38. #deb http://ftp.us.debian.org/debian sid main
  39. END

  40. echo 'Install complete'
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-12-27 15:03 , Processed in 0.025295 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表