1.安裝apache httpd
yum install -y httpdphp
2.安裝號後執行: systemctl start httpd 啓動,在瀏覽器輸入公網ip驗證httpd是否正常html
3.centos7安裝php5.6注意php不要過高,不然phpmyadmin報錯
安裝centos7下的php源
a.yum install epel-release
b.rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpmmysql
4.安裝php5.6依賴:
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprsql
5.重啓:systemctl start httpd數據庫
6.解壓phpMyAdmin-4.8.5-all-languages.tar 重命名成phpmyadmin apache
7.把整個文件夾phpmyadmin 移動到/var/www/html/目錄下 eg: mv /root/phpmyadmin /var/www/htmlvim
8./var/www/html/phpmyadmin下的config.sample.inc.php
第40號左右修改相關信息配置數據庫相關信息
$cfg['Servers'][$i]['controlhost'] = 'localhost';centos
$cfg['Servers'][$i]['controlport'] = '3306';瀏覽器
$cfg['Servers'][$i]['controluser'] = 'root';緩存
$cfg['Servers'][$i]['controlpass'] = 'SFASA1$';
(若是登陸的時候有報錯,把上面的host,port等信息配置在/var/www/html/phpmyadmin/libraries/config.default.php文件中)
9./var/www/html/phpmyadmin/libraries/config.default.php
修改$ cfg['blowfish_secret'] = '654321wt23asfdljksdakflsafkdsajlasfjaslfja';密碼要足夠長
數字能夠隨便填寫,解決phpmyadmin「配置文件如今須要一個短語密碼」錯誤提示
10.在瀏覽器上輸入ip/phpmyadmin登陸訪問
11.解決「變量 $cfg['TempDir'] (./tmp/)沒法訪問。phpMyAdmin沒法緩存模板文件,因此會運行緩慢。」錯誤。在phpmyadmin文件夾下新建目錄tmp 而且給予777權限
12.不想佔用80端口開業修改httpd端口號
a.vim /etc/httpd/conf/httpd.conf 找到 Listen 80 修改成:Listen 8089
b. 重啓 service httpd restart