WordPress のインストールとMysql

参考にしたサイト

https://qiita.com/cherubim1111/items/b259493a39e36f5d524b

TimeZOne設定
sudo su - 
timedatectl set-timezone Asia/Tokyo

Apacheのインストール
apt -y update
apt -y install apache2 
systemctl enable apache2
systemctl start apache2

PHP 7.4 のインストール
apt -y install php7.4 php7.4-mysql

MariaDB 10.5 のインストール
apt -y install mariadb-server mariadb-client
systemctl enable mariadb
systemctl start mariadb

WordPress のインストール
cd /var/www/html
wget https://ja.wordpress.org/latest-ja.tar.gz
tar xvf latest-ja.tar.gz
chown -R www-data:www-data .

WordPress 用データベース作成(DB名wirdpressの場合)
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8;

WordPress 用 MariaDB ユーザの作成
GRANT ALL ON wordpress.* TO UserName@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

MySQLの操作

データベースの一覧表示
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| press              |
| rf                 |
| wp                 |
+--------------------+
6 rows in set (0.001 sec)

データベースのアクセス
MariaDB [(none)]> use press;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

データベースのテーブル表示
Database changed
MariaDB [press]> show tables;
+-----------------------+
| Tables_in_press       |
+-----------------------+
| ww_commentmeta        |
| ww_comments           |
| ww_links              |
| ww_options            |
| ww_postmeta           |
| ww_posts              |
| ww_term_relationships |
| ww_term_taxonomy      |
| ww_termmeta           |
| ww_terms              |
| ww_usermeta           |
| ww_users              |
+-----------------------+
12 rows in set (0.001 sec)

テーブル表示の中身を表示
MariaDB [press]> select * FROM ww_users;
+----+------------+------------------------------------+---------------+---------------------------+---------------------------+---------------------+---------------------+-------------+--------------+
| ID | user_login | user_pass                          | user_nicename | user_email                | user_url                  | user_registered     | user_activation_key | user_status | display_name |
+----+------------+------------------------------------+---------------+---------------------------+---------------------------+---------------------+---------------------+-------------+--------------+
|  1 | mars       | $P$BpsXyK.d4ER7ABVH9hZioBiaGNFvAJ1 | mars          | ei2k-hrai@asahi-net.or.jp | http://ps2.ddns.net/press | 2021-04-01 12:53:41 |                     |           0 | mars         |
+----+------------+------------------------------------+---------------+---------------------------+---------------------------+---------------------+---------------------+-------------+--------------+
1 row in set (0.001 sec)

データベースを削除する
DROP DATABASE [IF EXISTS] db_name

ユーザパスワードをDBから直接変更する方法

https://www.wakuwakubank.com/posts/648-wordpress-userpassword/

UPDATE 対象DB.DB接頭語users                # UPDATE press.ww_users
SET user_pass = MD5('新しいパスワード')     # SET user_pass = MD5('新しいパスワード') 
WHERE user_login = 'パスを変更したいユーザー名';

SeeStar first light

SeeStarの仕様

  • センサー:IMX462
    サイズ:142 X 129 X 257mm
    対物レンズ:50mm3枚玉アポクロマート
    焦点距離:246mm
    焦点距離:F4.9
    重量:3kg
    バッテリー内蔵:6時間駆動

SeeStarで各30分のスタック後、簡易な画像処理(ステライメージでレベル調整、トーンカーブ調整)

M1
IC443

gphoto2でカメラ制御

NIKON Coolpix P950

~$ gphoto2 –list-config
/main/actions/bulb
/main/actions/autofocusdrive
/main/actions/changeafarea
/main/actions/controlmode
/main/actions/viewfinder
/main/actions/opcode
/main/settings/datetime
/main/settings/thumbsize
/main/settings/fastfs
/main/settings/capturetarget
/main/settings/autofocus
/main/status/serialnumber
/main/status/manufacturer
/main/status/cameramodel
/main/status/deviceversion
/main/status/vendorextension
/main/status/batterylevel
/main/status/availableshots
/main/status/minfocallength
/main/status/maxfocallength
/main/status/liveviewprohibit
/main/imgsettings/iso
/main/capturesettings/exposurecompensation
/main/capturesettings/f-number
/main/capturesettings/focallength
/main/capturesettings/focusmode
/main/capturesettings/expprogram
/main/capturesettings/capturemode
/main/capturesettings/shutterspeed2
/main/capturesettings/liveviewafmode

WSL2の環境へStablefussion WebUiをインストール

Windows11で新規ユーザを作成(きれいな環境へインストールするため)
作成したユーザでログイン
wslをインストール (Ubuntu22.04)
$sudo apt update
$sudo apt upgrade
$sudo apt install wget git python3 python3-venv
$git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
----------以下、発生したエラー対処----
$sudo apt-get install libgl1-mesa-dev
---Debianで必要---
$sudo apt-get install libglib2.0-0
------------------
$cd stable-diffusion-webui
$ python3 -m venv venv/
$vim webui-user.sh
13行目 コメントを外して、cudaを使わない
export COMMANDLINE_ARGS="--skip-torch-cuda-test --precision full --no-half"

$./webui.sh
4GBのファイルを含む、多くのファイルをダウンロードするので、それなりに時間がかかります。
............
Running on local URL:  http://127.0.0.1:7860
ブラウザーで上記アクセス
N5095では次の警告が出るが、画像生成は問題なく完了。
[W NNPACK.cpp:53] Could not initialize NNPACK! Reason: Unsupported hardware.█
対策 USE_NNPACK=0

cuda対応のtorchをインストール

ubuntu22.04へ非推奨のcuda11.6をインストール

$ sudo apt install --no-install-recommends nvidia-driver-510
$ sudo apt install nvidia-prime
$ sudo apt install nvidia-cuda-toolkit

https://stackoverflow.com/questions/70340812/how-to-install-pytorch-with-cuda-support-with-pip-in-visual-studio

python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.13.1+cpu

---------------------------
> nvidia-smi
Sat Mar 11 11:43:37 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.06       Driver Version: 510.06       CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+


pip3 install torch==1.13.1+cu116  -f https://download.pytorch.org/whl/cu116/torch_stable.html

> pip3 install torch==1.13.1+cu116  -f https://download.pytorch.org/whl/cu116/torch_stable.html
Looking in links: https://download.pytorch.org/whl/cu116/torch_stable.html
Collecting torch==1.13.1+cu116
  Downloading https://download.pytorch.org/whl/cu116/torch-1.13.1%2Bcu116-cp39-cp39-win_amd64.whl (2434.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 GB 562.9 kB/s eta 0:00:00
Requirement already satisfied: typing-extensions in c:\users\ei2k-\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from torch==1.13.1+cu116) (4.0.1)
Installing collected packages: torch
  Attempting uninstall: torch
    Found existing installation: torch 1.13.1
    Uninstalling torch-1.13.1:
      Successfully uninstalled torch-1.13.1
Successfully installed torch-1.13.1+cu116
PS C:\Users\ei2k-> python
Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.13.1+cu116
>>>

StableDiffusion

【YouTubeLive開催】シンギュラリティサロン#68「AIは人類社会に革命をおこすのか 〜 OpenAI CEO サム・アルトマン氏の未来予測について考える」(2023.2.19)※編集版

https://www.youtube.com/watch?v=zdCxy5wihrU
Stable Diffusion Playground

https://stablediffusionweb.com/#demo
https://huggingface.co/

https://huggingface.co/settings/tokenshf_sVSkTgGutYIcprUjPrYvetLGguJfVzHjhR

ローカル環境でStable Diffusionを実行する方法