Centos7.2 編譯安裝方式搭建 phpMyAdmin

來源:互聯網
上載者:User

標籤:編譯安裝   .com   檔案類型   tps   php7   ann   centos7.2   rem   with   

背景說明: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 [email protected]:~/

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.php
sudo vim /opt/local/apache2/htdocs/phpMyAdmin/config.inc.php

7.瀏覽器訪問 phpMyAdmin

Centos7.2 編譯安裝方式搭建 phpMyAdmin

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.