可参考ubuntu-16.04,没区别 https://blog.csdn.net/qq_38959934/article/details/126101028
可参考ubuntu-16.04,没区别 https://blog.csdn.net/qq_38959934/article/details/126101028
apt-get install mysql-server
默认安装的是8.0.
可参考:https://zhuanlan.zhihu.com/p/348317883 安装5.7
官方地址:https://downloads.mysql.com/archives/community/
这里下载的是 Ubuntu Linux 18.04 (x86, 64-bit), DEB Bundle
cd /usr/local
mkdir mysql_package
下载mysql5.7上传到 mysql_package 目录下,解压文件
cd mysql_package
tar -xf mysql-server_5.7.32-1ubuntu18.04_amd64.deb-bundle.tar
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libaio1
sudo apt-get install libtinfo5
sudo dpkg -i mysql-common_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg-preconfigure mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb #此步需要输入数据的root密码
sudo dpkg -i libmysqlclient20_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqlclient-dev_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i libmysqld-dev_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-client_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-common_5.7.32-1ubuntu18.04_amd64.deb
sudo apt-get -f install
sudo apt-get -f install libmecab2
sudo dpkg -i mysql-community-server_5.7.32-1ubuntu18.04_amd64.deb
sudo dpkg -i mysql-server_5.7.32-1ubuntu18.04_amd64.deb
mysql -u root -p
可参考ubuntu-16.04,没区别 https://blog.csdn.net/qq_38959934/article/details/126101028
参考了 https://www.xtuos.com/6254.html、https://blog.csdn.net/houor/article/details/126672577
首先,通过在终端中运行以下命令,确保所有系统包都是最新的。
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install wget apt-transport-https gnupg2 software-properties-common
sudo apt-get install redis-server # 在 Ubuntu 22.04 上安装 Redis。
命令验证状态:
sudo systemctl enable redis
sudo systemctl start redis
sudo systemctl status redis
sudo systemctl restart redis
确认安装并检查已安装的 Redis 构建版本:
redis-server -v
进入redis
redis-cli
配置 Redis
/etc/redis/redis.conf
# bind 127.0.0.1 注释这一行 为了远程连接
daemonize no 改为 daemonize yes 守护进程
protected-mode yes 改为 protected-mode no
systemctl restart redis-server
执行以下命令打开防火墙端口6379
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload #重启firewall
firewall-cmd --list-ports #查看已经开放的端口
使用 RedisDesktopManager 测试连接:
下面的方法安装失败了
下载并解压安装包
cd /usr/local/src ---下载到这个 路径下
wget http://download.redis.io/releases/redis-5.0.3.tar.gz ---下载
tar -zxvf redis-5.0.3.tar.gz
切换到解压目录,编译
cd redis-5.0.3
make
提示 make
找不到,安装 ‘make’ 指令,然后再次输入 make:
apt-get install make
提示/bin/sh: 1: cc: not found
,安装gcc
sudo apt-get install gcc
提示zmalloc.h:50:10: fatal error: jemalloc/jemalloc.h: No such file or directory 50 | #include
https://blog.csdn.net/weixin_35757704/article/details/119280758
sudo make MALLOC=libc
安装并指定目录
make install PREFIX=/usr/local/redis
可参考ubuntu-16.04,没太大区别 https://blog.csdn.net/qq_38959934/article/details/126101028
https://blog.csdn.net/qq_38959934/article/details/117227466
安装nginx编译时 可能遇到的错误:
正确的做法:
https://blog.csdn.net/weixin_42510813/article/details/118354552
/usr/local/fastdfs-nginx-module/src/common.c file_id[128] 改为 file_id[512]