更新 Python pip 镜像源为阿里云

Linux创建或打开文件在文件 ~/.pip/pip.conf,写入如下内容:[global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host = mirrors.aliyun.comWin...

更新 Debian apt-get 镜像源为阿里云

debian 6.x (squeeze)编辑/etc/apt/sources.list文件(需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份)deb http://mirrors.aliyun.com/debian/ squeeze main non-free contri...

Echo TCP Server基于gevent实现

基于gevent实现的TCP服务器,import gevent from gevent import socket, monkey monkey.patch_all() def handle_request(conn): while True: data = co...

firewall防火墙命令

查询端口号80 是否开启:firewall-cmd --query-port=80/tcp永久开放80端口号:firewall-cmd --permanent --zone=public --add-port=80/tcp移除80端口号:firewall-cmd --permanent --z...

Debian8 安装配置 MySQL5.6

安装使用apt-get安装mariadb-server。sudo apt-get install mariadb-server 提示输入root用户的密码:mysqlmima安装成功,输入mysql -uroot -p运行,安装完毕。配置使用mysql_secure_installation命...