debian7 x86_64php
1,添加源並升級系統
apt-get update && apt-get upgrade -yhtml
echo "deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx" >> /etc/apt/sources.list
wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key
rm nginx_signing.keymysql
wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb
dpkg -i mysql-apt-config_0.6.0-1_all.deb
rm mysql-apt-config_0.6.0-1_all.debnginx
echo "deb http://packages.dotdeb.org wheezy-php56 all
deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list
wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
rm dotdeb.gpgsql
apt-get update數據庫
2,安裝php5.6.28+nginx1.10.2+mysql5.6.34
apt-get install -y php5 php5-fpm php5-gd php5-common php-pear php5-cli php5-intl php5-imagick php5-mcrypt php5-sqlite php5-mysql php5-curl php5-imap nginx mysql-servercurl
3,簡單配置socket
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php5/fpm/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 32M/g' /etc/php5/fpm/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' /etc/php5/fpm/php.ini
sed -i 's/;date.timezone =/date.timezone = PRC/g' /etc/php5/fpm/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 120/g' /etc/php5/fpm/php.ini
sed -i 's/disable_functions =.*/disable_functions = passthru,exec,system,chroot,scandir,chgrp,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server/g' /etc/php5/fpm/php.iniide
ulimit -HSn 65535
sed -i 's/;request_terminate_timeout = 0/request_terminate_timeout = 120/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/pm.max_children = 5/pm.max_children = 100/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/pm.start_servers = 2/pm.start_servers = 10/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/pm.min_spare_servers = 1/pm.min_spare_servers = 10/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/pm.max_spare_servers = 3/pm.max_spare_servers = 70/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/;pm.max_requests = 500/pm.max_requests = 10240/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's/;rlimit_files = 1024/rlimit_files = 51200/g' /etc/php5/fpm/pool.d/www.conf
sed -i 's!listen = /var/run/php5-fpm.sock!listen = 127.0.0.1:9000!g' /etc/php5/fpm/pool.d/www.confpost
service php5-fpm restart
4,創建網站目錄並受權
mkdir -p /var/www/html
chown -R www-data:www-data /var/www/html
vi /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name localhost;
root /var/www/html;
location / {
root /var/www/html;
index index.html index.php index.htm;
}
location ~ \.php$ {
# root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
sed -i 's/user nginx;/user www-data;/g' /etc/nginx/nginx.conf
service nginx restart
vi /etc/mysql/my.cnf
註銷掉bind-address = 127.0.0.1
service mysql restart
5,建立禪道數據用戶
mysql -u root -p
輸入剛剛安裝時輸入的root帳號密碼
grant all privileges on *.* to zentao@"%" identified by "789sama";
flush privileges;
exit
6,安裝禪道
cd /var/www/html
wget wget http://dl.cnezsoft.com/zentao/8.3.1/ZenTaoPMS.8.3.1.zip
apt-get install -y unzip
unzip ZenTaoPMS.8.3.1.zip
http://serverip/zentaopms/www/index.php
按提示輸入數據庫帳號
設置管理員帳號密碼
完成便可使用^_^