如何在CentOS8上安装Mysql5.7

在CentOS8上,默认情况下直接使用yum安装mysql,安装的是Mysql 8.0,在一些比较老的项目中,我们需要使用的mysql版本是5.7,下面我分享一个在CentOS8中安装Myslq5.7的方法。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
···
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql x86_64 8.0.17-3.module_el8.0.0+181+899d6349 AppStream 11 M
Installing dependencies:
mysql-common x86_64 8.0.17-3.module_el8.0.0+181+899d6349 AppStream 143 k
Enabling module streams:
mysql 8.0

Transaction Summary
================================================================================
Install 2 Packages
···
阅读更多

Ubuntu安装Pillow失败:The headers or library files could not be found for jpeg...

问题:Ubuntu安装Pillow失败报错

1
2
3
4
5
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html

解决方法:安装libjpeg-dev

1
sudo apt-get install libjpeg-dev

如何在CentOS 7上添加SSH端口

修改文件/etc/ssh/sshd_config

1
2
Port 22  #去掉这行开头的#号
Port 22222 #添加一行

firewall添加端口

1
2
firewall-cmd --zone=public --add-port=22222/tcp --permanent
firewall-cmd --reload
阅读更多

VNCViewer No matching security types错误解决方法

当用VNCViewer连接服务器时出现No matching security types错误。

解决方法

禁用Vino的加密要求。
使用屏幕共享的用户身份运行以下命令:

1
gsettings set org.gnome.Vino require-encryption false

在CentOS7上启用BBR提速

BBR (Bottleneck Bandwidth and RTT)是由Google提供给Linux内核TCP堆栈的一种新的拥塞控制算法。有了BBR,Linux服务器可以显着提高吞吐量并减少连接延迟。

阅读更多

一行命令统计Nginx访问日志各个ip的访问次数

查看访问各个ip及访问次数按访问次数排序

1
[root@vm ~]# awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn

查看访问最多的10个ip及访问次数

1
[root@vm ~]# awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -10