Lamp Full Installation Detailed

Source: Internet
Author: User
Tags create index zend zend framework

I installed the Ubuntu 9.10, through the new software package management tool, select lamp by Task classification, then choose Install, enter http://localhost in the browser , you can see


It works!

This is the default Web page to this server.

The Web server software is running but no content has been added, yet.


This means that the PHP system is already installed.

Next look at how to configure the Apache server.

(1) First configure the Master file directory, in the/etc/apache2/sites-available directory, through the sudo gedit httpd.conf,

<virtualhost *:80>
ServerAdmin xujie19841206@hotmail.com
#加上indexes就可以让任何目录下的所有文件展现出来
Documentroot/home/xujie/www
<directory/>
Options Indexes followsymlinks
AllowOverride None
</Directory>
<Directory/home/xujie/www/>
Options Indexes followsymlinks MultiViews
AllowOverride None
Order Allow,deny
Allow from all
</Directory>

...


You can create index.html, or index.php, under my home directory/home/xujie/www.


(2) Next edit the file in/etc/apache2/apache2.conf, is the server's configuration file, add

# makes it possible to identify the home directory
<ifmodule dir_module>
DirectoryIndex index.html index.php
</IfModule>


#使得能够启用PHP
AddType application/x-httpd-php. php
AddType Application/x-httpd-php-source. Phps


Then open the/etc/apache2/httpd.conf file and add

LoadModule php5_module/usr/lib/apache2/module/libphp5.so


(3) Edit/etc/php5/apache2/php.ini file, it is the main configuration file of PHP, plus extension=mysql.so, you can support the MySQL database.


(4) in the/home/xujie/www directory, the establishment of index.php files, and then enter http://localhost/index.php in the browser, you can see the PHP configuration Results page.


(5) Of course need to restart the server, input sudo/etc/init.d/apache2 restart can be.

Now start installing the Zend Framework as follows:

(1) Input: sudo apt-get install zend-framework, and then you will see the need to consume about 60M of space tips, select Y, OK.

(2) under the/etc/php5/apache2/php.ini catalogue, the

#include_path: Remove the annotation and then include_path = ".:/ usr/share/php instead: include_path = ".:/ Usr/share/php/libzend-framework-php/:/usr/share/php ", you can load the ZF framework.

(3) then enter A2dismod to see if there is no rewrite, the default is not, and then enter sudo a2denmod rewrite, prompted to enter the password to install the rewrite.

(4) All alloverride lines in the/etc/apache2/sites-available/default file are modified to: allowoverride all, it's OK.

(5) Server reboot: sudo/etc/init.d/apache2 restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.