linux php安装mysql数据库的方法

2020-08-13 10:54:34

linux php安装mysql数据库的方法:首先在mysql官网找到源码;然后使用“tar -zxvf ”命令进行解压;接着进入mysql的目录;最后通过“make install”命令完成安装即可。

linux上安装php,mysql,apche步骤

源码安装php

在php官网找到5.6.40的tar包的链接

在linux上的 用户主目录(cd ~)用 wget 链接

tar -zxvf 压缩包名 解压

进入下载后的php-5.6.40的目录使用

./configure     --prefix=/usr/local/php5.6   --enable-fpm

在当前目录 make

在当前目录 make install

返回上一级目录 新建一个 test.php 测试文件

运行php文件 /use/local/php5.6/bin/php test.php

安装mysql

在mysql官网找到源码。Generic Linux (Architecture Independent), Compressed TAR Archive

linux通用版。找到下载连接。

在linux 用 wget 链接

tar -zxvf 压缩包名 解压

yum install  cmake    gcc-c++   ncurses-devel  perl-Data-Dumper  boost boost-doc  boost-devel

进入mysql的目录 cmake .

makemake install

Apache

官方找连接

wget 链接

进入解压后的目录 ./configure --prefix=/usr/local/apache2.4

http://apr.apache.org/download.cgi 参考文章

更多相关知识,请访问PHP中文网!

相关文章 大家在看