pip -V 回車(大寫V):python包庫安裝路徑
python -m site: python查找路徑
1、redis
? ? ? ? ubuntu安裝redis
????????????????System has not been booted with systemd as init system (PID 1). Can't operate;該問題是systemctl start redis報錯,可以往下走,修改redis配置,讓redis后臺運行即可;解決‘System has not been booted with systemd as init system (PID 1). Can‘t operate.‘_CrystalheartLi的博客-CSDN博客
????????????????netstat -tap | grep redis? 查看redis服務是否正常listen;
? ? ? ? ? ? ? ??ps -aux | grep redis? ? ? 進程查看
? ? ? ? ? ? ? ??netstat -lanp | grep 6379? ?端口監聽
? ? ? ? ? ? ? ? redis配置,修改redis.conf中的對應字段
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1、ip? ?允許遠程連接就注釋bind 127.0.0.1字段,或者設置0.0.0.0;
一文徹底明白127.0.0.1和0.0.0.0地址的區別是什么? - 知乎 (zhihu.com)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 2、密碼??requirepass后面填寫密碼;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 3、后臺運行??daemonize字段設置成yes;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 4、port? 默認6379;
? ? ? ? python安裝redis
2、mysql
? ? ? ? ubuntu和python安裝即可;
? ? ? ? 同上systemctl用不了,手動啟動服務;/etc/init.d/mysql restart
? ? ? ? 配置文件mysqld.conf在/etc/mysql/mysql.conf.d/mysqld.cnf
????????
? 參考:
?
Ubuntu 20.04 安裝 MySQL 8.0 并且遠程連接數據庫(包括后續遇到的新坑)_synchronizing state of mysql.service with sysv ser_Nymph2333的博客-CSDN博客