Ubuntu 16.04 为 PHP7 添加 memcached 以及 redis 扩展

切换到 PHP 7 之后,网站的速度大幅提升,不过通常的扩展可能某一个就还没有支持 PHP7 Memcached 比如说我现在使用了最新的 Ubuntu 16.04,虽然内置了 PHP 7 源,但 memcached 就还没有,不过好在,它已经支持了 PHP 7 ,只是没有源而已,我们手动编译它。 要安装 memcached,需要先安装依赖库 libmemcached 从这里找到最新的 libmemcached 源码包,然后……

Continue reading

Mysql常用命令

导入sql文件 在MySQL命令行中中直接导入*.sql脚本,在mysql中执行sql文件的命令: mysql> source /root/db.sql; 增加用户 格式: grant select on 数据库.* to 用户名@登录主机 identified by "密码" 例1、 增加一个用户`test1`密码为`abc`,让他可以在任何主机上登录,并对所有数据库有查询、……

Continue reading

部署tinyproxy透明代理服务

线上需要一个https的透明代理,开始打算用nginx,调试了一段时间发现配置较复杂且没有成功。后来用的tinyproxy做的透明代理。安装配置过程就是下载、解压、编译、安装、配置、启动一波流: 安装依赖 sudo apt-get install asciidoc 下载 sudo wget https://github.com/tinyproxy/tinyproxy/releases/download/1.8.4/tinyproxy-1.8.4.tar.gz -O tinyproxy-1.8.4.tar.gz 解压 sudo tar xvfz tinyproxy.1.8.4.tar.gz 编译配置 ./configure --enable-transparent --prifix=/usr/local/tinyproxy 更多的编译选项可以参考源码目录……

Continue reading

Windows GVLK密钥对照表(KMS激活专用

以下key来源于微软官网:https://technet.microsoft.com/en-us/library/jj612867.aspx Windows Server 2016 操作系统 KMS激活序列号 Windows Server 2016 Datacenter CB7KF-BWN84-R7R2Y-793K2-8XDDG Windows Server 2016 Standard WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY Windows Server 2016 Essentials JCKRF-N37P4-C2D82-9YXRT-4M63B Windows 10 操作系统 KMS激活序列号 Windows 10 Professional W269N-WFGWX-YVC9B-4J6C9-T83GX Windows 10 Professional N MH37W-N47XK-V7XM9-C7227-GCQG9 Windows 10 Enterprise NPPR9-FWDCX-D2C8J-H872K-2YT43 Windows 10 Enterprise N DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4 Windows 10 Education NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 Windows 10 Education N……

Continue reading

Ubuntu下的OpenResty 安装

安装前的准备 您必须将这些库 perl 5.6.1+, libreadline, libpcre, libssl安装在您的电脑之中。 对于 Linux来说, 您需要确认使用 ldconfig 命令,让其在您的系统环境路径中能找到它们。 Debian 和 Ubuntu 用户 推荐您使用 apt-get安装以下的开发库: apt-get install libreadline-dev libncurses5-dev libpcre3-dev \ libssl-dev perl make build-essential Fedora 和 RedHat 用户 推荐您使用yum安装以下的开发库: yum install readline-devel pcre-devel openssl-devel gcc Mac OS X (Darwin)……

Continue reading

激活

自己经常用,做个备份 Emeditor激活码 DMAZM-WHY52-AX222-ZQJXN-79JXH Version 18.9.12 使用正常! VS2010 版本 密钥 旗舰版 YCFHQ-9DWCY-DKV88-T2TMH-G7BHP VS2012 版本 密钥 Microsoft Visual Studio Ultimate 2012 旗舰版 YKCW6-BPFPF-BT8C9-7DCTH-QXGWC Microsoft Visual Studio Premium 2012 高级版 MH2FR-BC9R2-84433-47M63-KQVWC Microsoft Visual Studio Professional 2012 专业版 4D974-9QX42-9Y43G-YJ7JG-JDYBP VS2013 版本 密钥 Visual Studio Ultimate 2013 旗舰版 BWG7X-J98B3-W34RT-33B3R-JVYW9 Visual Studio Premium 2013 高级版 FBJVC-3CMTX-D8DVP-RTQCT-92494 Visual Studio Professional 2013 专业版 XDM3T-W3T3V-MGJWK-8BFVD-GVPKY Team Foundation Server 2013 MHG9J-HHHX9-WWPQP-D8T7H-7KCQG VS2015 版本 密钥 专业版 HMGNV-WCYXV-X7G9W-YCX63-B98R2 企业版 HM6NR-QXX7C-DFW2Y-8B82K-WTYJV vs2017 版本 密钥 专业版 KBJFW-NXHK6-W4WJM-CRMQB-G3CDH 企业版 NJVYC-BMHX2-G77MM-4XJMR-6Q8QF vs2019 版本 密钥 专业版 NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y 企……

Continue reading

Ubuntu16.04阿里云源

16.04源 deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse 14.04源 deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/……

Continue reading

ubuntu 添加新硬盘

查看硬盘: # fdisk -l ... Disk /dev/sdb: 274.9 GB, 274877906944 bytes 255 heads, 63 sectors/track, 33418 cylinders, total 536870912 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/sdb doesn"t contain a valid partition table 可以看到,有一块大小为256G的磁盘未初始化 格式化硬盘(如果需要多个分区,请先创建磁盘分区): # mkfs.ext4 /dev/sdb mke2fs 1.42.9 (4-Feb-2014) /dev/sdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe……

Continue reading

ubuntu 上的ruby安装

安装 rbenv git clone git://github.com/sstephenson/rbenv.git ~/.rbenv # 用来编译安装 ruby git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build # 用来管理 gemset, 可选, 因为有 bundler 也没什么必要 git clone git://github.com/jamis/rbenv-gemset.git ~/.rbenv/plugins/rbenv-gemset # 通过 gem 命令安装完 gem 后无需手动输入 rbenv rehash 命令, 推荐 git clone git://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash # 通过 rbenv update 命令来更新 rbenv 以及所有插件, 推荐 git clone git://github.com/rkh/rbenv-update.git ~/.rbenv/plugins/rbenv-update # 使用 Ruby China 的镜像安装 Ruby, 国内用户推荐 git clone git://github.com/AndorChen/rbenv-china-mirror.git ~/.rbenv/plugins/rbenv-china-mirror 然后把下面的代码放到 ~/.bash_profile 里 export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" 注意 Unubt……

Continue reading