腾讯云 Centos7-nginx-mariadb-php-fpm-wordpress

目录 Linux, 工具

安装所需程序

yum install php php-mysql php-fpm lrzsz nginx mariadb mariadb-server -y

Cenos 7 启动服务

systemctl start nginx
systemctl start mariadb
systemctl start php-fpm

服务开机启动

systemctl enable nginx
systemctl enable mariadb
systemctl enable php-fpm

登录mysql并创建wordpress数据库,创建成功后退出数据库

mysql -u root -p
create database wordpress;
quit

创建存放worpress的文件夹:

mkdir /home/www/web

到worpress目录去

cd /home/www/web

下载wordpress文件

wget https://cn.wordpress.org/wordpress-4.7.4-zh_CN.tar.gz

解压wordpress文件到当前目录

tar -zxvf wordpress-4.7.4-zh_CN.tar.gz

修改目录的所有者

chown -R apache:apache /home/www/web

修改目录的权限

chmod -R 777 /home/www/web

创建nginx配置文件:内容在文件末尾

vim /etc/nginx/conf.d/wordpress.conf

验证配置:

nginx -t

输出以下内容表示配置没有问题:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

重启nginx服务

systemctl reload nginx

打开浏览器,地址栏输入:
119.29.183.161
点击现在就开始;
数据库中:wordpress
用户名:root
密码:空
提交:
切回到xshell应用解决WordPress升级需要输入FTP信息wp-config.php文件最后加上下面这句:define(‘FS_METHOD’, “direct”);

vim /home/www/web/wordpress/wp-config.php

在文件末尾增加:

define(‘FS_METHOD’, “direct”);

保存文件
重启nginx服务

systemctl reload nginx
wordpress.conf

server {
    listen 80;
    server_name 119.29.183.161;
    root /home/www/web/wordpress;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location / {
        index index.php;
        try_files $uri $uri/ /index.php?$args;
    }

    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
        access_log off; log_not_found off; expires max;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}

备份转载自:http://www.testpub.cn/t/81

More ways to ‘lock’ & ‘unlock’ your android phone.

目录 Android, 工具

MAYBEIWLL introduced a method to use your android phone or iPhone with TouchID to unlock your Mac equipment. And here I find more ways to unlock your android phones!

In fact, these mechanisms are provided by default if you are using Cyanogenmod or original factory version of Android. The Smart Lock!

Here is Smart Lock in Cyanogenmod 13 of MI4
Here is Smart Lock in Cyanogenmod 13 of MI4

There are 5 means to get access to your Android:

  1. Using trusted devices. This function requires Bluetooth or NFC. Although NFC is not found very often, I believe Bluetooth is a basic configuration. Other smart devices, such as smart watch, NFC label,Bluetooth in Car and smart wristband, can be used to unlock your phone. ( MAYBEIWILL also talked about his interesting utility of NFC label)
  2. Using trusted location. Most phones can get your current location through GPS or A-GPS. If have set your home is in the list of trusted locations, you won’t need to input your password or gesture and you just get in your phone directly.
  3. Using trusted face. With the development of facial recognition technology, it’s much easier to identify your face using the front camera. But it doesn’t work well under dark circumstance.
  4. Using trusted voice. I’m not really familiar with voice recognition system. Maybe there are some thing special to distinguish each of us.
  5. Body detection. The most interesting part of the Smart Lock must be this one. Google said they can detect whether the phone is with you by getting data from all sensors inside. Phones can understand your status — you are walking or you are in the car or you just put it on the table.

Finally, I start to use the 1st method to unlock my phone. I have a Mi band with Bluetooth 4.0 which doesn’t cost much power. And I also installed Near Lock in iPhone to unlock my Macbook. How convenient they are!

The easiest way to turn on Google Now and Location History in mainland China / 在中国大陆如何打开Google Now 和 Location History

目录 Android, 工具

Finally, I found the most convenient way to get the access to Google Now and Location History on Android in China.

But you need to root your phone first. If you can’t get root authority, you can just close this page.

If you can install xposed framework, just install it. But this is not necessary.

In most cases, you may have to prepare an VPN or some other tools for you to connect to Google services.

  • make sure your phone is rooted. ROOT REQUIRED!
  • visit this link. Download the app.
  • Go to Settings, remove your Google Account.
  • Add your Google Account again.
  • connect to Google and boom!

On my phone, after finishing these process, I can use all apps from Google including Google fit.

Good luck to you.

How to enable Google Now and Location History in China. / 如何打开 Google Now 和 Location History.

目录 Android, 工具

Due to some reasons, Google don’t provide some services in China, Google Now and Location History are included.

To open them, you have to follow these steps:

  1. Open Developer Mode in your phone. If you have no idea how to do it, you can search it in Google. There are many resolutions already.
  2. Download ‘Fake GPS location’ published by ‘Lexa’.
  3. Go to Developer options, turn ‘Allow mock locations’ button open and choose the application you just installed ( Fake GPS location ).
  4. Log out your Google Account and erase all cache of Google Apps.
  5. Change your system language to English.
  6. Open Fake GPS location and locate yourself in America.
  7. Login Google Account and restart Google Now.

If you can’t solve your problem, please redo the process.

(End)

How to install and use MagicLatern’s feature: Dual ISO in Cannon T3i/600D for Mac user

目录 工具, 相机

I’m using Cannon 600D and installed MagicLatern.

MagicLatern is an external software to enhance the functions of Cannon Digital Single Lens Reflex Camera. If you want to know more about it, you can move to http://www.magiclantern.fm/

Here MagicLatern has a great feature which is aimed to improve the quality of picture in complex environment called Dual ISO. It’s a little similar to HDR (just my opinion).

But you will have to use additional tool call cr2hdr to convert the original format. If you turn this feature on, the output is a little strange. This tool is designed to fix this. It will be easy if you use Windows because the developer has prepared an executive program. Just download and run it.

I’m now a fan of Apple equipments and Macbook pro is now my primary tool. There are not many official supports for Mac Users and this problem happens. Mac users will have to install two other software called dcraw and exiftool on witch  are dependent by cr2hdr. Unfortunately, the official guide misled me to a wrong way and failed. The conversion didn’t success but alert that

sh: exiftool: command not found sh: dcraw: command not found sh: dcraw: command not found Error: dcraw output is not a valid PGM file Logfile

I have installed these two dependences in advance, so this consequence is wired for me.

I spend a lot of time to find any solutions. And here is the valid method:

http://www.magiclantern.fm/forum/index.php?topic=16277.0

check bench’s comment in the 23rd posting.

Thanks to “bench”.

Hope you guys could follow his suggestion and make it.

PS: Don’t disable SIP of your Mac computer. This operation will make your computer susceptible to harmful websites and software( virus).