2 nginx 初级学习
转自 https://www.jianshu.com/p/93ac21161ac6
nginx 基本入门(至今为止见过最好的 nginx 入门文章,没有之一。)
关注
2016.12.16 11:26* 字数 2985 阅读 4751评论 4喜欢 162
2 nginx 初级学习
转自 https://www.jianshu.com/p/93ac21161ac6
关注
2016.12.16 11:26* 字数 2985 阅读 4751评论 4喜欢 162
Atom用了PlatformIO IDE Terminal 后,总是用鼠标来切换,感觉有点割裂,久了手痛,当然主要是没钱….. 于是搜索了一下,参考这个网址:https://yanyinhong.github.io/2017/07/23/Atom-keyboard-shortcuts/
技巧就是用万能的
1 | Ctrl + Shift + P 打开Atom的命令面板(Command Palette) |
比如,我不知道怎么从文本编辑器切换到PlatformIO IDE Terminal ,于是就 Ctrl + Shift + P
在搜索框里面输入 platfrom
于是结果出来了:
2 Django + uswgi + nginx 将自己本地学习的博客部署到阿里云
参考网址:
https://blog.csdn.net/fengzq15/article/details/78633827
各软件版本
参考网址:
https://dev.to/lechatthecat/how-to-install-python3-in-centos7-1bk6
https://www.yuzhi100.com/tutorial/centos/centos-anzhuang-python36
安装IUS软件源
因为centos7默认的python是python2.7 ,在安装python3后再安装虚拟环境曾经让我困扰了很久,做个记录
困扰的原因是我的系统安装了3个python,一个系统自带的python2.7,一个pyhton3.4,一个python3.6,然而我并不知道安装了这个python3.4,更悲剧的是默认的python3就是用的这个python3.4做的链接,而我一直以为用的是python3.6做的链接,所以我pip3安装了virtualenv,和virtualenvwrapper后一直报如下错误, 因为安装到的是pyhton3.6目录下,而我默认的python3是链接到python3.4。
1 | If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly. |
然后我修改 export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
无效,找到 virtualenvwrapper.sh
修改后也一直报同样的错误,在折腾很久后,不经意进入/usr/bin/ 里面查看才知道原因。
学习django时发现如下的代码下拉框在鼠标没有移动到选项前就消失了,好像是和上一层的text属性冲突,去掉text属性就可以正常使用下拉菜单,但是样式不好看。
1 | <div class="ui container nav"> |
于是搜索参考文档如下
https://semantic-ui.qyears.com/modules/dropdown.php#/usage
参考网址:https://www.jianshu.com/p/49059f2c4234
安装后进入系统 ip addr 发现ens33没有分配IP
1 | cd /etc/sysconfig/ |
3 参考网页 https://github.com/yobabyshark/wireguard/blob/master/wireguard_install.sh
安装,配置 iptables
1 | yum install -y iptables-services |
突然想起看看服务器的日志,于是去网上搜索,last
ps -ef
iftop -np
也没看出什么来,不过du -h /var/log/secure 一看20多M,终于明白自己是多么的井蛙了,于是便想要更改ssh的端口。
参考网址
https://www.centos.bz/2017/08/centos-7-change-ssh-port/
1 | $ vi /etc/ssh/sshd_config |