- Expand disk size in vm setting, say to 60GB
- Inside mac os guest, open disk utility
- Select 容器->My29GB - Data. (not My29GB)
- click 分割 tab
- Keyin new size in 大小. The size should be less than 60GB as in step 1.
- click 套用
- Done
rsync -auvzpP -e 'ssh -p 7922' Fuzzy/Literature/IntuitionisticFuzzyNumber/ chiao@kpcp4.au.edu.tw:/home/chiao/Fuzzy/Literature/IntuitionisticFuzzyNumber
sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04
Edit /etc/systemd/resolved.conf, add this line:
DNS=192.168.1.1
or
DNS=<what-u-want>
Then restart ubuntu.
The followings are right.
I have a left and a right arm.
I have left and right arms.
Everyone has left and right arms. [This is correct]
The followings are wrong.
I have an old and a new cars.
I have old and new car.
sudo password for all the members of sudoers group.sudo visudo and add this line:
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
Using ubuntu live CD and suppose /mnt/2 contains all the old operation system, say ubuntu 18.04.
cd /mnt/2
mount -B /dev dev
mount -B /dev/pts dev/pts
mount -B /proc proc
mount -B /sys sys
mount -B /run run
update-grub
grub-install
exit
umount /mnt/2/dev/pts
umount /mnt/2/dev
umount /mnt/2/proc
umount /mnt/2/sys
umount /mnt/2/run
core: 8.x
core_version_requirement: ^8 || ^9
$ mkdir /home/chiao/public_html/drupal9
$ composer create-project drupal/recommended-project:~9.0.0\
/home/chiao/public_html/drupal9
Go to/home/chiao/public_html/drupal9/web/sites.
Copy files to drupal9: Custom themes go to/home/chiao/public_html/drupal9/web/themes/custom/ Custom modules go to/home/chiao/public_html/drupal9/web/modules/custom/ Libraries go to/home/chiao/public_html/drupal9/web/libraries/ Your uploaded files and images go to/home/chiao/public_html/drupal9/web/sites/default/files/
Copy (using sudo cp -av) the following files and directories to new site:
sites/default/settings.php
sites/default/settings.local.php
sites/default/files/config_5cKxplPBXz7CfVTT9KjhZ3fJkIg1ygQ2hTdYEM64PUZQUPSy94TTCTcHuJ16-cOW_918dZ1kpw/asdfsd
/home/chiao/public_html/drupal9(For updating 8.9.x in kpci7, cf. https://kpchiaoo.blogspot.com/2018/09/update-drupal.html
When using:
composer update --dry-run "drupal/*"
This should show any available minor or patch update, however, my site didn't show any minor version for drupal.
So I follow this: https://www.drupal.org/docs/8/install/add-composer-to-an-existing-site
to create a new site and to transfer my old files to the new site.
1. Create a new drupal site, drupal_new:
cd /home/chiao/public_html
composer create-project drupal/recommended-project:~8.8.0 drupal_new --stability dev --no-interaction
2. Copy files to drupal_new:
Custom themes go to /var/www/sites/new_html/web/themes/custom/
Custom modules go to /var/www/sites/new_html/web/modules/custom/
Libraries go to /var/www/sites/new_html/web/libraries/
Your uploaded files and images go to /var/www/sites/new_html/web/sites/default/files/
3. Copy sites files:
cd /home/chiao/public_html/drupal_new/web/sites/default
sudo cp -av ~/public_html/drupal/sites/default/settings.php .
sudo cp -av ~/public_html/drupal/sites/default/settings.local.php .
sudo cp -av ~/public_html/drupal/sites/default/files/config_5cKxplPBXz7CfVTT9KjhZ3fJkIg1ygQ2hTdYEM64PUZQUPSy94TTCTcHuJ16-cOW_918dZ1kpw/ files/
cd /home/chiao/public_html/drupal_new/web/sites/
sudo cp -av ~/public_html/drupal/sites/development.services.yml .
change owner, www-data:
sudo chown -R www-data.www-data files/ settings.*
4. Edit composer.json in your new project root (e.g., /var/www/sites/new_html) and copy the list of packages from your old composer.json's "require" and "require-dev" sections to the new composer.jsonfile.
5. rm ~/public_html/drupal_new/composer.lock
composer install
6. All done for creating new druapl.
7. cd ~/public_html/drupal_new/
drush state:set system.maintenance_mode 1
drush cache-clear drush
composer update drupal/core-recommended --with-dependencies
drush updatedb
drush cache-clear drush
drush state:set system.maintenance_mode 0
drush cache:rebuild
watch -n1 "lscpu | grep MHz | awk '{print $1}'";
cf: https://askubuntu.com/questions/916382/ubuntu-get-actual-current-cpu-clock-speed
#!/bin/bash
for i in /BACKUP/kpchiao9600k/20200225_Ubuntu_18.04.4_LTS/*; do
xzcat $i | 7z a -mx=9 -mmt=4 -p-si "$(basename "$i" .tar.xz)_pwd_bsun.tar.7z"
done
#
# Decompress with the following command followed by the password.
# 7z x -so boot_efi_2020_02_25_pwd_bsun.tar.7z | tar tvf -
# Just key in the password, no prompt will be shown.
[mysqldump]
user=student
password=student
chmod 0600 ~/.my.cnf

mysqldump drupal > kpchiao9600k_drupal.sqlor
mysqldump -B drupal > kpchiao9600k_drupal.sqlThe -B option will add the create database and use datatebase lines into dump file as:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `drupal` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `drupal`;
sudo ubuntu-drivers autoinstall or
sudo ubuntu-drivers nvidia-driver-435
reboot