2011 Corel 亞太區創意設計大賽起跑 !
|
2011/09/01
2011 Corel 亞太區創意設計大賽起跑 !
2010/08/23
Ubuntu Apache php5 and mysql with Yii Framework
First of all, I assume that you have already have the installed Ubuntu environment.
To install the apache server, open up your command line
#sudo apt-get install apache2
To install PHP5:
#sudo apt-get install php5
To install MySQL-Server
#sudo apt-get install mysql-server
To have a web-base controller of MySQL, you may install phpmyadmin
#sudo apt-get install phpmyadmin
Default Directory:
Apache: /var/www/
Apache Config: /etc/apache2/apache2.conf
MySQL: /var/lib/mysql
To check your apache is working or not,
go to http://localhost/
you will see It's work if the apache is installed well.
To check your php5 is working or not,
#cd /var/www/
#sudo touch test.php
#sudo vim test.php
write the following statement into test.php, then save and quit.
go to http://localhost/test.php
To run the Yii Framework:
Go to http://www.yiiframework.com/download/ to get the version you want.
Remember to get the tar.gz file for your Ubuntu, or you might need to install 7-zip
Decompress the file
#tar zxvf yii-1.1.x.tar.gz
Move the directory you decompressed to the web root
#sudo mv yii /var/www/
To check all the extension you need are installed
go to http://localhost/yii/requirements/
you will see the extensions which you already have and what you don't have.
Install the extension you need. For instance, if you want to use mysql as your database, then you might need to install PDO MySQL extension
using the same method to install the extension you need, that is
#sudo apt-get install xxx
訂閱:
文章 (Atom)