What & How & Why

这是本文档旧的修订版!


运维问题收集

一些个人网站环境配置及常见问题记录


AMH


MySQL无法自动启动

MYSQL 在重启服务器时不能启动,尝试以下方法:

删除 my.inf

cd /etc/
rm my.inf

Typecho


InstantClick


安装InstantClick


下载 InstantClick

footer.php</body> 标签之前插入以下代码:

...
<script src="instantclick.min.js" data-no-instant></script>
<script data-no-instant>InstantClick.init();</script>
</body>
</html>

Mathjax


Mathjax与InstantClick不兼容


footer.php 中找到 InstantClick.on('change', function(isInitialLoad) 部分,加入以下规则:

if (typeof MathJax !== 'undefined'){MathJax.Hub.Queue(["Typeset",MathJax.Hub]);}

Mathjax的直接添加


header.php 中的 <head> 之间加入如下代码:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX", "output/HTML-CSS"],
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
      processEscapes: true
    },
    "HTML-CSS": { availableFonts: ["TeX"] }
  });
</script>
<script type="text/javascript"
   src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>