Day: November 29, 2017

Ubuntu: 安装/开启Apache PHP curl模块 How to enable curl, installed Ubuntu LAMP stack?

Open SSH First Install CURL by typing sudo apt-get install curl Then Restart Apache by typing sudo service apache2 restart Then Install PHP5 CURL by typing sudo apt-get install php5-curl 如果您使用的是7.0版块,可以尝试 sudo apt-get install php7.0-curl Then Restart Apache by typing sudo service apache2 restart Done! 更多可以参考:https://stackoverflow.com/ques… Read More

Google Cloud Platform(GCP) VM 固定,静态,外部IP设定

VM建立固定IP 建立VM后, VM会得到外部IP,这一组IP不是固定的, VM 重开后会不一样,以下步骤能设定VM固定外部IP 点选Compute Engine 点选VM执行个体 点选VM 点选编辑 点选网路介面 点选建立IP位址 输入这组静态IP的名称, 按下预约, 选定的VM就可以预约到固定的静态IP 查询/管理IP 点选VPC网路 点选外部IP位址 这里可以看到所有申请的IP,如果有静态IP未分配,会有额外的费用 详细费用参考: 这里   本文:Google Cloud Platform(GCP) VM 固定,静态,外部IP设定… Read More

使用gcloud 连线到Google Cloud Platform 上的VM

虽然把WordPress网站架在Google Cloud Platform (GCP)上了,但其实对GCP 这个平台还是相当的陌生…有时候需要进去WordPress 机器里执行一些指令操作,都只能从Google Cloud 网页上,选择SSH 的功能:   这会开启一个浏览器的视窗,里面就是SSH 连到VM 后的画面,操作起来和一般的SSH 没什么不同,不过毕竟不是自己执行的SSH,所以也不晓得要怎么利用它传档案到VM 上去:   今天稍微瞄了一下文件,把Google Cloud SDK 装起来了,之后就可以直接用gcloud 指令SSH 到VM 上,快速许多~   1. 安装Google Cloud SDK 参考文件… Read More

WordPress : 设置WP首页自动转向另一个页面How to create a redirect from a home page to any URL using the PHP redirect

In order to add a redirect function to your WordPress template, you should perform the following: Log into your Dashboard and go to Appearance -> Editor, select Home Page Page Template (page-home.php): If you don’t have the Home Page page template in your theme folder, you should copy it there. To do that, you need to copy the file page-home… Read More

Ubuntu: 开启apache地址重写, rewrite, Enabling .htaccess file to rewrite path, .htaccess – URL rewriting not working, Rewrite rules not working

  sudo vi /etc/apache2/apache2.conf  (没有的话,可以尝试sudo vi /etc/apache2/sites-available/000-default.conf)打开apache配置文件 <Directory /var/www/>  #实际目录根据网站根目录而定     Options Indexes FollowSymLinks     AllowOverride None  #改为All     Require all granted </Directory>  执行命令:sudo a2enmod rewrite 在网站的根目录下建立… Read More

用Google Cloud Platform搭建Shadowsocks服务教程

经过一天的努力和摸索,终于完成了 Shadowsocks 的搭建并优化提速,遗憾的是没有找到突破 netflix 封锁的办法,希望大神指点迷津。 以下内容分四步 一、Google Cloud Platform虚拟机部署 二、升级VPS内核开启BBR 三、搭建Shadowsocks server 四、设置Shadowsocks server开机启动 本人不是码农,基本算是零基础,相信你照着我下面的步骤也会成功的。 操作平台:PC-win10-64bit 需要工具:能访问Google的网络、VISA信用卡 一、Google Cloud Platform虚拟机部署 1.申请试用GCP 谷歌云平台可让您构建和主机应用程序和网站,存储数据,并分… Read More