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网站架设[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |