Ubuntu 管理心得

搜尋此網誌

2019年3月25日 星期一

Copy drupal from kpchiaoi5 to kpci7

In kpchiai5:
  1. mysqldump -u drupaladmin -h localhost --skip-lock-tables -p drupal > drupal_20160826_kpchiaoi5.sql
  2. gzip -9 drupal_20160826_kpchiaoi5.sql
  3. sudo tar zcvf public_html_drupal_20160826_kpchiaoi5.tgz public_html/drupal

In kpci5:
  1. download from kpchiaoi5: drupal_20160826_kpchiaoi5.sql.gz, public_html_drupal_20160826_kpchiaoi5.tgz
  2. gzip -dc drupal_20160826_kpchiaoi5.sql.gz | sed -e '/^UNLOCK/d' -e '/^LOCK/d' > ~/a.sql
  3. Using phpmyadmin to drop all drupal tables.
  4. mysql -u drupaladmin -p drupal < ~/a.sql
  5. sudo tar zxvfp public_html_drupal_20160826_kpchiaoi5.tgz -C /home/chiao
  6. sudo chown -R www-data.www-data /home/chiao/public_html/drupal (IMPORTANT!!!!)
  7. 6. 設定 -> 開發 -> 效能 -> 清除所有快取

2019年3月24日 星期日

For drupal having “htaccess: Options not allowed here” error

Edit /etc/apache2/mods-available/userdir.conf, add Options in AllowOveride, namely,

AllowOverride FileInfo AuthConfig Limit Indexes Options

2019年3月15日 星期五

Prevent dash on the repeated author for IEEE bibliography

The following might not be work. Try my another blog:

https://kpchiaoo.blogspot.com/2019/07/bibtex-citation-with-author-for.html
  1. Put the following line inside bib file, @IEEEtranBSTCTL{IEEEexample:nodash,CTLdash_repeated_names = "no"}
  2. Put the TeX ERT inside lyx file contains
    \bstctlcite{IEEEexample:nodash}
  3. Make sure "nodash" in both files are the same
  4. Or edit IEEEtrans.bst, change # 1 to #0 as follows:
    % #0 turns off the "dashification" of repeated (i.e., identical to those
    % of the previous entry) names. The IEEE normally does this.
    % #1 enables
    FUNCTION {default.is.dash.repeated.names} { #1 }

2019年3月3日 星期日

icon too big in nautilus

dconf-editor->org->gnome->nautilus->icon-view->default-zoom-level

2019年3月2日 星期六

disable baloo

In user shell, rather than root or sudo:

balooctl status
balooctl disable

2019年3月1日 星期五

ssh without password

Let Client be A, and Server be B.
Then inisde A, run this line: ssh-keygen -t rsa
Press Enter 2 or 3 times. Then copy/append the contents in id_rsa.pub to B:$HOME/.ssh/authorized_keys2

Done!

網誌存檔