The 1st anniversary of this WordPress blog!

As can be seen from the 1st post, a magnificant year has passed along with abundant memories and dialogues at this site.
Up till now,there have been 178 articles published.

本站已启用“多说”评论框

“多说”评论框刚刚启用了。。。
方才配置过程中有些设置项目总加载不出,然后发现Chrome拦截了不安全的脚本。。。
接着是部分css样式没有即时显示,是cache的锅。。。

黑苹果开机慢的解决

黑苹果开机慢的解决

process launchctl[2] thread 242 caught burning CPU! It used more than 50% CPU…

Uninstalling the current Wacom drivers (6.3.15-1) and installing the previous version (6.3.11-3a)

【160126】服务器管理记录

  • Add sudoers

    whereis sudoers
    chmod u+w /etc/sudoers
    sudo nano /etc/sudoers
    chmod u-w /etc/sudoers

  • Nginx installing

    • Download

      sudo apt-get install nginx
      sudo apt-get install php5-cli php5-cgi mysql-server php5-mysql
      sudo apt-get install php5-fpm

    • Edit profile

      sudo nano /etc/nginx/sites-available/default

      root /var/www/html; index index.php index.html index.htm;
      location ~ \.php$ { include /etc/nginx/fastcgi_params; #需放在第一行,否则会出错 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name; }

    • Run

      sudo spawn-fcgi -a 127.0.0.1 -p 9000 -C 10 -u www-data -f /usr/bin/php-cgi
      /etc/init.d/nginx start

【160124】服务器管理记录

  • Ubuntu 解决语言设置错误的问题,并正常输入输出中文
    安装localepurge管理语言文件

    sudo apt-get install localepurge

    当然也可以使用以下命令再次进行配置:

    sudo dpkg-reconfigure localepurg

    在本地对fish-shell进行配置:

    set -U LANG en_US.UTF-8
    set -U LC_ALL en_US.UTF-8

  • Apache: Set Up Mod_Rewrite

    sudo a2enmod rewrite

  • MySQL user management

    • enter interactive mode

      mysql -u [username] -h [hostname] -p

    • show all users

      select * {host,user,…} from mysql.user

    • add a user

      create user [username]@[hostname] identified by ‘[password]’

    • delete a user

      drop user [username]@[hostname]

    • give privileges (users not existed will be created)

      grant {all privileges,select,usage,…} on *.* to [username]@[hostname] identified ‘[password]’

    • retrieve privileges

      revoke {all privileges,select,usage,…} on *.* from [username]@[hostname] identified ‘[password]’

    • show privileges

      show grants for [username]@[hostname];

    All sorts of privileges