[精讚] [會員登入]
1883

[MariaDB] Centos 7安裝mariadb + apache + php + phpmyadmin

“
Centos 7安裝mariadb+apache+php+phpmyadmin
„

分享此文連結 //n.sfs.tw/10321

分享連結 [MariaDB] Centos 7安裝mariadb + apache + php + phpmyadmin@新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2022-10-07 11:30:13 最後編修
2016-11-29 11:55:33 By 張○○
 

自動目錄

 

此文部分內容因為版本更新後失效,僅供參考。

2022年有更新的文章可參考 [Centos7] 安裝apache+php7+mariadb10+selinux@新精讚

OS

# uname -a
Linux localhost.localdomain 3.10.0-327.36.2.el7.x86_64 #1 SMP Mon Oct 10 23:08:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 7.2.1511 (Core)

安裝Mariadb(5.5)

安裝SERVER+CLIENT Devel
# yum install mariadb*

啟動
#  systemctl start mariadb

設定密碼

# mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version:
5.5.50-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD( '3567488' );

安裝APACHE

# yum install httpd

# service httpd start

開啟防火牆
# firewall-cmd --zone=public --add-port=80/tcp --permanent

重啟防火牆
# service firewalld restart

安裝版本
# apachectl -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Jul 18 2016 15:30:14

安裝PHP

# yum install php

# yum install php-mysql

安裝PHPMyAdmin

# yum install wget

# yum install unzip

# yum install php-mbstring

到網頁的目錄
# cd /var/www/html

去phpmyadmin官網下載最新的版本(2016.11.29)是4.6.5.1,此版本需要 PHP 5.5 to 7.0
# wget https://files.phpmyadmin.net/phpMyAdmin/4.6.5.1/phpMyAdmin-4.6.5.1-all-languages.zip
# unzip phpMyAdmin-4.6.5.1-all-languages.zip

或 PHP 5.3.7 to 7.0
# wget https://files.phpmyadmin.net/phpMyAdmin/4.4.15.9/phpMyAdmin-4.4.15.9-all-languages.zip
# unzip phpMyAdmin-4.4.15.9-all-languages.zip

修改目錄名稱
# mv phpMyAdmin-4.x.x.x-all-languages phpMyAdmin

開啟你的網頁http://x.x.x.x/phpMyAdm/

END

你可能感興趣的文章

[Mysql] Trigger 觸發使用方法 trigger 在資料庫的使用上,具有極大的方便性,該如何使用?

[Mysql/Mariadb] 建立使用者及資料庫 Mysql/Mariadb建立使用者、刪除使用者、給予權限、建立資料庫

[Mysql] 將記錄由0變1、1變0;或是判斷後再改值的寫法 MySQL 將記錄由0變1,1變0的SQL寫法 假如欄位 `active` 為0 是失效;1 為有效,他的型態是 tin

[Mysql] 建立叢集式資料庫1/4 -- 安裝及設定DB1 使用galera建立Mysql的叢集式資料庫 (GALERA CLUSTER FOR MYSQL THE TRUE MULTI-MASTER)

[Mysql] 建立叢集式資料庫2/4 -- DB2、DB3設定 使用galera建立Mysql的叢集式資料庫 ,繼續建立第2,第3台DBs

[Mysql] 使用索引來加速搜尋 只要是常常用到搜索條件的欄位,就應該把它設成索引鍵,有無設定的速度差可能會好幾倍

隨機好文

HP SAS硬碟leds燈號說明 HP SAS硬碟leds燈號(hp g7/g6系統適用)說明

UTF-8的網頁但IE8一片空白 UTF8編碼的網頁在Firefox 正常顯示、但IE8 就是空白,IE8編碼設定是「自動偵測」可是自動偵測到的是 big5...

[SIP] OPENSER LINUX版本安裝全記錄 [SIP] OPENSER LINUX版本安裝全記錄

[CKeditor4] 設定區塊樣式、段落格式、字型名稱及字型大小 CKeditor4中要自訂設定區塊樣式、段落格式、字型名稱及字型大小。

[HTML5] script 的新增屬性 defer, async script 的新增屬性 defer, async