【Linux】ubuntu下安装MySQL、Redis

【硬啃DF】01-VirtualBox(VB)虚拟机安装Linux(Ubuntu24.04)FinalShell远程,非Docker安装MySql8、Redis7、PostgreSQL16 VirtualBox(VB)虚拟机安装Linux(Ubuntu24.04)FinalShell远程,非Docker安装MySql8、Redis7、PostgreSQL16 阅读详情
接上篇博文安装jdk和tomcat后,安装MySQL和Redis。
安装MySQL
MySQL的安装比较简单,直接执行:
sudo apt-get install mysql-server
安装过程中会提示输入数据库的登入密码,如果想为空就直接回车。
安装成功后就可以尝试连接到MySQL了,格式如下: mysql -h主机地址 -u用户名 -p用户密码 
这里测试情况如下:

因为密码是空,所以就不需要再输了。退出命令exit (回车) 
在连接了数据库的情况下就可以进行创建数据库等操作了,也可以执行数据库的脚本文件,这里是使用winSCP工具在本机系统传送脚本文件到服务器,执行sql脚本的命令:source test.sql

安装Redis
首先上Redis的官网, http://redis.io/

右键,“复制链接地址”,这里还是使用 wget 下载,命令如下:
wget http://download.redis.io/releases/redis-3.0.6.tar.gz
下载完之后得到redis-3.0.6.tar.gz,再进行解压,
tar -xvf redis-3.0.6.tar.gz
解压后得到redis-3.0.6文件夹,进行该目录下再执行 make命令进行编译源码,执行完命令后会在src目录下生成以下几个可执行文件:redis-server、redis-cli、redis-benchmark、redis-check-aof、redis-check-dump、redis-sentinel。之后再执行 make install命令进行安装,直接使用 make install是默认安装,默认安装会将之前生成的可执行文件拷贝到/usr/local/bin目录下,也可以通过 make PREFIX=/usr/local/redis install指定安装目录进行安装。

安装完之后可以执行命令whereis redis-server查看命令安装路径,如果出现如下图所示就证明已经安装成功了

成功安装后, 修改配置文件 ,先将源码目录下的redis配置文件redis.conf拷贝到/etc/reids目录下。
sudo cp -r redis.conf /etc/redis
拷贝后就可以在/redis目录下使用ls redis.conf查看是否有这个文件,再根据需求修改配置文件,不修改则使用默认的配置。

启动redis服务
方式一:直接通过命令redis-server启动,可以在命令后面加上&,使redis以后台程序的方式运行。
方式二:通过指定配置文件的方式启动,redis-server /etc/redis/redis.conf
启动之后,可以使用命令netstat -ntlp | grep 6379查看端口是否被占用。如果有出现就证明redis服务已经正常启动了,也可以通过ps和top命令来查看是否有redis的线程。








实战章节:在Linux上部署各类软件 在前面,我们学习了许多的Linux命令和高级技巧,这些知识点比较零散,同学们跟随着课程的内容进行练习虽然可以基础掌握这些命令和技巧的使用,但是并没有一些具体的实操能够串联起来这些知识点。所以,现在我们设计了各类软件在Linux上部署安装的实战章节,可以让同学们:对前面学习的各类操作命令进行复习和练习,从而深度掌握它们本章节中演示部署的软件,包含了IT行业各类岗位中所必须使用的,如:Java后台、大数据开发、运维开发、测试、AI等。无论学习Linux后从事什么岗位,这些内容都会给你带来帮助。 阅读详情

相关推荐

基于opencv-ANN的水果识别模型训练

本文通过opencv-ann-mlp训练模型,实现对五种水果进行分类识别。本文详细介绍该项目的各个过程,包括数据准备、预处理、样本读取、训练数据集制作、训练标签制作、模型参数设置、模型训练,模型测试验证等,总结该过程需要注意的事项。

qq_15985873的博客 3985

Ubuntu安装JDK、Mysql、Redis、Rabbitmq、Nginx 并设置开机自启动

Ubuntu/Linux安装JDK、Mysql、Redis、Rabbitmq、Nginx 并设置开机自启动

weixin_53729939的博客 3513

四、嘉立创EDA原理图绘制实战:从零搭建STM32温湿度监测系统

本文详细介绍了使用嘉立创EDA标准版从零开始绘制STM32温湿度监测系统原理图的完整流程。涵盖核心元器件选型、电源电路设计、ADC按键创新应用及模块化布局技巧,帮助电子爱好者快速掌握STM32系统设计,提升嵌入式开发实战能力。

h0i1j2k3l的博客 894

ubantu数据库安装以及使用——mysql+redis

ubantu数据库安装及使用——mysql+redis

分享学习过程中的知识和感悟 1572

从OFED到rdma-core:手把手带你搞定Linux下RDMA开发环境的选型与搭建

本文详细介绍了在Linux系统下搭建RDMA开发环境的完整流程,涵盖OFED与rdma-core的选型对比及分步安装指南。针对高性能计算和分布式存储需求,解析RDMA技术栈的核心组件,提供环境验证与性能测试方法,帮助开发者快速构建稳定高效的开发环境。特别适合需要优化网络性能的工程师参考。

weixin_26905487的博客 230

威联通改装飞牛fnOS全攻略:从刷机到Docker影视部署

NAS系统是家庭数字存储的核心,x86架构的威联通设备凭借通用引导和驱动支持,成为改装替代系统的理想平台。飞牛fnOS作为基于Debian的国产NAS系统,以简洁UI、内置Docker和影视墙以及硬件转码能力,吸引了大量玩家。通过U盘引导安装、BIOS调整、系统盘SSD部署,可实现系统切换;原机械硬盘可挂载为存储池,配合Docker部署下载、远程访问等容器,影视中心自动削刮海报墙,硬件转码保障4K播放。改装过程需注意引导失败、硬盘识别、核显驱动等问题。这套方案能让老旧威联通焕发新生,兼顾易用性与扩展性。本文

weixin_33585822的博客 942

ubuntu 18.04桌面版安装mysql和redis

创作人QQ:851301776, 欢迎大家一起技术交流,本博客主要是自己学习的心得体会,只为每天进步一点点! 个人座右铭: 1.没有横空出世,只要厚积一定发。 2.你可以学历不高,你可以不上学,但你不能不学习 学习网址:https://www.runoob.com/mysql/mysql-install.html //mysql https://www.runoob.com/redis/redis-tutorial.html //redi...

weixin_43155199的博客 576

snipersim安装

snipersim安装记录,便于后续使用tip:snipersim需要在python2的环境下编译。

weixin_53507617的博客 928

6、Ubuntu20的JDK&MySQL&tomcat&Redis&Nginx安装

这里以安装版本8为例进入存放jdk目录创建目录mkdir jdkcd jdk把下好的jdk8压缩包拖拽到Ubuntu连接用户下移动jdk包文件解压jdkpwd解压路径配置环境变量更新配置验证:javac。

qq1092881420的博客 921

【Python基础】FastAPI 从入门到项目实战操作详解

【Python基础】FastAPI从入门到使用实战操作详解

congge_study的博客 487

【华为OD机试】真题E卷-一种字符串压缩表示的解压(C++)

有一种简易压缩算法:针对全部为小写英文字母组成的字符串,将其中连续超过两个相同字母的部分压缩为连续个数加该字母,其他部分保持原样不变。例如:字符串aaabbccccd 经过压缩变成字符串 3abb4cd请您编写解压函数,根据输入的字符串, 判断其是否为合法压缩过的字符串若输入合法则输出解压缩后的字符串 否则输出字符串!error来报告错误。

u014481728的博客 903

Ubuntu 安装Mysql+Redis+Nginx

mysql配置文件通常位于在[mysqld]开始修改密码,因为策略问题,先设置一个符合复杂策略的密码,否则无法做其他操作:mysql>查看账户信息:mysql>use mysqlmysql>mysql>mysql>mysql>mysql>

weixin_49784554的博客 1029

蓝标传媒PHP面试题(带答案)

例如数组A【1,3,5,7,9】,数组B【0,2,4,6,8】,第N个数为4,第N+1个位5。(当天最早动作时间:该时间从右侧无限接近00:00,例如00:01分早于00:02)(当天最晚动作时间:该时间从左侧无限接近00:00,例如23:59分晚于23:58)(当天最早动作时间:该时间从右侧无限接近05:00,例如05:01分早于05:02)(当天最晚动作时间:该时间从左侧无限接近05:00,例如04:59分晚于04:58)B.如果你的解法时间复杂度为O(logN),请考虑时间复杂度更低的算法。...

phpstory的博客 392

linux:ubuntu mysql 、redis和Mongodb安装

1、安装mysql sudo apt update sudo apt install mysql-server 验证MySQL服务器正在运行 sudo systemctl status mysql 保护MySQL 安装随附一个名为的脚本mysql_secure_installation,可让您轻松提高数据库服务器的安全性 sudo mysql_secure_installation 以root身份登录 sudo mysql sudo mysql -u root -p 外部程序登录Mysql服务器 如

sunzhanl的博客 2784

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

LIUNX WINDOWS 部署启动JAVA前后端项目 LINUX安装mysql LINUX安装文件存储服务minio Ubuntu安装redis ubuntu安装rabbitMq

JAVA项目上传服务器如何配置 前后端

weixin_48229232的博客 1449

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

linux ubuntu下安装java,mysql与tomcat,redis

1、安装java 使用apt-get命令即可安装java,我选择安装oracle jdk Installing default JRE/JDK sudo apt-get update sudo apt-get install default-jre sudo apt-get install default-jdk Installing Oracle JDK sudo

玩家六的专栏 850

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

3.Linux中安装redis及环境搭建

本文章主要为大家讲解了如何在xshell客户端上运行虚拟机进行安装redis,安装完毕后如何测试是否能使用,环境该怎么搭建。

xinhang10的博客 1395

Linux安装Ubuntu,mongodb,redis,ssh,git,mysql,vm-tools,pip3

在Windows10下安装VM,在VM中安装Ubuntu 截至2019-07-05,最新VM版本为12.5.1,最新ubuntu-lts版为18.04.2,请自行去官网下载 如何用VM安装Ubuntu?以下参考教程已经说得很详细了,就不再累述:https://jingyan.baidu.com/article/c843ea0bdacad477931e4a27.html 在Ubuntu中安装搜狗输入...

HFZeng的博客 237

Linux下ubuntu操作系统下载安装配置JDK、Tomcat、Redis、Git、Nginx、MySql

ubuntu操作系统下载安装配置jdk

qq_45844443的博客 1115

云服务器linux配置部署项目全过程,Ubuntu安装远程连接mysql、Ubuntu安装Redis、Ubuntu配置tomcat、ActiveMQ

目录 一、修改ubuntu用户名和密码 二、配置云主机远程连接 三、安装 jdk 四、安装mysql 五、安装 Redis : 六、安装ActiveMQ并设置开机启动 七、安装nginx 青云在搞活动,小白程序员花了69块钱开了一年的云服务器,拿来练手,哈哈。 服务器官网:https://www.qingcloud.com/ 点击这个小电脑可以进入终端 一、修改ubuntu用户名和密码 在镜像描述中可以查看默认登陆用户名和密码 Ubuntu更改密码步骤: 1、使用默认用户.

qq_40731745的博客 577

最全的linux安装docker基于ubuntu64位-以及docker安装redis,rabbitmq,mysql,mongodb等

[1]用secureCRT连接虚拟机中的Ubuntu系统,出现“远程主机拒绝连接”错误 A.因为我的Ubuntu中未安装ssh服务,终端下运行命令:sudo apt-get install openssh-server B.之后重启一下sshd服务:sudo service sshd restart [2]ubuntu 执行apt-get install的时候报错:无法获得锁 /var/lib/dpkg/lock -open(11:资源暂时不可用) 这个问题看了好多人写的,执行完下面命令之后发现

weixin_43795840的博客 252

linux-ubuntu-22.04 安装 java8、 firewalld、 mysql5.7、Redis 6.0、FastDFS、nginx1.18

Ubuntu22.04 安装软件

qq_38959934的博客 1589

cloud使用mysql读写分离+redis 从搭建到开发linux+ubuntu

前言: 想学习下读写分离,看上去很多人在用,他是分主从服务器,可以用mycat来控制,也可以直接两个mysql代码控制。我想先试试mycat控制到两个mysql+redis,一步一步来吧,一口也干不了个胖子 思路: 使用VM搭建一个linux一个ubuntu(个人喜好),先用linux搭建mysql,后期作为主库,ubuntu这个作为从库,后期加入redis,其实redis是提高读的能力,对读写分离只能算是锦上添花。 ubuntu安装博客:https://blog.csdn.net...

二手程序员 271

ubuntu在线安装 redis、mysql、jdk

Redis在线安装 直接安装:sudo apt-get install redis-server 安装后redis服务器会自动启动,可以通过:ps -aux|grep redis 查看,redis服务器默认端口是 6379 查看redis状态 sudo /etc/init.d/redis-server status redis服务器配置(可以通过上个命令查看redis.conf位置)编辑redis.conf配置文件 sudo vi /etc/redis/redis.conf 设置登录密码(默认不需

weixin_44065125的博客 351

linux-ubuntu-16.04 安装 java8、 firewalld、 mysql5.7、Redis 5.0.3、FastDFS、nginx1.18

ubuntu 安装软件

qq_38959934的博客 1799

Windows、Linux、Mac数据库的安装(mysql、MongoDB、Redis)

摘要:Windows、Linux、Mac系统MySQL安装、MongoDB安装、Redis安装

仲君Johnny的博客 1413
上一篇: 【Linux】ubuntu下安装JDK、Tomcat
下一篇: 【SpringMVC】文件上传Expected MultipartHttpServletRequest: is a MultipartResolver错误解决
励志故事
博客等级 码龄12年 99粉丝 110原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址