Alan Hou的个人博客

CentOS 6 Yii框架开发

基本环境准备

yum install httpd mysql php -y
yum install php-devel php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt -y
yum install mysql-server mysql mysql-devel -y
#设置MySQL密码
mysql_secure_installation
#安装Nginx
yum -y install nginx

Yii的安装

#安装composer:
curl -sS http://install.phpcomposer.com/installer | php 
#安装全局插件
php composer.phar global require "fxp/composer-asset-plugin:~1.1.1" 
#安装yii框架 
php composer.phar create-project --prefer-dist yiisoft/yii2-app-basic basic 2.0.10
退出移动版