科技常识:Centos7.2 编译安装方式搭建 phpMyAdmin

2021-03-24 01:11:01
导读 今天小编跟大家讲解下有关科技常识:Centos7 2 编译安装方式搭建 phpMyAdmin,相信小伙伴们对这个话题应该也很关注吧,小编也收集到了有

今天小编跟大家讲解下有关科技常识:Centos7.2 编译安装方式搭建 phpMyAdmin,相信小伙伴们对这个话题应该也很关注吧,小编也收集到了有关科技常识:Centos7.2 编译安装方式搭建 phpMyAdmin的相关资料,希望小伙伴会喜欢也能够帮助大家。

背景说明:phpMyAdmin 是通过浏览器管理MySQL数据库的很方便的工具

安装方式:在本文中所有依赖软件均使用最新版本源码编译安装。

操作系统:Centos7.2 x86_64位

一、编译安装 并配置 httpd 2.4.7,由于软件依赖,先安装 pcre apr 以及 apr-util

1. 下载 编译 安装 pcre

tar zxvf pcre-8.41.tar.gzcd pcre-8.41./configure --prefix=/opt/local/pcre-8.41make && sudo make install

2. 下载 编译 安装 apr

wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.2.tar.gztar zxvf apr-1.6.2.tar.gzcd apr-1.6.2# /bin/rm: cannot remove `libtoolT': No such file or directory:/\$RM"\$cfgfile"注释掉:/RM=\'$RM 改为 RM='$RM -f'make && sudo make install

3. 下载 编译 安装 apr-util

cd apr-util-1.6.0./configure --prefix=/opt/local/apr-util-1.6.0 --with-apr=/opt/local/apr-1.6.2 --with-expat=/opt/local/expatmake && sudo make install

4. 下载 编译 安装 apache2

rpm -qa | grep apr ; yum erase apr -y./configure --prefix=/opt/local/apache2 --enable-module=shared --with-pcre=/opt/local/pcre-8.41 --with-apr-util=/opt/local/apr-util-1.6.0 --with-apr=/opt/local/apr-1.6.2#ServerName localhost:80 取消注释

配置httpd.conf 以便 支持 php7

(1)加入 库文件支持

(2) 加入主页索引

(3)加入文件类型支持

二、编译安装php

5. php 源码下载时,在网页无法复制下载链接,所以先将文件下载到本机windows,然后上传到服务器scp php-7.1.8.tar.gz zheng@172.16.11.236:~/

tar zxf php-7.1.8.tar.gz && cd php-7.1.8./configure --prefix=/opt/local/php-7.1.8 --with-apxs2=/opt/local/apache2/bin/apxs --with-mysqli --with-pdo-mysql --enable-mbstring# 通过 --with-apxs2选项,编译后会在 /opt/local/apache2/modules/ 生成 libphp7.so文件make && sudo make install

三、配置phpMyAdmin

6. 下载 配置 phpMyAdmin

wget https://files.phpmyadmin.net/phpMyAdmin/4.7.4/phpMyAdmin-4.7.4-all-languages.tar.gztar zxf phpMyAdmin-4.7.4-all-languages.tar.gz ; mv phpMyAdmin-4.7.4-all-languages phpMyAdmin# apache2 文档默认位置是 /opt/local/apache2/htdocs/ , 将phpMyAdmin复制到htdocs下,省略了httpd.conf的配置,直接在浏览器访问 phpMyAdmin即可sudo cp -rf phpMyAdmin /opt/local/apache2/htdocs/# 配置 phpMyAdmin的数据库连接sudo cp /opt/local/apache2/htdocs/phpMyAdmin/config.sample.inc.php /opt/local/apache2/htdocs/phpMyAdmin/config.inc.phpsudo vim /opt/local/apache2/htdocs/phpMyAdmin/config.inc.php

7.浏览器访问 phpMyAdmin

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持爱蒂网。

来源:爱蒂网

免责声明:本文由用户上传,如有侵权请联系删除!

猜你喜欢

最新文章