一)下载安装包:
http://market.aliyun.com/products/53690006/cmgj000262.html
二)安装必须插件(rz、svn):
rz,sz安装:yum install -y lrzsz
svn:yum -y install subversion
三)安装环境:
chmod -R 777 *
./install.sh
四)查看安装情况:
查看正在运行的服务器及端口:netstat -tunpl
查看ftp,mysql密码: cat account.log
修改mysql密码:mysqladmin -uroot -pXXX password XXX
五)相关路径和配置:
网站目录:/alidata/www
服务器软件目录:/alidata/server
Mysql 目录 /alidata/server/mysql
Php 目录/alidata/server/php
nginx 目录在 /alidata/server/nginx/
Nginx 配置文件在/alidata/server/nginx/conf
Nginx 虚拟主机添加 你可以修改/alidata/server/nginx/conf/vhosts/phpwind.conf
六)操作命令:
各个服务操作命令汇总:
nginx: /etc/init.d/nginx start/stop/restart/reload
mysql: /etc/init.d/mysqld start/stop/restart/
php-fpm: /etc/init.d/php-fpm start/stop/restart/
ftp: /etc/init.d/vsftpd start/stop/restart/...
比如启动 nginx: /etc/init.d/nginx start
七)计划任务:
5 9-11 * * * (/etc/init.d/php-fpm restart >> /alidata/log/phpresrart.log 2>&1)
八)网站配置:
server {
listen 80;
server_name 域名;
#access_log logs/host.access.log main;
root "网站路径";
location / {
index index.html index.htm index.php;
autoindex off;
}
#nginx配置增加过滤svn
location ~ ^(.*)\/\.svn\/
{
deny all;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}