Install ubuntu11.101_top32bit install apache2, php5, openssl, libssl-dev, gcc compiler and Development Library, gd development library, php, php-apache, php-related plug-ins can use the apt-get command install these software packages, type the command: sudoapt-getinstallapache2sudoapt-getinstallbuild-essen
Install Ubuntu 11.10 Desktop 32bit
Install plug-ins related to apache2, php5, openssl, libssl-dev, gcc compiler and Development Library, gd development library, php, php-apache, and php.
You can use the apt-get command to install these software packages. type the command:
Sudo apt-get install apache2
Sudo apt-get install build-essential
Sudo apt-get install libgd2-xpm-dev
Sudo apt-get install openssl
Sudo apt-get install libssl-dev
Sudo apt-get install php5
Sudo apt-get install libapache2-mod-php5 (this may have been installed when you install php5, if you do not need to install it)
Sudo apt-get install lib1_8
Sudo apt-get install libjpeg8-dev
Sudo apt-get install curl
Sudo apt-get install libcurl3
Sudo apt-get install libpng12-0
Sudo apt-get install libpng12-dev
Sudo apt-get install freetype2-demos
Sudo apt-get install libfreetype6
Sudo apt-get install libxml2
Sudo apt-get install libxml2-dev
Configure apache
If the vim editor is not installed by default, install vim first, because the default vi editor is quite disgusting in ubuntu.
Sudo apt-get install vim
Sudo vim/etc/apache2/apache2.conf
Press shift-g, that is, G, to the end of the article, add the following configuration
AddType application/x-httpd-php. php. htm. html
Adddefacharcharset UTF-8
DirectoryIndexindex. php index.html
Start apache service
Sudo/etc/init. d/apache2 start
Use the chkconfig tool to set it to random startup. If chkconfig is not installed, install chkconfig first.
Sudo apt-get install chkconfig
Sudo update-rc.d apache2 defaults
Sudochkconfig apache2 on
Test whether php Parsing is normal
Switch to the/var/www directory in shell
Cd/var/www
Clear files
Rm-rf *
Create test page
Vimindex. php
Phpinfo ();
?>
Exit and save
Open a browser and test:
Http: // localhost
Whether php information is displayed normally