2014年10月13日 星期一

youtubedownloaderhd安裝注意事項

利用網路資源,請尊重智慧財產權並遵守著作權法的規定。

youtubedownloaderhd是一款可以下載youtube影片的免費軟體。

由於這個軟體安裝時,容易一併安裝到其他不必要的軟體,所以安裝時務必要小心。

2014年9月7日 星期日

Ubuntu Server出現亂碼或者是菱形符號-設定語系

安裝好Ubuntu Server中文語系後,常常會發現指令都會出現亂碼或者是菱形符號。
最好將語系變更為英文語系,至少還有正確英文可解讀訊息。

2014年9月4日 星期四

安裝完phpmyadmin後,出現「缺少 mcrypt 擴充套件。請檢查 PHP 設定。」警示訊息。

登入phpmyadmin後,出現下圖訊息:

"缺少mcrypt擴充套件"解決方式:啟用mcrypt
$sudo php5enmod mcrypt

重新啟用apache出現錯誤訊息(sudo service apache2 restart)

主機:ubuntu server 14

更改完apache相關檔案後,執行"sudo service apache2 restart"重新啟動的指令後,出現下列錯誤訊息:
----------------------------------------------------------------------------------
:ah00557 apache2 apr_sockaddr_info_get() failed for
:AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1.
-----------------------------------------------------------------------------------

解決方法:
將ubutu重新開機,就正常了。

修改過的檔案有:
sudo vi /etc/hosts

sudo vi /etc/hostname

sudo vi /etc/network/interfaces

sudo vi /etc/resolv.conf

2014年9月3日 星期三

drupal讓使用者在關閉瀏覽器時即自動登出

修改settings.php

如果settings.php是唯讀的檔案
(編輯時出現""W10: Warning: Changing a readonly file""此訊息)

則可以先設定settings.php具有寫入的權限
$sudo chmod a+w /var/www/html/sites/default/settings.php 

然後編輯settings.php
$sudo vim var/www/html/sites/default/settings.php

在settings.php檔案內容中,找到
ini_set('session.cookie_lifetime', 2000000);
修改成
ini_set('session.cookie_lifetime', 0);

存檔後關閉檔案,
那使用者在關閉瀏覽器時就會自動登出。

2014年9月2日 星期二

ubuntu server 14 php.ini "/etc/php5/apache2/php.in"

rt@ubundru:/etc/php5/apache2# ls
conf.d  php.ini
rt@ubundru:/etc/php5/apache2# vim php.ini

設定預設首頁檔名:the DirectoryIndex page - 所在路徑及檔案"/etc/apache2/mods-available/dir.conf " @ ubuntu server 14

The DirectoryIndex is the default page served by the server when a user requests an index of a
directory by specifying a forward slash (/) at the end of the directory name.
For example, when a user requests the page http://www.example.com/this_directory/, he or she
will get either the DirectoryIndex page if it exists, a server-generated directory list if it does not and
the Indexes option is specified, or a Permission Denied page if neither is true. The server will try
to find one of the files listed in the DirectoryIndex directive and will return the first one it finds.
If it does not find any of these files and if Options Indexes is set for that directory, the server will
generate and return a list, in HTML format, of the subdirectories and files in the directory. The
default value, found in /etc/apache2/mods-available/dir.conf is "index.html index.cgi index.pl
index.php index.xhtml index.htm". Thus, if Apache2 finds a file in a requested directory matching
any of these names, the first will be displayed.

以上內容摘取自"Ubuntu14serverguide.pdf"