Linux命令:nginx及php和mysql安装使用

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS PostgreSQL,集群系列 2核4GB
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

首先下载mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz


lftp test@10.109.134.247:/> get mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz 

314592758 bytes transferred in 28 seconds (10.66M/s)                                              

lftp test@10.109.134.247:/> quit

[root@lamp ~]# ls

anaconda-ks.cfg  Downloads      Music     Pictures   Videos   install.log     mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz   nginx-1.4.1      Templates

[root@lamp ~]# du -lh mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz 

301Mmysql-5.6.30-linux-glibc2.5-x86_64.tar.gz

[root@lamp ~]# tar xf mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz -C /usr/local 

#解压缩,-C指定解压缩目录

[root@lamp ~]# ls /usr/local/

bin  games    lib     mysql-5.6.30-linux-glibc2.5-x86_64  share

etc  include  lib64  lost+found  sbin                               

[root@lamp ~]# mkdir /mydata/data -pv  #-pv递归创建/mydata/data目录

mkdir: created directory `/mydata'

mkdir: created directory `/mydata/data'

[root@lamp ~]# useradd -r mysql  #新增mysql用户,-r指定创建的为系统用户,不作为登录用户

[root@lamp ~]# chown -R mysql.mysql /mydata/data  #更改属主和属组 -R指目录下的所有子文件

都一同更改属主和属组。

[root@lamp ~]# cd /usr/local

[root@lamp local]# ln -sv mysql-5.6.30-linux-glibc2.5-x86_64 mysql  #创建软链接

`mysql' -> `mysql-5.6.30-linux-glibc2.5-x86_64'

[root@lamp local]# cd mysql

[root@lamp mysql]# ll

total 68

drwxr-xr-x.  2 root root   4096 Apr 16 15:23 bin

-rw-r--r--.  1 7161 wheel 17987 Mar  3  2016 COPYING

drwxr-xr-x.  3 root root   4096 Apr 16 15:24 data

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 docs

drwxr-xr-x.  3 root root   4096 Apr 16 15:23 include

drwxr-xr-x.  3 root root   4096 Apr 16 15:24 lib

drwxr-xr-x.  4 root root   4096 Apr 16 15:24 man

drwxr-xr-x. 10 root root   4096 Apr 16 15:24 mysql-test

-rw-r--r--.  1 7161 wheel  2496 Mar  3  2016 README

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 scripts

drwxr-xr-x. 28 root root   4096 Apr 16 15:24 share

drwxr-xr-x.  4 root root   4096 Apr 16 15:24 sql-bench

drwxr-xr-x.  2 root root   4096 Apr 16 15:24 support-files

[root@lamp mysql]# chown -R root.mysql ./*  #-R递归更改属主和属组

[root@lamp mysql]# ll

total 68

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:23 bin

-rw-r--r--.  1 root mysql 17987 Mar  3  2016 COPYING

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:24 data

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 docs

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:23 include

drwxr-xr-x.  3 root mysql  4096 Apr 16 15:24 lib

drwxr-xr-x.  4 root mysql  4096 Apr 16 15:24 man

drwxr-xr-x. 10 root mysql  4096 Apr 16 15:24 mysql-test

-rw-r--r--.  1 root mysql  2496 Mar  3  2016 README

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 scripts

drwxr-xr-x. 28 root mysql  4096 Apr 16 15:24 share

drwxr-xr-x.  4 root mysql  4096 Apr 16 15:24 sql-bench

drwxr-xr-x.  2 root mysql  4096 Apr 16 15:24 support-files

[root@lamp mysql]# scripts/mysql_install_db  --user=mysql --datadir=/mydata/data

#初始化数据库,指定数据库用户--user=mysql,指定数据目录--datadir=/mydata/data

Installing MySQL system tables...2017-04-16 16:01:37 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-04-16 16:01:37 0 [Note] ./bin/mysqld (mysqld 5.6.30) starting as process 11891 ...

2017-04-16 16:01:37 11891 [Note] InnoDB: Using atomics to ref count buffer pool pages

2017-04-16 16:01:37 11891 [Note] InnoDB: The InnoDB memory heap is disabled

2017-04-16 16:01:37 11891 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

....................................

Filling help tables...2017-04-16 16:01:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2017-04-16 16:01:42 0 [Note] ./bin/mysqld (mysqld 5.6.30) starting as process 11913 ...

2017-04-16 16:01:42 11913 [Note] InnoDB: Using atomics to ref count buffer pool pages

2017-04-16 16:01:42 11913 [Note] InnoDB: The InnoDB memory heap is disabled

2017-04-16 16:01:42 11913 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2017-04-16 16:01:42 11913 [Note] InnoDB: Memory barrier is not used

2017-04-16 16:01:42 11913 [Note] InnoDB: Compressed tables use zlib 1.2.3

2017-04-16 16:01:42 11913 [Note] InnoDB: Using Linux native AIO

..........................................

WARNING: Default config file /etc/my.cnf exists on the system

This file will be read by default by the MySQL server

If you do not want to use this, either remove it, or use the

--defaults-file argument to mysqld_safe when starting the server  #初始化完成

[root@lamp mysql]# vim my.cnf #编辑配置文件,在文档最后增加如下红色框内容

wKioL1mKxTaDEz4aAAFhvZBsIvI567.jpg

[root@lamp mysql]# cp support-files/mysql.server /etc/init.d/mysqld 

复制mysqld启动脚本至/etc/init.d路径中

[root@lamp mysql]# chkconfig --add mysqld

[root@lamp mysql]# chkconfig --list mysqld

mysqld         0:off1:off2:off3:off4:off5:off6:off

[root@lamp mysql]# chkconfig mysqld on

[root@lamp mysql]# chkconfig --list mysqld

mysqld         0:off1:off2:on3:on4:on5:on6:off

[root@lamp mysql]# service mysqld start  #启用mysqld服务

Starting MySQL....                             [  OK  ] 

[root@lamp mysql]# netstat -tlnp  #查看监听的端口

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address    Foreign Address    State   PID/Program name 

tcp   0   0 0.0.0.0:111    0.0.0.0:*       LISTEN      1369/rpcbind        

tcp   0   0 0.0.0.0:80     0.0.0.0:*       LISTEN      7277/nginx.conf     

tcp   0   0 0.0.0.0:59282   0.0.0.0:*       LISTEN      1436/rpc.statd      

tcp   0   0 0.0.0.0:22     0.0.0.0:*       LISTEN      1659/sshd           

tcp   0   0 127.0.0.1:631   0.0.0.0:*       LISTEN      1532/cupsd          

tcp   0   0 127.0.0.1:25   0.0.0.0:*       LISTEN      1735/master         

tcp   0   0 :::3306         :::*       LISTEN      12224/mysqld        

tcp   0   0 :::111         :::*        LISTEN     1369/rpcbind        

tcp   0   0 :::22         :::*         LISTEN      1659/sshd           

tcp   0   0 ::1:631        :::*        LISTEN      1532/cupsd          

tcp   0   0 :::35043       :::*         LISTEN      1436/rpc.statd   

[root@lamp mysql]# /usr/local/mysql/bin/mysql  #启动mysql客户端

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)  #提示mysql.sock出错,解决方法如下图,在配置文档中定义sock文件路径

[root@lamp mysql]# pwd

/usr/local/mysql

[root@lamp mysql]# vim my.cnf 

wKiom1mKym2xr4PNAAEiHr5u79I524.jpg

[root@lamp mysql]# service mysqld restart

Shutting down MySQL..                                 [  OK  ]

Starting MySQL.                                     [  OK  ]

[root@lamp mysql]# /usr/local/mysql/bin/mysql #再次启动mysql客户端,正常开启。

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.6.30-log MySQL Community Server (GPL)

Copyright (c) 2000, 2016, 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> 

mysql> \q

[root@lamp ~]# vim /etc/ld.so.conf.d/mysql.conf #新建mysql库路径文件,使得系统能够识别到

 /usr/local/mysql/lib       #新增该行内容

[root@lamp ~]# ldconfig -v   #通知系统重新读取库文件,-v显示重读过程

............

libxklavier.so.15 -> libxklavier.so.15.0.0

liblcms.so.1 -> liblcms.so.1.0.19

/lib64/tls: (hwcap: 0x8000000000000000)

/usr/lib64/sse2: (hwcap: 0x0000000004000000)

/usr/lib64/tls: (hwcap: 0x8000000000000000)

[root@lamp ~]# ln -sv /usr/local/mysql/include /usr/include/mysql #创建mysql的头文件目录链接,

使得可以直接输出头文件

"/usr/include/mysql" -> "/usr/local/mysql/include"

[root@lamp ~]# ls /usr/include/mysql/

decimal.h   my_attribute.h  my_global.h   mysqld_ername.h  my_sys.h             

my_alloc.h  my_getopt.h     mysql_com.h   mysql_version.h  sql_common.h

------------------------------------------------------------------------------

至此MySQL已经安装配置完成。

首先下载安装PHP-5.4.13

[root@lamp mysql]# lftp test@10.109.134.247

Password: 

lftp test@10.109.134.247:/> get php-5.4.13.tar.bz2 

11545777 bytes transferred                              

lftp test@10.109.134.247:/> quit

[root@lamp ~]# ls

anaconda-ks.cfg  install.log  nginx-1.4.1  Templates

Desktop   install.log.syslog   php-5.4.13.tar.bz2  Videos

[root@lamp ~]# tar xf php-5.4.13.tar.bz2

[root@lamp ~]# cd php-5.4.13

[root@lamp php-5.4.13]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --enable-fpm --enable-sockets --enable-sysvshm --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-libxml-dir=/usr --enable-xml --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 --with-curl

#编译php,指定php安装目录--prefix=/usr/local/php 关联mysql安装的目录--with-mysql=/usr/local/mysql等支持各种功能。

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking build system type... x86_64-unknown-linux-gnu

checking host system type... x86_64-unknown-linux-gnu

checking target system type... x86_64-unknown-linux-gnu

checking for cc... cc

.......................

+--------------------------------------------------------------------+

| License:                                                           |

| This software is subject to the PHP License, available in this     |

| distribution in the file LICENSE.  By continuing this installation |

| process, you are bound by the terms of this license agreement.     |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point.                            |

+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec

config.status: creating main/build-defs.h

config.status: creating scripts/phpize

config.status: creating scripts/man1/phpize.1

config.status: creating scripts/php-config

config.status: creating scripts/man1/php-config.1

config.status: creating sapi/cli/php.1

config.status: creating sapi/fpm/php-fpm.conf

config.status: creating sapi/fpm/init.d.php-fpm

config.status: creating sapi/fpm/php-fpm.service

config.status: creating sapi/fpm/php-fpm.8

config.status: creating sapi/fpm/status.html

config.status: creating main/php_config.h

config.status: executing default commands

[root@lamp php-5.4.13]# make && make install  #编译安装

Installing PHP CLI binary:        /usr/local/php/bin/

Installing PHP CLI man page:      /usr/local/php/php/man/man1/

Installing PHP FPM binary:        /usr/local/php/sbin/

Installing PHP FPM config:        /usr/local/php/etc/

Installing PHP FPM man page:      /usr/local/php/php/man/man8/

Installing PHP FPM status page:      /usr/local/php/php/fpm/

Installing PHP CGI binary:        /usr/local/php/bin/

Installing build environment:     /usr/local/php/lib/php/build/

Installing header files:          /usr/local/php/include/php/

Installing helper programs:       /usr/local/php/bin/

  program: phpize

  program: php-config

Installing man pages:             /usr/local/php/php/man/man1/

  page: phpize.1

  page: php-config.1

Installing PEAR environment:      /usr/local/php/lib/php/

[PEAR] Archive_Tar    - installed: 1.3.7

[PEAR] Console_Getopt - installed: 1.3.0

[PEAR] Structures_Graph- installed: 1.0.4

[PEAR] XML_Util       - installed: 1.2.1

[PEAR] PEAR           - installed: 1.9.4

Wrote PEAR system config file at: /usr/local/php/etc/pear.conf

You may want to add: /usr/local/php/lib/php to your php.ini include_path

/root/php-5.4.13/build/shtool install -c ext/phar/phar.phar /usr/local/php/bin

ln -s -f /usr/local/php/bin/phar.phar /usr/local/php/bin/phar

Installing PDO headers:          /usr/local/php/include/php/ext/pdo/

[root@lamp php-5.4.13]# cp php.ini-production /etc/php.ini #为php提供配置文件

[root@lamp php-5.4.13]# cd /usr/local/php/etc/

[root@lamp etc]# ls

pear.conf  php-fpm.conf.default

[root@lamp etc]# cp php-fpm.conf.default php-fpm.conf  #为php-fpm提供配置文件

[root@lamp etc]# vim php-fpm.conf  #编辑配置文件,修改内容如图:

wKiom1mOTa6xF7SiAAPtVn1qES4315.jpg[root@lamp etc]# cd -  #进入上一次所在目录

/root/php-5.4.13 

[root@lamp php-5.4.13]# pwd

/root/php-5.4.13

[root@lamp php-5.4.13]# cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm  #复制启动脚本

至/etc/init.d路径下

[root@lamp php-5.4.13]# chmod +x /etc/init.d/php-fpm #给执行权限


[root@lamp php-5.4.13]# chkconfig --add php-fpm  #把服务添加至开机启动列表

[root@lamp php-5.4.13]# chkconfig --list php-fpm  #查看php-fpm服务是否开机自动启动

php-fpm         0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@lamp php-5.4.13]# service php-fpm start  #启动php-fpm服务

Starting php-fpm  done

[root@lamp php-5.4.13]# netstat -tlnp  #查看监听端口

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address   Foreign Address   State     PID/Program name   

tcp   0    0 127.0.0.1:9000       0.0.0.0:*     LISTEN    23060/php-fpm.conf) 

tcp   0    0 0.0.0.0:111         0.0.0.0:*     LISTEN    1369/rpcbind       tcp   0    0 0.0.0.0:80         0.0.0.0:*     LISTEN     7277/nginx.conf     

tcp   0   0 0.0.0.0:59282        0.0.0.0:*     LISTEN      1436/rpc.statd    

tcp   0   0 0.0.0.0:22          0.0.0.0:*     LISTEN      1659/sshd     

tcp   0   0 :::3306             :::*       LISTEN      13345/mysqld  

tcp   0   0 :::22              :::*       LISTEN      1659/sshd    

[root@lamp php-5.4.13]# cd /etc/nginx

[root@lamp nginx]# ls

fastcgi.conf   koi-utf    nginx.conf    uwsgi_params

fastcgi.conf.default    koi-win    nginx.conf.default   uwsgi_params.default

fastcgi_params     mime.types     scgi_params      win-utf

fastcgi_params.default  mime.types.default  scgi_params.default

[root@lamp nginx]# ps aux  #查看系统进程,php-fpm是否一启动就开启了8个子进程

(php-fpm配置文档中设置一启动php-fpm进程就启动8个子进程)

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

postfix  23030  0.0  0.1  62052  2680 ? S    08:36   0:00 pickup -l -t fifo -u

root    23060  0.0  0.2 107460  4564 ? Ss   08:45   0:00 php-fpm: master process (/usr/local/php/e

nobody   23061  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23062  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www   

nobody   23063  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www  

nobody   23064  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www  

nobody   23065  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www

nobody   23066  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www 

nobody  23067  0.0  0.1 107460  3728 ?  S   08:45   0:00 php-fpm: pool www      

nobody   23068  0.0  0.1 107460  3728 ?  S  08:45   0:00 php-fpm: pool www   

[root@lamp nginx]# vim nginx.conf  #编辑nginx配置文件,启用php功能,如下图:

wKioL1mOWcigPC-9AAEWfwH1eC4959.jpg

[root@lamp nginx]# vim fastcgi_params  #编辑fastcgi配置文档,删除该文档之前的内容

wKioL1mOX3Xy3Px8AAXC5uExZ8M314.jpg

新增以下内容,保存并退出:

  fastcgi_param   GATEWAY_INTERFACE     CGI/1.1;

  fastcgi_param   SERVER_SOFTWARE      nginx;

  fastcgi_param   QUERY_STRING        $query_string;

  fastcgi_param   REQUEST_METHOD       $request_method;

  fastcgi_param   CONTENT_TYPE        $content_type;

  fastcgi_param   CONTENT_LENGTH       $content_length;

  fastcgi_param   SCRIPT_FILENAME      $document_root$fastcgi_script_name;

  fastcgi_param   SCRIPT_NAME         $fastcgi_script_name;

  fastcgi_param   REQUEST_URI         $request_uri;

  fastcgi_param   DOCUMENT_URI        $document_uri;

  fastcgi_param   DOCUMENT_ROOT      $document_root;

  fastcgi_param   SERVER_PROTOCOL      $server_protocol;

  fastcgi_param   REMOTE_ADDR         $remote_addr;

  fastcgi_param   REMOTE_PORT         $remote_port;

  fastcgi_param   SERVER_ADDR         $server_addr;

  fastcgi_param   SERVER_PORT         $server_port;

  fastcgi_param   SERVER_NAME         $server_name;

[root@lamp nginx]# nginx -t  #检测nginx配置文档是否有语法错误

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

[root@lamp nginx]# service nginx reload  #重新加载nginx服务

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

Reloading nginx:                                [  OK  ]

[root@lamp nginx]# cd /usr/html

[root@lamp html]# ls

50x.html  index.html

[root@lamp html]# mv index.html index.back  #修改默认网页文件名称

[root@lamp html]# vim index.php  #新建.php网页文件,内容如下:

<?php

phpinfo();

?>

[root@lamp html]# vim /etc/nginx/nginx.conf #把index.php默认主页的格式加入到配置文档

wKiom1mOZI-DyiKZAABsAgqPKAU113.jpg

在浏览器中输入IP访问测试如下:

wKiom1mOZN_jneGbAAQl6Lah5Ao488.jpg

必须给nginx安装xcache缓存加速



mysql-5.6.30-linux-glibc2.5-x86_64.tar.gz下载地址:https://pan.baidu.com/s/1skJOITZ

php-5.4.13.tar.bz2下载地址:http://us3.php.net/distributions/php-5.4.13.tar.bz2
















本文转自wang650108151CTO博客,原文链接:http://blog.51cto.com/woyaoxuelinux/1955685 ,如需转载请自行联系原作者

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
11天前
|
Java 关系型数据库 MySQL
在Linux平台上进行JDK、Tomcat、MySQL的安装并部署后端项目
现在,你可以通过访问http://Your_IP:Tomcat_Port/Your_Project访问你的项目了。如果一切顺利,你将看到那绚烂的胜利之光照耀在你的项目之上!
70 41
|
3天前
|
开发框架 Java 关系型数据库
在Linux系统中安装JDK、Tomcat、MySQL以及部署J2EE后端接口
校验时,浏览器输入:http://[your_server_IP]:8080/myapp。如果你看到你的应用的欢迎页面,恭喜你,一切都已就绪。
87 17
|
9天前
|
缓存 Linux 数据安全/隐私保护
Linux环境下如何通过手动调用drop_caches命令释放内存
总的来说,记录住“drop_caches” 命令并理解其含义,可以让你在日常使用Linux的过程中更加娴熟和自如。
59 23
|
8天前
|
Java 关系型数据库 MySQL
在Linux操作系统上设置JDK、Tomcat、MySQL以及J2EE后端接口的部署步骤
让我们总结一下,给你的Linux操作系统装备上最强的军队,需要先后装备好JDK的弓箭,布置好Tomcat的阵地,再把MySQL的物资原料准备好,最后部署好J2EE攻城车,那就准备好进军吧,你的Linux军团,无人可挡!
45 18
|
8天前
|
消息中间件 NoSQL Linux
Redis的基本介绍和安装方式(包括Linux和Windows版本),以及常用命令的演示
Redis(Remote Dictionary Server)是一个高性能的开源键值存储数据库。它支持字符串、列表、散列、集合等多种数据类型,具有持久化、发布/订阅等高级功能。由于其出色的性能和广泛的使用场景,Redis在应用程序中常作为高速缓存、消息队列等用途。
96 16
|
10天前
|
开发框架 关系型数据库 Java
Linux操作系统中JDK、Tomcat、MySQL的完整安装流程以及J2EE后端接口的部署
然后Tomcat会自动将其解压成一个名为ROOT的文件夹。重启Tomcat,让新“植物”适应新环境。访问http://localhost:8080/yourproject看到你的项目页面,说明“植物”种植成功。
52 10
|
1月前
|
关系型数据库 MySQL Linux
在Linux环境下备份Docker中的MySQL数据并传输到其他服务器以实现数据级别的容灾
以上就是在Linux环境下备份Docker中的MySQL数据并传输到其他服务器以实现数据级别的容灾的步骤。这个过程就像是一场接力赛,数据从MySQL数据库中接力棒一样传递到备份文件,再从备份文件传递到其他服务器,最后再传递回MySQL数据库。这样,即使在灾难发生时,我们也可以快速恢复数据,保证业务的正常运行。
116 28
|
1月前
|
Linux 定位技术
Linux系统中的cd命令:目录切换技巧
踏过千山,越过万水,人生就是一场不断前行的旅程,总充满了未知与挑战。然而,“cd”命令如同你的旅伴,会带你穿梭在如棋盘一般的文件系统中,探索每一处未知。希望你能从“cd”命令中找到乐趣,像是掌控了一种络新妙的魔法,去向未知进发,开始你的探索之旅。
125 24
|
1月前
|
关系型数据库 MySQL Linux
查看Linux、Apache、MySQL、PHP版本的技巧
以上就是查看Linux、Apache、MySQL、PHP版本信息的方法。希望这些信息能帮助你更好地理解和使用你的LAMP技术栈。
86 17
|
1月前
|
安全 Shell Linux
Linux系统之su命令的基本使用
Linux系统之su命令的基本使用
110 3
Linux系统之su命令的基本使用