• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

ubuntu 64位 上安装Aache2 和PHP5, MYSQL

mysql 搞代码 7年前 (2018-06-02) 148次浏览 已收录 0个评论

ubuntu 64位 下安装Aache2 和PHP5, mysql

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

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

 

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

首先执行

sudo apt-get update

欢迎大家阅读《ubuntu 64位 上安装Aache2 和PHP5, MYSQL》,跪求各位点评,by 搞代码

 

更新源

 

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

 

    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

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:ubuntu 64位 上安装Aache2 和PHP5, MYSQL

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址