How to install Apache, PHP5 and Symfony on Ubuntu 10
To install Symfony framework, first of all you’ll need to install and configure Apache + PHP5. Here’s how you can do it on Ubuntu. I’m using Ubuntu 10.10 Maverick Meerkat.Installing Apache and PHP5 on Ubuntu
Just open your terminal and enter the following commands:sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5
Testing the environment
Now let’s see if our environment fits all Symfony’s requirements. Download http://sf-to.org/1.4/check.php and run it in your terminal:php check_configuration.phpYou’ll probably find some errors. Let’s fix them!
Fixing the problems
ERROR:[[WARNING]] PDO has some drivers installed: : FAILED *** Install PDO drivers (mandatory for Propel and Doctrine) ***
SOLUTION:
You need to enable the MySQL driver of PDO. Just enter the following command on Ubuntu’s terminal:
sudo apt-get install php5-mysqlERROR:
[[WARNING]] XSL module is installed: FAILED*** Install the XSL module (recommended for Propel) ***
SOLUTION:
You need to install the XSL module for Apache and PHP5. Enter the following command on the terminal:
sudo apt-get install libapache2-modxslt php5-xslThen, let’s restart Apache. Enter the following command on the terminal:
sudo /etc/init.d/apache2 restartERROR:
[[WARNING]] php.ini has short_open_tag set to off: FAILED *** Set it to off in php.ini ***
SOLUTION:
You need to tell PHP to accept open tags like <? instead of <?php. You have to edit the php.ini file. I’d rather use nano than vi to edit text files on Ubuntu, so enter the following command on the terminal:
sudo nano /etc/php5/cli/php.iniThen change the following line:
short_open_tag = Onto
short_open_tag = OffPress ctrl+X to exit and press Y to save your file.
Run another time the configuration checking file (php check_configuration.php). The only error you should find is: A PHP accelerator is installed: FAILED. All the other options must be OK. Let’s now install Symfony.
Installing Symfony on Ubuntu
Let’s install Symfony using PEAR - PHP Extension and Application Repository. First of all, let’s install PEAR:sudo apt-get install php-pearAnd then let’s install Symfony:
sudo pear channel-discover pear.symfony-project.com
sudo pear install symfony/symfonyIf everything goes fine, you’ll receive this message:
install ok: channel://pear.symfony-project.com/symfony-1.2.9Victory
Không có nhận xét nào:
Đăng nhận xét