日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

centos 7 mysql图形界面_centos7-vnstat图形界面搭建

發布時間:2024/4/14 数据库 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos 7 mysql图形界面_centos7-vnstat图形界面搭建 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

一 安裝vnstat服務

1 步驟1.首先,您將需要為您的Linux版本啟用EPEL存儲庫包

yum-yinstallepel-release

yum-yupdate

2步驟2.安裝VnStat。

使用yum命令行實用程序在您的系統上安裝vnstat包:

yum-yinstallvnstat

3 啟動服務并設置開機啟動

systemctl?start?vnstat

systemctl?enable?vnstat

4 檢查命令是否安裝成功

vnstat--help

vnstat -i ens33 (注意看自己的網卡 通過ip add查看)

二 安裝LAMP環境

1關閉firewall:

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall開機啟動

2關閉SELINUX

vi /etc/selinux/config

#SELINUX=enforcing #注釋掉

#SELINUXTYPE=targeted #注釋掉

SELINUX=disabled #增加

:wq! #保存退出

setenforce 0 #使配置立即生效

3安裝Apache

yum install httpd #根據提示,輸入Y安裝即可成功安裝

systemctl start httpd.service #啟動apache

systemctl stop httpd.service #停止apache

systemctl restart httpd.service #重啟apache

systemctl enable httpd.service #設置apache開機啟動

在客戶端瀏覽器中打開服務器IP地址,會出現下面的界面,說明apache安裝成功

4安裝MariaDB

CentOS 7.0中,已經使用MariaDB替代了MySQL數據庫

1、安裝MariaDB

yum install mariadb mariadb-server #詢問是否要安裝,輸入Y即可自動安裝,直到安裝完成

systemctl start mariadb.service #啟動MariaDB

systemctl stop mariadb.service #停止MariaDB

systemctl restart mariadb.service #重啟MariaDB

systemctl enable mariadb.service #設置開機啟動

cp /usr/share/mysql/my-huge.cnf /etc/my.cnf #拷貝配置文件(注意:如果/etc目錄下面默認有一個my.cnf,直接覆蓋即可)

2、為root賬戶設置密碼

mysql_secure_installation

回車,根據提示輸入Y

輸入2次密碼,回車

根據提示一路輸入Y

最后出現:Thanks for using MySQL!

MySql密碼設置完成,重新啟動MySQL:

systemctl restart mariadb.service #重啟MariaDB

5安裝PHP

1、安裝php

yum install php #根據提示輸入Y直到安裝完成

2、安裝PHP組件,使PHP支持 MariaDB

yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash

#這里選擇以上安裝包進行安裝,根據提示輸入Y回車

systemctl restart mariadb.service #重啟MariaDB

systemctl restart httpd.service #重啟apache

三 配置vnstat圖像界面

1 添加計劃任務定時更新數據:

cat >> /etc/cron.d/vncstat <

*/5 * * * * root vnstat -u -i eth0

EOF

2安裝vnStat PHP frontend使用web界面管理:

cd /var/www/html

wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz

tar zxvf vnstat_php_frontend-1.5.1.tar.gz

mv vnstat_php_frontend-1.5.1 vnstat

3定時生成php接口數據 :

cat >> /etc/cron.d/vncstat <

*/5 * * * * root vnstat --dumpdb -i lo > /var/www/html/vnstat/dumps/vnstat_dump_lo

EOF

4 修改配置文件

注意將網卡改成你實際的網卡

vi /var/www/html/vnstat/config.php

$language?=?"en";

$iface_list?=?array("ens33",?"sixxs");

$iface_title["eth0"]?=?"Public Interface";

$vnstat_bin?=?"/usr/bin/vnstat";

1 重啟服務:

systemctl restart mariadb.service #重啟MariaDB

systemctl restart httpd.service #重啟apache

2 打開網頁,輸入http://192.168.1.17/vnstat/

備注:

1 借鑒網址:

2 以上操作方法只是基本的部署方案,實際使用還需多多研究配置和配置文件;以上我也是借鑒的別人的總結,可能存在一些問題,謝謝!

總結

以上是生活随笔為你收集整理的centos 7 mysql图形界面_centos7-vnstat图形界面搭建的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。