关于Leic

Software Architect Embbed Software

Encrypt WordPress Server with Let’s Encrypt SSL certificate

# Install acme.sh tool
git clone https://github.com/Neilpang/acme.sh.git

cd acme.sh

./acme.sh --install

#install cert
cd ~/.acme.sh
# issue a RSA cert
sudo ./acme.sh --issue --d blog.zhenglei.net -w /var/www/html/wordpress

# issue a ECC cert
./acme.sh --issue -d blog.zhenglei.net -w /var/www/html/wordpress --keylength ec-256

# Copy the cert into target directory
sudo mkdir -p /etc/nginx/ssl

sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.ecc.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.ecc.bundle --ecc
sudo ./acme.sh --installcert -d blog.zhenglei.net --key-file /etc/nginx/ssl/blog.zhenglei.net.key --fullchain-file /etc/nginx/ssl/blog.zhenglei.net.bundle
# Update nginx config
server { #listen 80; listen 443; ssl on; ssl_certificate ssl/blog.zhenglei.net.bundle; ssl_certificate_key ssl/blog.zhenglei.net.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; ssl_prefer_server_ciphers on; ... }
server {
listen 80 default_server; server_name blog.zhenglei.net;

# Let's Encrypt, http method
location ~ \.well-known
{
root /var/www/html/wordpress/;
allow all;
access_log on;
log_not_found on;
} return 301 https://$server_name$request_uri; }

Install post-view plus plugin in WordPress

Two modification in  Themes of Twentyeleven, which used by this blog:

List most top 10 articles of blog,  add following into the index.php

<?php if (function_exists(‘get_most_viewed’)): ?>
<ul>
<?php get_most_viewed(); ?>
</ul>
<?php endif; ?>

View count for each article,   add following code into content.php

<span>
<?php if(function_exists(‘the_views’)) { the_views(); } ?>
</span>
<span class=”sep”> | </span>

chrome socks5 & DNS config

  • Install chrome in windows7
  • Setup shortcut point to chrome
  • Edit target property of the shortcut: 
  •      Appending -dns-server=xxx  –proxy-server=yyy to the target property target=”C:\Program Files\Google\Chrome\Application\chrome.exe”  -dns-server=8.8.8.8 –proxy-server=”SOCKS5://127.0.0.1:1080″

LGA 1155 CPU

E3-1290 V2                 9749
E3-1280 V2                 9561
E3-1270 V2                 9481
E3-1275 V2                 9344
E3-1240 V2                 9177
E3-1245 V2                 9110
E3-1230 V2                 8852
E3-1290                      8699
E3-1280                      8473
E3-1275                      8348
E3-1270                      8233
E3-1245                      8048
E3-1240                      7972
E3-1230                      7907
E3-1265L V2              7779
E3-1235                     7680
E3-1225 V2                6841
E3-1220 V2                6661
E3-1260L                   6534
E3-1220                     6103
E3-1265L                   6038
E3-1225                     5917

debug linux daemon in remote server

Using GNU screen + gdb utility to debug daemon software in remote machine

 

# Launch the daemon service

/etc/init.d/dnsproxy start

 

# Create a screen session, say dns

screen -dmS dns

 

# Attach to the screen session

screen -r dns

 

# Launch gdb with in the session

gdb

attach xxxx

c

 

# Detach the screen session

Ctrl+A+D

 

 

# Debug code with gdb by Attaching to the screen session second time

screen -r dns

Disable openvpn on mycloud

OpenVpn service is used by wd/mycloud for their cloud access.

Lot’s of openvpn services will be launched,   as different user will have different OpenVpn service,  and different share will have different openvpn service

 

Solution:   Disable western digital cloud access from local dashboard