首先 apache 爛掉, 因為 config 全都要改過, 見這篇
然後重啟會遇到一堆莫名其妙的錯誤, 例如
* Restarting web server apache2 [fail] * The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/authz_default.load: Cannot load /usr/lib/apache2/modules/mod_authz_default.so into server: /usr/lib/apache2/modules/mod_authz_default.so: cannot open shared object file: No such file or directory Action 'configtest' failed. The Apache error log may have more information.等等省略一萬種錯誤...
最後是砍掉重鍊才行, 但是砍掉真的就可以重鍊嗎? 當把 VirtualHost 的 config 檔放到 sites-available 又出現奇怪的錯誤, 例如 sudo apache2 -V
[Fri Nov 29 17:35:43.942472 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined [Fri Nov 29 17:35:43.942560 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_PID_FILE} is not defined [Fri Nov 29 17:35:43.942602 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_RUN_USER} is not defined [Fri Nov 29 17:35:43.942613 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined [Fri Nov 29 17:35:43.942627 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.947913 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.948051 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined [Fri Nov 29 17:35:43.948075 2013] [core:warn] [pid 14655] AH00111: Config variable ${APACHE_LOG_DIR} is not defined AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}但神奇的是還可以啟動成功... 正常的應該要長這樣
不過我還是有加上 ServerName localhost, 參考這篇的
有關 config, 這篇有不錯的比較, 可以快速的看要如何從 2.2 改成 2.4
接著就是 mysql 悲劇, 記得一定要先備份, 包括 /etc/mysql/my.cnf 和 /var/lib/mysql/
安裝 mysql-server5.5 和 mysql-server5.6 來回不下快二十次, 總是裝到一半就卡住, 出現
Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.修改 my.cnf, 參考這篇的
[mysqld] ... key_buffer = 16M myisam-recover = BACKUP改成
[mysqld] ... key_buffer_size = 16M myisam-recover-options = BACKUP還有遇到
[Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).在 my.cnf 加上 explicit_defaults_for_timestamp = 1 就可以避掉, 參考這篇的
上面兩個修改可參考這篇的結果
sudo apt-get purge mysql-server mysql-client-5.5 mysql-common mysql-server-5.5 sudo apt-get autoremove sudo apt-get autoclean sudo apt-get install mysql-server-5.6 mysql-client-5.6上面指令最後再重開機以後神奇的不會卡住了!!
裝完 mysql 以後再看我的 wordpress, 但因為砍得太乾淨了, 還要再加裝 php5-mysql 才能啟動
並且一直要我重新安裝 wordpress, 最後才發現 mysql 目錄的權限要改成 mysql:mysql
最後的最後, 大師兄就回來了, 我 6 小時的青春...
最後的最後的最後,又發現 .htaccess 爛掉了, 要改幾個地方 主要是 /etc/apache2/apache2.conf 裡面的預設值要改掉
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>再確認有啟用 a2enmod rewrite, 就搞定了 詳細用法看這篇
以後誰敢叫我升級到 Ubuntu 14.04, 我一定會打爆他的頭!!!
如果有人吃飽太閒想要裝裝看, 網路上一堆教學, 要很有愛才行阿
reference:
* E: Mysql-server-5.5 Installation Error [closed] MySQL shows warning Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead