沖和斋

万物负阴而抱阳,冲气以为和


  • Home

  • Archives

  • Tags
沖和斋

服务器换到了Vultr

Posted on 2015-12-29

本Blog本来是搭建在Hostus的VPS上,10美元一年,非常具有性价比的一款VPS,这几天用下来稳定性还是很不错的,唯一的缺点就是速度有点慢,Ping值很高,一般都在600ms左右,最快的时候也只有400ms。

今天把Blog搬到了Vultr的日本东京机房,ping了一下,速度提高了近10倍,ping值只有64ms,但是有25%的丢包,不知道什么原因。

沖和斋

信用卡二三事

Posted on 2015-12-28

上周五收到了京东支付的校验码,说我正在使用信用卡在京东支付,费用不多,只有八十几元。开始时以为是LD在用我的信用卡买东西,但等了很久也没见她发信息或者打电话找我要校验码,就作罢了。

周六的时候又收到了京东的校验码,也是几十元。但当时我和LD正在外面玩耍,显然不是她在消费,就觉得很奇怪。印象中同时知道我卡号和手机号的没有几个,目标基本锁定,但由于拿不到校验码也根本就付不了款,就没有理会。但出于保险起见,我还是马上改掉了查询和交易密码,以绝后患。

今天上班的时候LD告诉我携程可以先付款后协助抢火车票,然我试一下,因为最近正为老妈过年回家的票发愁。就登上携程看了一下,因为第一次使用携程,之前都是用去哪儿,注册了账号后付款的时候吓了一跳!用信用卡付款,输入卡号、有效期和CVV2码就直接支付了,既没有手机校验也不需要交易密码,加之之前听说过携程被黑的经历以及前几天发生的事情,感觉非常的紧张。

后来查了一下,国外的信用卡都是这样使用的,正常情况下应该还是很安全的,甚至有人说输入了密码反而更有泄密的危险,但是在国内这种环境和相关制度下总是感觉很不安全。

沖和斋

终于拿到了姓名全拼的com域名

Posted on 2015-12-28

记得我的第一个域名注册于2010年下半年,当时很脑残的注册了个.name的域名。后来陆陆续续注册了几十个域名,作为一个有些强迫症的ID控,总觉得已经注册到的域名不够好,不过话说回来,10年以后靠手工注册能注册到很满意的域名的几率已经非常小了。

当我开始有意识到关注自己的姓名拼音ID的时候几乎都已经注册不到了,从邮箱到域名都是如此。后来微软启用outlook.com,注册到了姓名全拼邮箱,并把它作为主邮箱在用。还曾经往自己全拼的Gmail、Yahoo邮箱发邮件,确认到Yahoo的已经过期,但账号一直没删除,一直到今天还是不能注册。

姓名COM的域名被注册于2009年,是一个同名的律师作为个人网站使用。后来的几年里,时不时的就会查一下这个域名,看有没有过期,但对方一直在使用。转机出现在今年的十月下旬,该域名与2015-10-19到期了,然而拥有者并没有续费!从那时就开始密切关注了,过了续费期、过了赎回期、过了删除期,终于,在12-26再次查询的时候已经可以注册了。二话不说,果断拿下。目前只用来开通了域名邮箱,绑定在QQ上,用来建站的可能新很小,也可能永远都不会拿来建站了,但是会一直保留 ,做个纪念!

沖和斋

两款被玩坏了的产品

Posted on 2015-12-25

本来都是很不错的产品,但由于病毒式营销,慢慢的都被玩儿坏了。
这两款产品分别是GreenVPN 和 DigitalOcean VPS。
这两款产品的共同特点是推广可以有提成,所以被推荐的次数之多,几乎只要有推荐VPN和VPS的地方都会有这两个的身影出现,尤其在知乎,推荐VPS的回答下面绝大多数人都会推荐DO。GreenVPN则多出现在博客的推荐中。
这两款产品为都用过,一开始的时候也都感觉挺好,但随着慢慢被玩坏,服务质量都在一直下降,GreenVPN几个月前就已经彻底放弃了,DO中还剩下近10美元,但也早就停止了服务,暂时没有再开的打算。

沖和斋

EC2 安装 Serverspeeder 加速

Posted on 2015-12-24

1、登录Serverspeeder注册

2、Putty 登录 EC2

3、获取root权限 sudo -s

4、下载Serverspeeder

wget http://my.serverspeeder.com/d/ls/serverSpeederInstaller.tar.gz

5、解压缩 tar xzvf serverSpeederInstaller.tar.gz

6、运行程序 bash serverSpeederInstaller.sh

7、根据屏幕提示输入 ServerSpeeder 安装授权帐号和密码。

8、根据屏幕提示,输入【欲加速的接口】、【上行带宽】、【下行带宽】等,可直接回车默认。

9、根据屏幕提示选择是否随机启动、立即启动 ServerSpeeder。

完毕。

沖和斋

EC2 搭建 Shadowsocks

Posted on 2015-12-23

Amazon 一年免费AWS服务
开启实例,选择Ubuntu 14.02 系统

注意事项:

1、Putty连接实例的时候需先用puttygen转换AWS的密匙.pem为.ppk

2、Ubuntu系统AWS默认登录名为Ubuntu,运行一键安装脚本需先获得root权限。
sudo -s

再执行

wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks.sh

chmod +x shadowsocks.sh

./shadowsocks.sh 2>&1 | tee shadowsocks.log

即可。

3、AWS默认只开了22端口,需要在安全组编辑入站规则,打开相应的SS端口才能使用。

参考文档:

使用 PuTTY 从 Windows 连接到 Linux 实例

Shadowsocks Python版一键安装脚本

科学上网之EC2搭建shadowsocks

沖和斋

Ubuntu 14.04 安装 Ghost 记录

Posted on 2015-12-23

前言:花了近两天的时间,终于把Ghost博客搭建好了。刚开始VPS装的是CentOS 6,按照网上的教程搭建好了Ghost,搭好后发现Ghost版本不是最新版,然后手贱的想升级,按照官方文档操作了半天,都没有升级成功,然后就重装了系统(还是CentOS 6),再装Ghost的时候确一直报错~。不得已又重装了Ubuntu 14.04系统。记录一下搭建的过程,备忘。

一、安装Node.js

引用PPA脚本安装

sudo curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -

PS全新的系统可能需要安装 sudo 和 curl 命令。

导入完毕以后,直接安装 Node.js

sudo apt-get install nodejs

这个 Node.js 的包已经包含了 npm 所以你不用单独安装 npm,而有些 Node.js 程序还得单独安装 build-essentials 包,安装一下:

sudo apt-get install build-essential

安装完毕以后查看一下 Node.js 和 npm 的版本

node -v

npm -v

PS Ghost 需要运行在 0.10.* 的 Node.js 版本。

#####二、安装Ghost程序
基于安全考虑,可以新建立个 ghost 用户,这里安装在 /var/www/ 目录下

useradd ghost

mkdir /var/www

cd /var/www

curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip

unzip ghost.zip

chown -R ghost:ghost /var/www

PS 新系统可能需要安装unzip命令。

解压缩完成后开始安装运行

npm install --production

npm安装完成后,先用开发者模式启动Ghost.

npm start

PS 这里一定要确认能正常运行,我的刚开始就是这里失败,结果全部搭建好了后一直是 502 Bad Gateway.

Ctrl + C停止运行,编辑config.js文件

vi config.js

把 url: 'http://my-ghost-blog.com', 这行改成你的域名,比如 url: https://chonghe.org',保存并退出。

Ghost 保持后台运行,安装 pm2。

npm install pm2 -g

运行Ghost

NODE_ENV=production pm2 start index.js --name "Ghost"

#####三、安装Nginx并设置反向代理

先安装

sudo add-apt-repository ppa:nginx/stable

sudo apt-get update

sudo apt-get install nginx-extras

修改

vi /etc/nginx/sites-available/default

server {
listen    80;
server_name  chonghe.org;

location / {
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    proxy_pass http://127.0.0.1:2368;
}

location ~* \.(?:ico|css|js|gif|jpe?g|png|ttf|woff)$ {
    access_log off;
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public, mustrevalidate, proxy-revalidate";
    proxy_pass http://127.0.0.1:2368;
}

location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }

location ~ /\.ht {
        deny all;
}
}

保存并重启 Nginx

sudo service nginx restart

完毕。

参考文档:

VPS 教程系列:Ubuntu 14.04 安装 Node.js 和 Ghost 博客程序

Deploying Ghost

沖和斋

Welcome to Ghost

Posted on 2015-12-22

You’re live! Nice. We’ve put together a little post to introduce you to the Ghost editor and get you started. You can manage your content by signing in to the admin area at <your blog URL>/ghost/. When you arrive, you can select this post from a list on the left and see a preview of it on the right. Click the little pencil icon at the top of the preview to edit this post and read the next section!

Getting Started

Ghost uses something called Markdown for writing. Essentially, it’s a shorthand way to manage your post formatting as you write!

Writing in Markdown is really easy. In the left hand panel of Ghost, you simply write as you normally would. Where appropriate, you can use shortcuts to style your content. For example, a list:

  • Item number one
  • Item number two
    • A nested item
  • A final item

or with numbers!

  1. Remember to buy some milk
  2. Drink the milk
  3. Tweet that I remembered to buy the milk, and drank it

Links

Want to link to a source? No problem. If you paste in a URL, like http://ghost.org - it’ll automatically be linked up. But if you want to customise your anchor text, you can do that too! Here’s a link to the Ghost website. Neat.

What about Images?

Images work too! Already know the URL of the image you want to include in your article? Simply paste it in like this to make it show up:

The Ghost Logo

Not sure which image you want to use yet? That’s ok too. Leave yourself a descriptive placeholder and keep writing. Come back later and drag and drop the image in to upload:

![A bowl of bananas]

Quoting

Sometimes a link isn’t enough, you want to quote someone on what they’ve said. Perhaps you’ve started using a new blogging platform and feel the sudden urge to share their slogan? A quote might be just the way to do it!

Ghost - Just a blogging platform

Working with Code

Got a streak of geek? We’ve got you covered there, too. You can write inline <code> blocks really easily with back ticks. Want to show off something more comprehensive? 4 spaces of indentation gets you there.

.awesome-thing {
    display: block;
    width: 100%;
}

Ready for a Break?

Throw 3 or more dashes down on any new line and you’ve got yourself a fancy new divider. Aw yeah.


Advanced Usage

There’s one fantastic secret about Markdown. If you want, you can write plain old HTML and it’ll still work! Very flexible.

That should be enough to get you started. Have fun - and let us know what you think :)

1…45
TigreX

TigreX

48 posts
40 tags
© 2017 TigreX
Powered by Hexo
Theme - NexT.Muse