CentOS下使用firewall-cmd管理端口
环境 centos 7 背景在别人搭建的centos server下要部署一个数据发送服务,数据发送服务需要对局域网内开放端口,于是乎对centos不是很熟悉的我又开始踩坑啦。 注意 firewall-cmd的用法有非常多 本文只介绍指定的端口控制 开放端口firewall-cmd --zone=public --add-port=80/tcp --permanent 关闭端口firewall-cmd --zone=public --remove-port=80/tcp --permanent tips –zone 指定作用域 –add-port 指定端口 端口/协议 –permanent 永久生效 注意–permanent 让该规则永久生效,没有该参数重启后失效如果加了一定要执行f..
更多linux Screen工具
介绍 screen是一个终端的虚拟终端 用来解决ssh登陆后退出ssh后当前任务被结束的情况同时可以再screen进行输入,恢复screen等操作,(相比nohup更为强大) 解决乱码新建 vim ~/.screenrc 添加 defencoding GBK encoding UTF-8 GBK 参考:LINUX SCREEN窗口中文乱码问题 常用的命令 screen -ls 查看所有screen screen -S name 创建一个名为name的新screen screen -r xxxx.name 恢复screen exit screen 内输入exit即可销毁当前screen
更多Golang 在windows下编译linux可执行文件
我日常在windows上用JetBrains GoLand 写go程序,但是呢 直接使用go build会编译成windows可执行文件,想要在linux上一直跑还需要在linux安装golang然后再build。 麻烦? 本文教你如何用一行代码搞定这件事情 code set GOOS=linux 接下来正常的使用go build就可以得到linux可执行文件了 amd64的可执行文件(运行在64位系统下) tips更多详尽的设置Golang 在 Mac、Linux、Windows 下如何交叉编译
更多

使用SSH Key优雅的登陆linux server
环境 debian 9.5 生成SSH Key推荐的命令 ssh-keygen -t rsa -b 4096 -C "[email protected]_" your_email@example.com使用你的邮箱或一个账号或是其他什么标记 不怎么推荐的命令 ssh-keygen -t rsa -b 4096 #默认的注释是你的主机 ssh-keygen -t rsa #默认的没有4094bit 安全低 生成过程中会需要一些输入 第一次是选择保存的位置(Ent..
更多debian 9.5下搭建nextcloud (nginx + php + sqlite)
环境准备 debian 9/5nginx 1.10.3php7.0sqlite3 更新indexapt update 安装几个依赖的php模块apt install php7.0-zip php7.0-gd php7.0-curl php7.0-mbstring 部署nextcloud 部署的目录不一定非要是本文介绍的 进入到nginx的默认root目录中 cd /usr/share/nginx 下载typecho安装包 wget nextcloud_install.tar.gz 注意这是假地址,不要全部都copy了,从官网复制下载地址,再替换。 解压安装包 tar -zxf nextcloud_install.tar.gz 权限控制 chowm -R www-data:www-d..
更多

debian 9.5下搭建Typecho Blog(nginx + php7 + sqlite)
环境准备 debian 9/5nginx 1.10.3php7.0sqlite3 更新indexapt update 安装nginxapt install nginx 安装php及相关依赖apt install php7.0 apt install php7.0-fpm //为php提供管理服务 apt install php7.0-sqlite //php的sqlite模块(驱动) 如果你用mysql 你就找mysql apt install php7.0-xml //需要的模块 部署typecho 部署的目录不一定非要是本文介绍的 进入到nginx的root默认目录中 cd /usr/share/nginx 下载typecho安装包 wget typecho_install.tar..
更多欢迎使用 Typecho
如果您看到这篇文章,表示您的 blog 已经安装成功. We trust you have received the usual lecture from the local SystemAdministrator. It usually boils down to these three things: Respect the privacy of others. Think before you type. With great power comes great responsibility. 小彩蛋哦我们信任您已经从系统管理员那里了解了日常注意事项。总结起来无外乎这三点。 尊重他人隐私 输入之前仔细思考 权力越大 责任越大
更多Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post$ hexo new "My New Post" More info: Writing Run server$ hexo server More info: Server Generate static files$ hexo generate ..
更多