`
eimhee
  • 浏览: 2115860 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ubuntu 64位 下安装Aache2 和PHP5, MYSQL

阅读更多

由于没有找到LINUX下64位的PHP套件, XAMPP,WAMPP只支持32位的LINUX,

这下只能自己整合APACHE2和PHP5了。

 

这里有一个很快的方法安装PHP和APACHE

首先执行

sudo apt-get update

 

更新源

 

在命令行执行下面这些命令

 

    sudo apt-get install apache2

    sudo apt-get install php5

    sudo apt-get install libapache2-mod-php5

    sudo /etc/init.d/apache2 restart

 

Apache 网站的默认根目录在/var/www下

添加以下文件

 

<?php
phpinfo();

/etc/init.d/apache2 restart

 

重起APACHE之后, 如果在浏览器当中能访问这个文件, 可以看到PHP, APACHE已经成功安装成功了

 

 

To install MySQL, run the following command from a terminal prompt:

sudo apt-get install mysql-server

 

sudo apt-get install php5-mysql (MySQL Module for PHP)

For this install php5-gd package. (i.e apt-get install php5-gd)

 

Note that your php.ini will have been replace, so you have to reset custom settings like memory_limit.

 

Enable mod_rewrite in Apache
sudo a2enmod rewrite
Edit the configuration file.
    sudo gedit /etc/apache2/sites-available/default
    line 12 says “AllowOverride none” ;
    change it to “AllowOverride all”
    save and close


PHP PECL

 extensions provide additional functionality over the base PHP install.  You can browse the PHP PECL extensions available at the PECL repository here

.  The following steps show how to install a PECL extension/module on Ubuntu using the PECL_HTTP

 extension as an example and assumes that you already have Apache 2 and PHP 5 installed:
 
you will need to install PEAR via apt-get

 to get the necessary package and distribution system that both PEAR and PECL use.  From a shell prompt enter:

sudo apt-get install php-pear
enable expire module
sudo a2enmod headers
sudo a2enmod expires
sudo /etc/init.d/apache2 restart
 
1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics