您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關(guān)怎么進行phpMyAdmin部署,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關(guān)知識有一定的了解。
LNMP WEB架構(gòu)中,Nginx為一款高性能WEB服務(wù)器,本身是不能處理PHP的,當接收到客戶端瀏覽器發(fā)送HTTP Request請求時,Nginx服務(wù)器響應(yīng)并處理WEB請求,靜態(tài)資源CSS、圖片、視頻、TXT等靜態(tài)文件請求,Nginx服務(wù)器可以直接處理并回應(yīng)。
但是PHP動態(tài)頁面請求Nginx不能直接處理,Nginx服務(wù)器會將PHP網(wǎng)頁腳本通過接口傳輸協(xié)議(網(wǎng)關(guān)協(xié)議)PHP-FCGI(Fast-CGI)傳輸給PHP-FPM(進程管理程序),PHP-FPM不做處理,然后PHP-FPM調(diào)用PHP解析器進程,PHP解析器解析PHP腳本信息。PHP解析器進程可以啟動多個,可以實現(xiàn)多進程并發(fā)執(zhí)行。
PHP解釋器將解析后的腳本返回到PHP-FPM,PHP-FPM再通過Fast-CGI的形式將腳本信息傳送給Nginx,Nginx服務(wù)器再通過Http Response的形式傳送給瀏覽器,瀏覽器再進行解析與渲染然后進行呈現(xiàn)。
[root@node01 ~]# rpm -qa|grep mariadb mariadb-server-5.5.60-1.el7_5.x86_64 mariadb-libs-5.5.60-1.el7_5.x86_64 mariadb-5.5.60-1.el7_5.x86_64 [root@node01 ~]# [root@node01 ~]# yum -y remove mariadb mariadb-server mariadb-libs
[root@node01 ~]# useradd -s /sbin/nologin -M mysql #提示mysql已存在可以忽略此步驟
[root@node01 ~]# mkdir -p /data/mysql [root@node01 ~]# chown -R mysql.mysql /data
[root@node01 ~]# yum install -y gcc gcc-devel gcc-c++ gcc-c++-devel libaio* autoconf* automake* zlib* libxml* ncurses-devel ncurses libgcrypt* libtool* cmake openssl openssl-devel bison bison-devel perl-Data_Dumper boost boost-doc boost-devel
[root@node01 ~]# cd /usr/src/ [root@node01 src]# wget http://mirrors.163.com/mysql/Downloads/MySQL-5.7/mysql-5.7.30.tar.gz [root@node01 src]# ls debug kernels mysql-5.7.30.tar.gz [root@node01 src]# tar xf mysql-5.7.30.tar.gz [root@node01 src]# cd mysql-5.7.30/ [root@node01 mysql-5.7.30]#
[root@node01 mysql-5.7.30]# mkdir ./boost [root@node01 mysql-5.7.30]# cd ./boost [root@node01 boost]# wget http://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz
說明:解壓等操作編譯的時候程序會做,這里只需把包下載或者拷貝到這里即可
[root@node01 boost]# cd ../ [root@node01 mysql-5.7.30]# cmake \ -DBUILD_CONFIG=mysql_release \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ -DMYSQL_DATADIR=/data/mysql \ -DSYSCONFDIR=/etc \ -DMYSQL_UNIX_ADDR=/tmp/mysql.sock \ -DSYSTEMD_PID_DIR=/data/mysql \ -DMYSQL_USER=mysql \ -DWITH_SYSTEMD=1 \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DMYSQL_TCP_PORT=3306 \ -DENABLED_LOCAL_INFILE=1 \ -DENABLE_DOWNLOADS=1 \ -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DWITH_DEBUG=0 \ -DMYSQL_MAINTAINER_MODE=0 \ -DWITH_SSL:STRING=system \ -DWITH_ZLIB:STRING=bundled \ -DDOWNLOAD_BOOST=1 \ -DWITH_BOOST=./boost
cmake \ -DBUILD_CONFIG=mysql_release \ #此選項使用Oracle使用的相同構(gòu)建選項配置源分發(fā),以生成官方MySQL版本的二進制分發(fā)。 -DCMAKE_BUILD_TYPE=RelWithDebInfo \ #要生成的構(gòu)建類型 = 啟用優(yōu)化并生成調(diào)試信息。這是默認的MySQL構(gòu)建類型。 -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ #選項表示基本安裝目錄。 -DMYSQL_DATADIR=/data/mysql \ #MySQL數(shù)據(jù)目錄的位置。 -DSYSCONFDIR=/etc \ #默認my.cnf選項文件目錄。 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock \ #服務(wù)器偵聽套接字連接的Unix套接字文件路徑。這必須是絕對路徑名。默認是/tmp/mysql.sock。 -DSYSTEMD_PID_DIR=/usr/local/mysql \ #當MySQL由systemd管理時,在其中創(chuàng)建PID文件的目錄的名稱。默認是 /var/run/mysqld; 這可能會根據(jù)INSTALL_LAYOUT值隱式更改 。 -DMYSQL_USER=mysql \ #指定MySQL的啟動用戶 -DWITH_SYSTEMD=1 \ #安裝systemd支持文件 -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DMYSQL_TCP_PORT=3306 \ #配置 MySQL 監(jiān)聽的端口號 -DENABLED_LOCAL_INFILE=1 \ #使mysql客戶端具有l(wèi)oad data infile的功能,該功能具有安全隱患 load data infile語句從一個文本文件中以很高的速度讀入一個表 -DENABLE_DOWNLOADS=1 \ #googlemock發(fā)行版的路徑,用于基于Google Test的單元測試。=1,CMake將從GitHub下載發(fā)行版。 -DWITH_PARTITION_STORAGE_ENGINE=1 \ -DEXTRA_CHARSETS=all \ -DDEFAULT_CHARSET=utf8 \ #服務(wù)器字符集 -DDEFAULT_COLLATION=utf8_general_ci \ #服務(wù)器排序規(guī)則 -DWITH_DEBUG=0 \ #不包含調(diào)試支持。 -DMYSQL_MAINTAINER_MODE=0 \ #是否啟用MySQL維護者特定的開發(fā)環(huán)境。如果啟用,此選項會導(dǎo)致編譯器警告變?yōu)殄e誤。 -DWITH_SSL:STRING=system \ -DWITH_ZLIB:STRING=bundled \ -DDOWNLOAD_BOOST=1 \ #是否下載Boost庫。默認是OFF。 -DWITH_BOOST=./boost #指定Boost庫目錄位置。
[root@node01 mysql-5.7.30]# echo $? #返回結(jié)果為0說明編譯無異常
[root@node01 mysql-5.7.30]# make && make install
這個過程比較漫長,耐心等待一下
[root@node01 mysql-5.7.30]# echo $? #返回結(jié)果為0說明編譯無異常
[root@node01 mysql-5.7.30]# cp ./scripts/mysqld.service /usr/lib/systemd/system
[root@node01 mysql-5.7.30]# cat > /etc/profile.d/mysql.sh << EOF PATH=/usr/local/mysql/bin:$PATH export PATH EOF [root@node01 mysql-5.7.30]# source /etc/profile
[root@node01 mysql-5.7.30]# /usr/local/mysql/bin/mysqld --initialize-insecure --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql
[root@node01 mysql-5.7.30]# systemctl enable mysqld.service [root@node01 mysql-5.7.30]# systemctl daemon-reload [root@node01 mysql-5.7.30]# systemctl start mysqld.service [root@node01 mysql-5.7.30]# systemctl status mysqld.service
[root@node01 src]# yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
依賴包說明:
編譯依賴 gcc 環(huán)境,所以需要:gcc gcc-c++;
PCRE(Perl Compatible Regular Expressions) 是一個Perl庫,包括 perl 兼容的正則表達式庫。nginx 的 http 模塊使用 pcre 來解析正則表達式,所以需要在 linux 上安裝 pcre 庫,pcre-devel 是使用 pcre 開發(fā)的一個二次開發(fā)庫,所以需要:pcre pcre-devel ;
zlib 庫提供了很多種壓縮和解壓縮的方式, nginx 使用 zlib 對 http 包的內(nèi)容進行 gzip ,所以需要在 Centos 上安裝 zlib 庫,所以需要:zlib zlib-devel ;
OpenSSL 是一個強大的安全套接字層密碼庫,囊括主要的密碼算法、常用的密鑰和證書封裝管理功能及 SSL 協(xié)議,并提供豐富的應(yīng)用程序供測試或其它目的使用。nginx 不僅支持 http 協(xié)議,還支持 https(即在ssl協(xié)議上傳輸http),所以需要在 Centos 安裝 OpenSSL 庫,所以需要:openssl openssl-devel ;
[root@node01 src]# wget http://nginx.org/download/nginx-1.19.0.tar.gz
[root@node01 src]# tar xf nginx-1.19.0.tar.gz [root@node01 src]# cd nginx-1.19.0/ [root@node01 nginx-1.19.0]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module [root@node01 nginx-1.19.0]# echo $? 0 [root@node01 nginx-1.19.0]# [root@node01 nginx-1.19.0]# make && make install [root@node01 nginx-1.19.0]# echo $? 0 [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# cat > /etc/profile.d/nginx.sh << EOF PATH=/usr/local/nginx/sbin:$PATH export PATH EOF [root@node01 nginx-1.19.0]# source /etc/profile
[root@node01 nginx-1.19.0]# nginx -V nginx version: nginx/1.19.0 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) configure arguments: --prefix=/usr/local/nginx --with-http_stub_status_module [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# nginx [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# netstat -ntlp | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23434/nginx: master [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# vi /lib/systemd/system/nginx.service
添加以下內(nèi)容:
[Unit] Description=nginx After=network.target [Service] Type=forking ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/usr/local/nginx/sbin/nginx -s quit PrivateTmp=true [Install] WantedBy=multi-user.target
[root@node01 nginx-1.19.0]# pkill nginx [root@node01 nginx-1.19.0]# [root@node01 nginx-1.19.0]# systemctl start nginx
[root@node01 nginx-1.19.0]# systemctl status nginx ● nginx.service - nginx Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2020-06-11 03:56:27 CST; 6s ago Process: 23763 ExecStart=/usr/local/nginx/sbin/nginx (code=exited, status=0/SUCCESS) Main PID: 23764 (nginx) Tasks: 2 CGroup: /system.slice/nginx.service ├─23764 nginx: master process /usr/local/nginx/sbin/nginx └─23765 nginx: worker process Jun 11 03:56:27 node01 systemd[1]: Starting nginx... Jun 11 03:56:27 node01 systemd[1]: Started nginx. [root@node01 nginx-1.19.0]# [root@node01 nginx-1.19.0]# netstat -ntlp | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23764/nginx: master [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# systemctl enable nginx Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service. [root@node01 nginx-1.19.0]# [root@node01 nginx-1.19.0]# systemctl status nginx ● nginx.service - nginx Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-06-11 03:56:27 CST; 2min 6s ago Main PID: 23764 (nginx) CGroup: /system.slice/nginx.service ├─23764 nginx: master process /usr/local/nginx/sbin/nginx └─23765 nginx: worker process Jun 11 03:56:27 node01 systemd[1]: Starting nginx... Jun 11 03:56:27 node01 systemd[1]: Started nginx. [root@node01 nginx-1.19.0]#
[root@node01 nginx-1.19.0]# systemctl start nginx #啟動服務(wù) [root@node01 nginx-1.19.0]# systemctl status nginx #查看狀態(tài) [root@node01 nginx-1.19.0]# systemctl stop nginx #停止服務(wù) [root@node01 nginx-1.19.0]# systemctl restart nginx #重啟服務(wù) [root@node01 nginx-1.19.0]# systemctl reload nginx #修改配置文件后重載 [root@node01 nginx-1.19.0]# systemctl enable nginx #開機自啟動 [root@node01 nginx-1.19.0]# systemctl didable nginx #禁止開機自啟動
[root@node01 ~]# yum -y install gd curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel
[root@node01 src]# wget https://www.php.net/distributions/php-5.6.40.tar.gz
[root@node01 src]# tar xf php-5.6.40.tar.gz [root@node01 src]# cd php-5.6.40/ [root@node01 php-5.6.40]# ./configure --prefix=/usr/local/php \ --enable-fpm \ --enable-debug \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --enable-mbstring \ --with-curl \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-config-file-path=/usr/local/php/etc \ --with-zlib-dir [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# echo $? 0 [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# make && make install [root@node01 php-5.6.40]# echo $? 0 [root@node01 php-5.6.40]#
[root@node01 php-5.6.40]# cat > /etc/profile.d/php.sh << EOF PATH=/usr/local/php/bin/:$PATH export PATH EOF [root@node01 php-5.6.40]# source /etc/profile
[root@node01 php-5.6.40]# php -v PHP 5.6.40 (cli) (built: Jun 11 2020 07:29:14) (DEBUG) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies [root@node01 php-5.6.40]#
[root@node01 php-5.6.40]# cp php.ini-development /usr/local/php/etc/php.ini [root@node01 php-5.6.40]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf [root@node01 php-5.6.40]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm [root@node01 php-5.6.40]# chmod +x /etc/init.d/php-fpm
[root@node01 php-5.6.40]# useradd -s /sbin/nologin -m nginx [root@node01 php-5.6.40]# cp /usr/local/php/etc/php-fpm.conf{,.bak} [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# vi /usr/local/php/etc/php-fpm.conf [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# egrep "^(user|group)" /usr/local/php/etc/php-fpm.conf user = nginx group = nginx [root@node01 php-5.6.40]#
打開php-fpm.conf
[root@node01 php-5.6.40]# vi /usr/local/php/etc/php-fpm.conf
找到以下內(nèi)容并修改:
; Pid file ; Note: the default prefix is /usr/local/php/var ; Default Value: none pid = /var/run/php-fpm.pid
vi /usr/lib/systemd/system/php-fpm.service
添加如下內(nèi)容:
[Unit] Description=The PHP FastCGI Process Manager After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/php-fpm.pid ExecStart=/usr/local/php/sbin/php-fpm ExecReload=/bin/kill -USR2 $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target
[root@node01 php-5.6.40]# systemctl daemon-reload [root@node01 php-5.6.40]# systemctl start php-fpm [root@node01 php-5.6.40]#
[root@node01 php-5.6.40]# systemctl status php-fpm ● php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2020-06-11 08:02:38 CST; 4min 47s ago Process: 21478 ExecStart=/usr/local/php/sbin/php-fpm (code=exited, status=0/SUCCESS) Main PID: 21481 (php-fpm) Tasks: 3 CGroup: /system.slice/php-fpm.service ├─21481 php-fpm: master process (/usr/local/php/etc/php-fpm.conf) ├─21482 php-fpm: pool www └─21483 php-fpm: pool www Jun 11 08:02:38 node01 systemd[1]: Starting The PHP FastCGI Process Manager... Jun 11 08:02:38 node01 systemd[1]: Started The PHP FastCGI Process Manager. [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# netstat -ntlp | grep 9000 tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 21481/php-fpm: mast [root@node01 php-5.6.40]#
[root@node01 php-5.6.40]# systemctl enable php-fpm Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service. [root@node01 php-5.6.40]# [root@node01 php-5.6.40]# systemctl status php-fpm ● php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-06-11 08:02:38 CST; 7min ago Main PID: 21481 (php-fpm) CGroup: /system.slice/php-fpm.service ├─21481 php-fpm: master process (/usr/local/php/etc/php-fpm.conf) ├─21482 php-fpm: pool www └─21483 php-fpm: pool www Jun 11 08:02:38 node01 systemd[1]: Starting The PHP FastCGI Process Manager... Jun 11 08:02:38 node01 systemd[1]: Started The PHP FastCGI Process Manager. [root@node01 php-5.6.40]#
[root@node01 php-5.6.40]# systemctl start php-fpm #啟動服務(wù) [root@node01 php-5.6.40]# systemctl status php-fpm #查看狀態(tài) [root@node01 php-5.6.40]# systemctl stop php-fpm #停止服務(wù) [root@node01 php-5.6.40]# systemctl restart php-fpm #重啟服務(wù) [root@node01 php-5.6.40]# systemctl reload php-fpm #修改配置文件后重載 [root@node01 php-5.6.40]# systemctl enable php-fpm #開機自啟動 [root@node01 php-5.6.40]# systemctl didable php-fpm #禁止開機自啟動
phpMyAdmin 是一個用PHP編寫的軟件工具,可以通過web方式控制和操作MySQL數(shù)據(jù)庫。通過phpMyAdmin可以完全對數(shù)據(jù)庫進行操作,例如建立、復(fù)制和刪除數(shù)據(jù)等等。如果使用合適的工具,MySQL數(shù)據(jù)庫的管理就會變得相當簡單。MySQL 命令行方式需要對 MySQL 知識非常熟悉,對SQL語言也是同樣的道理。不僅如此,如果數(shù)據(jù)庫的訪問量很大,列表中數(shù)據(jù)的讀取就會相當困難。
當前出現(xiàn)很多GUI MySQL客戶程序,其中最為出色的是基于 Web 的phpMyAdmin 工具。這是一種MySQL數(shù)據(jù)庫前臺的基于PHP的工具。
PhpMyAdmin 的缺點是必須安裝在 Web 服務(wù)器中,所以如果沒有合適的訪問權(quán)限,其它用戶有可能損害到 SQL 數(shù)據(jù)。
在官網(wǎng)http://www.phpmyadmin.net/下載phpMyAdmin源碼包phpMyAdmin-4.9.5-all-languages.zip
[root@node01 src]# wget https://files.phpmyadmin.net/phpMyAdmin/4.9.5/phpMyAdmin-4.9.5-all-languages.zip
解壓phpMyAdmin-4.9.5-all-languages.zip到nginx的DocumentRoot目錄(/usr/local/nginx/html)中
[root@node01 src]# unzip phpMyAdmin-4.9.5-all-languages.zip -d /usr/local/nginx/html/ [root@node01 src]# mv /usr/local/nginx/html/phpMyAdmin-4.9.5-all-languages /usr/local/nginx/html/phpMyAdmin [root@node01 src]# chown -R nginx:nginx /usr/local/nginx/html/phpMyAdmin/ [root@node01 src]#
[root@node01 src]# cp /usr/local/nginx/html/phpMyAdmin/config.sample.inc.php /usr/local/nginx/html/phpMyAdmin/config.inc.php [root@node01 src]#
[root@node01 src]# vim /usr/local/nginx/html/phpMyAdmin/config.inc.php $cfg['Servers'][$i]['host'] = '127.0.0.1'; -----設(shè)置
[root@node01 src]# systemctl start mysqld
[root@node01 src]# mysqladmin -uroot password '123456' mysqladmin: [Warning] Using a password on the command line interface can be insecure. Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety. [root@node01 src]# [root@node01 src]# mysql -uroot -p123456 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 59 Server version: 5.7.30 MySQL Community Server (GPL) Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
#配置phpMyAdmin [root@node01 src]# vi /usr/local/nginx/conf/nginx.conf #user nobody; user nginx; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; access_log logs/phpMyAdmin.access.log main; location / { root html; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } [root@node01 src]# systemctl start nginx
phpMyAdmin部署完成。
關(guān)于怎么進行phpMyAdmin部署就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。