日期:2011-02-23 18:06:00  来源:本站整理

Debian 6+Nginx+Mysql+Php+Zend+eaccelerator网站架设[服务器安全]

赞助商链接



  本文“Debian 6+Nginx+Mysql+Php+Zend+eaccelerator网站架设[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:

Debian 6公布了,这几天在虚拟机里装了一个服务器试了试,感受比Ubuntu简便,比centos启动快,但总有这样那样的小问题.下面把我的安装历程举行阐明:

1、安装debian,挑选中文,不安装任何服务;
2、安装ssh,以便在其他机械上粘贴代码:
apt-get install openssh-server
3、增添163和dotdeb源:
deb http://mirrors.163.com/debian squeeze main non-free contrib


deb http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security squeeze/updates main contrib non-free


deb-src http://mirrors.163.com/debian squeeze main non-free contrib
deb-src http://mirrors.163.com/debian squeeze-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian-security squeeze/updates main contrib non-free

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

wget http://www.dotdeb.org/dotdeb.gpg
cat dotdeb.gpg | apt-key add -
更新:

apt-get update && apt-get upgrade
4、办理终端乱码:
vi /etc/default/locale
注释掉其他,增添一行:

LANG=C
5、安装网站系统:
apt-get install nginx php5-common php5-dev php5-cgi spawn-fcgi php-apc php5-mysql php5-curl php5-gd php5-idn php-pear
php5-mcrypt php5-memcache php5-ming php5-recode php5-tidy php5-xmlrpc php5-xsl mysql-server make

以下为可选安装项:

apt-get install php5-imagick php5-imap php5-recode php5-snmp php5-sqlite php5-xmlrpc php5-suhosin php5-odbc php5-ladp
6、启动php5-fpm时呈现错误:
Starting php5-fpm PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/fpm/conf.d/ming.ini on line 1 in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - idn_to_ascii in Unknown on line 0
PHP Warning: Function registration failed - duplicate name - idn_to_utf8 in Unknown on line 0
PHP Warning: idn: Unable to register functions, unable to load in Unknown on line 0
Segmentation fault
failed
办理办法:
一是

vi /etc/php5/fpm/conf.d/ming.ini
将#改成;便可.
二是

vi /etc/php5/fpm/conf.d/idn.ini
想不到其他办法,注释掉语句,网上也找不到相关资料.

7、安装eaccelerator和zendguardloader
sudo mkdir /usr/zend
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
wget http://phpcj.谷歌code.com/files/ZendGuardLoader.so
sudo mv ZendGuardLoader.so /usr/zend/ZendGuardLoader.so
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
tar xvjf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
cp control.php /var/www/control.php //复制掌握程序到网站目录,通过http://网站名/control.php拜候,默许帐号为
admin,密码为eAccelertor,可编辑此文件改正.
phpize
sudo ./configure --enable-eaccelerator=shared
sudo make
sudo make install
sudo vi /etc/php5/fpm/php.ini
在配置文件最后加上:
代码:
zend_extension=/usr/zend/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
zend_extension="/usr/lib/php5/20090626+lfs/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
eaccelerator.allowed_admin_path="/var/www/control.php"   以上是“Debian 6+Nginx+Mysql+Php+Zend+eaccelerator网站架设[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:

  • 利用GDebi来安装包
  • Debian/Ubuntu 搭建写模块(驱动)编程的环境
  • Debian Ubuntu下php连MSSQL
  • 在多台Debian/Ubuntu上利用Oropo处理海量图片
  • 独辟蹊径网络安装Debian/Ubuntu
  • 服务器操作系统应当挑选 Debian/Ubuntu 还是 CentOS?
  • Debian 6安装LNMP后配置vsftpd教程
  • debian 6 安装 LNMP
  • Debian6.0安装后系统基本配置
  • Debian 6.02 (squeeze)下编译安装 MySQL 5.5的办法
  • <b>Debian下Nginx-1.0.5 + MySQL-5.5.15 +PHP-5.3.8编译安装</b>
  • <b>Debian下MySQL安装的问题</b>
  • 本文地址: 与您的QQ/BBS好友分享!
    • 好的评价 如果您觉得此文章好,就请您
        0%(0)
    • 差的评价 如果您觉得此文章差,就请您
        0%(0)

    文章评论评论内容只代表网友观点,与本站立场无关!

       评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论
    Copyright © 2020-2022 www.xiamiku.com. All Rights Reserved .