Yii on Centos 6 Linux
(64 bit) Installation
Now install
PHP and Http packages
[root@yii ~]# yum -y install unzip php-fpm php-mysql
Modify using a text editor, locate date.timezone in the file /etc/php.ini for the timezone that is appropriate for your server. I.e. date.timezone = America/New_York
sed -i 's/;date.timezone =/date.timezone = America\/New_York/g' /etc/php.ini
OR
[root@yii /]# sudo nano /etc/php.ini
Setup php-fpm
sed -i 's/user = apache/user = nginx/g' /etc/php-fpm.d/www.conf
sed -i 's/group = apache/group = nginx/g' /etc/php-fpm.d/www.conf
OR
Open up the php-fpm configuration:
[root@yii ~]# sudo nano /etc/php-fpm.d/www.conf
service php-fpm restart
Fresh install YII:
Check for
the latest release of Yii under http://www.yiiframework.com/download/
[root@yii ~]# cd /var/www
[root@yii html]# wget http://yii.googlecode.com/files/yii-1.1.10.r3566.zip
Unzip and
change the mode to 755 for all files in the extracted directory
[root@yii www]# unzip yii-1.1.10.r3566.zip -d /var/www
[root@yii www]# chown -R nginx:nginx /var/www/yii-1.1.10.r3566
[root@yii www]# chown -R nginx:nginx /var/www/yii-1.1.10.r3566
[root@yii www]# chmod -R 755 /var/www/yii-1.1.10.r3566
chown nginx -R /var/www/DOMAIN/web/runtime chown nginx -R /var/www/DOMAIN/www/assets
Create
your test application
[root@yii www]# php /var/www/yii-1.1.10.r3566/framework/yiic.php
webapp /var/www/html/test
Using a
browser go to your newly created Yii web application "test"
http://hostname/test/
Enjoy!
Attention
for Users used
No comments:
Post a Comment