1.安装composer
curl -sS https://getcomposer.org/installer | PHP mv composer.phar /usr/local/bin/composer
2.把代码上传到git上
3. 安装PHP,MysqL-server,Nginx,PHPmyadmin
还要修改Nginx的配置sudo nano /etc/Nginx/sites-available/default
location ~ \.PHP$ { # include snippets/fastcgi-PHP.conf; # # # With PHP7.0-cgi alone: #fastcgi_pass 127.0.0.1:9000; fastcgi_index index.PHP; # With PHP7.0-fpm: fastcgi_pass unix:/run/PHP/PHP7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_na$ include fastcgi_params; }
location /PHPmyadmin { alias /usr/share/PHPmyadmin; index index.PHP; } location /yiiblog { index index.PHP; }