拓展 VPS 的可能性
前期准备
本人选的是 CentOS 7 作系统。因人而异,选你熟悉的就好。
开个管理员帐户,加入 sudo ,尽量少用 root
安装 epel、rpmfusion、python-setuptool、pip、git、nodejs
总之用什么装什么。
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
sudo rpm -ivh epel-release-7-5.noarch.rpm
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm'
sudo yum install python-setuptools
sudo easy_install pip
sudo yum install git
sudo yum install nodejs
修改防火墙设置
CentOS 7 因为加入了 systemd ,所以好多服务都要用 systemctl 来管理。防火墙也变成了 firewalld 。你可以参考下面的链接简单了解一下。
sudo firewall-cmd [--permanent] [--zone=<zone>] --add-service=http
sudo firewall-cmd [--permanent] [--zone=<zone>] --add-service=https
sudo firewall-cmd [--permanent] [--zone=<zone>] --add-service=ftp
sudo firewall-cmd [--permanent] [--zone=<zone>] --add-port=8388/tcp 开个端口给 Shadowsocks 用,如果你装 Ghost 博客的话可以临时开个 2388 的端口,之后再 --remove-port 就好。
搭建 Shadowsocks
最简单的当然是用 SSH 了,但是会有 timeout 的情况。SS最省心。
sudo pip install shadowsocks
sudo vi /etc/shadowsocks.json 填入以下内容保存
{
"server":"my_server_ip",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
ssserver -c /etc/shadowsocks.json -d start 后台启动
ssserver -c /etc/shadowsocks.json -d stop 停止运行
搭建 Blog
我采用的是 Ghost ,当然你也可以用 WordPress 或者其他的博客程序,开心就好了~
cd /var/www/
sudo git clone https://github.com/TryGhost/Ghost.git
sudo npm install -g grunt-cli
cd Ghost/
sudo npm install
grunt init
grunt prod
sudo npm install -g forever 后台运行需要的
如果你在 localhost 测试过 Ghost ,可以直接把 config.js、ghost.db 以及图片等等都用 ftp 上传上去。或者手动重新改下 config.js 。
sudo NODE_ENV=production forever start index.js 后台运行
搭建 FTP
sudo yum install vsftp
sudo systemctl start vsftpd.service 启动 vsftpd 服务
sudo systemctl enable vsftpd.service 让 vsftpd 服务以后开机自动启动
安装 Apache 或 nginx
sudo yum install httpd nginx
sudo systemctl start httpd.service 启用 Apache 服务器, nginx 的话就是 nginx.service
sudo systemctl enable httpd.service 开机自动启动 Apache
关于如何让 Ghost 和 Apache 共存,你可以看下面的链接:
Ghost runs on top of Node.js instead of Apache or Nginx. If you already have a website running on Apache you will need to take a few extra steps in order to allow node.js to run along side...安装 Tiny Tiny RSS 阅读器
Tiny Tiny RSS 是一个基于PHP开源的RSS阅读器,有着和 Google Reader 一样的功能。
需要用到 mysql ,不过 CentOS 7 上已经变成 mariadb 了。
sudo yum install mariadb mariadb-server
sudo systemctl start mariadb.service 启动 mariadb 服务
sudo systemctl enable mariadb.service 让 mariadb 服务以后开机自动启动
安装 php
sudo yum install php
安装 RSS 阅读器
cd /var/www/
sudo git clone https://github.com/gothfox/Tiny-Tiny-RSS.git tt-rss
打开 http://your.site.com/tt-rss/install/ 完成安装。
安装 youtube-dl
sudo yum install youtube-dl
这个工具主要是方便从 YouTube 上扒视频——先下到 VPS 上,然后可以多线程拖到本地。
当然这是侵权的。
youtube-dl - Small command-line program to download videos from YouTube.com and other video sites搭建 Seafile 私有云
Seafile 是一个开源的文件云存储平台。它提供更丰富的文件同步和管理功能,以及更好的数据隐私保护和群组协作功能。
自己的服务器,速度和安全性都还算比较均衡的。
使用 reveal.js 在线展示 slide
基于 HTML 5 的在线幻灯片。制作方便,分享更方便。支持离线看。支持移动端。
做个简历什么的,不妨试一下。
cd /var/www/
sudo git clone https://github.com/hakimel/reveal.js.git
如果你有可能演讲,可以佐上一点弹幕
清华大学的 bigeagle 写的。参加 Fedora 线下活动的时候会有全程弹幕支持。
评论(8)
唔
简单介绍WordPress?