之前每次都要输入export locale=en-US.UTF-8

网上的教程也没有讲清楚zsh启动的配置文件到底在哪里。

我这次找到了。

在/etc/zshrc

在这个文件后面加入

export locale=en-US.UTF-8

就好了。

当然这个文件权限是readonly,要在vim前面加个sudo,这个也是教程没有提到的。

在虚拟环境运行已经成功了。但是链接nginx出现了502错误。找了这个教程。明天再来研究吧。

https://www.datadoghq.com/blog/nginx-502-bad-gateway-errors-gunicorn/

https://www.datadoghq.com/blog/nginx-502-bad-gateway-errors-gunicorn/

成功解决了这个问题,教程用的是:https://linoxide.com/linux-how-to/install-flask-python-ubuntu/https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04

https://linoxide.com/linux-how-to/install-flask-python-ubuntu/

https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04

两个互相看一下。一开始我用的root账号,后来自己新建了一个账号就成功了。

装mosh的时候遇到locale的坑,这里记录一下:提示跟locale相关的错误,可以同时在服务器端和本地输入locale 命令看一下自己的locale list是不是UTF-8一套的。如果不是就需要用export命令修改一下。我修改了本地locale 为en_US.UTF-8,问题得到了解决。

命令locale 查看当前locale

export LANG=en_US.UTF-8export LC_ALL=en_US.UTF-8之后就可以mosh了

强迫症患者发现远程服务器的python版本不够update。 最新的python版本是3.8.2。 找到一个教程:https://tecadmin.net/install-python-3-8-ubuntu/

https://tecadmin.net/install-python-3-8-ubuntu/

安装以下包,用于compile最新的python。 sudo apt-get install build-essential checkinstallsudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \ libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev

然后去下载python 3.8.2,并解压cd /optsudo wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgzsudo tar xzf Python-3.8.2.tgz

https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tgz

make 并安装 cd Python-3.8.2sudo ./configure –enable-optimizations sudo make altinstall

检查版本: python3.8 -V Python-3.8.2

删除掉安装包:cd /opt sudo rm -f Python-3.8.2.tgz

官方教程就非常够用了,网上很多别的教程其实都是抄这个:https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04

https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-18-04

-–打算做一个时间管理应用。

作为新手,先做比较熟悉的web端应用。APP以后再说吧。

经过一番技术选型,打算用最轻量的Flask来搞。

按照FLask官方网站一步一步在本地安装并运行通过。

现在正在服务器上安装并运行。

服务器的环境采用nginx+uwsgi+python 3.8

一步一步开始吧。

最近用github很频繁。是的,产品经理也要用github。

用客户端登陆被嘲讽了。而且其实客户端很局限,能用的功能比较少,决定还是用命令行来搞定。

这一步全是参考github的官方文档,我把关键的文档链接贴出来:

https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

嗯,以上

今晚读到了分支管理这里,成果是终于把公司的wiki clone到本地了。以后可以在本地编辑文档再用命令行push上去了。

https://www.liaoxuefeng.com/wiki/896043488029600/896954848507552

https://www.liaoxuefeng.com/wiki/896043488029600/896954848507552

Google developed a TCP Congestion Control Algorithm (CCA) called TCP Bottleneck Bandwidth and RRT (BBR) that overcomes many of the issues found in both Reno and CUBIC (the default CCAs). This new algorithm not only achieves significant bandwidth improvements, but also lower latency. TCP BBR is already employed with google.com servers, and now you can make it happen–so long as your Linux machine is running kernel 4.9 or newer.

详细过程有点懒得写,链接一个教程https://www.howtoforge.com/tutorial/ubuntu-vsftpd/这里踩到第一个坑是被动模式因为有防火墙,一定要被动模式才能连通被动模式是这么一回事

https://www.howtoforge.com/tutorial/ubuntu-vsftpd/

开启被动模式在filezilla的log中会看到:p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px ‘Helvetica Neue’; color: #008000; background-color: #ffffff} span.Apple-tab-span {white-space:pre}

Response: 227 Entering Passive Mode (H1,H2,H3,H4,P1,P2).

这里的P1*256+P2,就是当前被动模式的随机端口号

防火墙中开启设定好的端口范围,再重启一下vsftp服务搞定了

0%