Arch Linux に WordPress をインストールしています。
WordPress の更新をすると、エラーメッセージが表示されます。
WordPress を更新
https://downloads.wordpress.org/release/ja/wordpress-5.4.zip から更新をダウンロード中…
署名が見つからなかったため、wordpress-5.4.zip の信頼性を確認できませんでした。
更新を展開しています…
ディレクトリを作成できませんでした。
インストール失敗
どのようなコマンドを実行してインストールされたのでしょうか?
LEMP環境の構築は、anarchy-1.1.0-x86_64.isoを使って、Oracle VM VirtualBoxにインストールしました。
[usuha@anarchy:~]$ wget https://ja.wordpress.org/latest-ja.tar.gz
CA証明書 '/etc/ssl/certs/ca-certificates.crt' をロードしました
[usuha@anarchy:~]$ tar -xzvf latest-ja.tar.gz
[usuha@anarchy:~]$ sudo mv wordpress/ /usr/share/nginx/html/
[usuha@anarchy:~]$ sudo chown -R root:root /usr/share/nginx/html/wordpress/
[usuha@anarchy:~]$ cd /usr/share/nginx/html/wordpress/
[usuha@anarchy:html/wordpress]$ sudo cp wp-config-sample.php wp-config.php
[usuha@anarchy:html/wordpress]$ sudo nano wp-config.php
[usuha@anarchy:html/wordpress]$ cat wp-config.php
<?php
/**
* WordPress の基本設定
...
/** WordPress のためのデータベース名 */
define( 'DB_NAME', 'wordpress' );
/** MySQL データベースのユーザー名 */
define( 'DB_USER', '****' );
/** MySQL データベースのパスワード */
define( 'DB_PASSWORD', '********' );
/** MySQL のホスト名 */
define( 'DB_HOST', 'localhost' );
/** データベースのテーブルを作成する際のデータベースの文字セット */
define( 'DB_CHARSET', 'utf8' );
Chromiumを使って、http://localhost/wordpress/wp-login.php
よろしくお願いします。
更新(翻訳の更新)はFTPサーバーを使って行いました。
翻訳の更新もできませんでした。
# chown -R nginx:nginx /usr/share/nginx/html/wordpress
「chown: ユーザー指定が不正: 'nginx:nginx'」と表示がされます。
nginxのmainline版をインストールしているからでしょうか?
よろしくお願いします。
ディレクトリ wp-content/uploads/2020/04 を作成できませんでした。この親ディレクトリのアクセス権はサーバーによる書き込みを許可していますか ?
https://live.staticflickr.com/65535/49793228656_1f63118c7c_h.jpg
親ディレクトリのアクセス権はサーバーによる書き込みを許可することができるのでしょうか?
よろしくお願いいたします。
WP Mail SMTP by WPForms(plugin)をインストールできない。
[usuha@anarchy:~]$ cd /usr/share/nginx/html/wordpress
[usuha@anarchy:html/wordpress]$ wp plugin install wp-mail-smtp
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/modules/pdo_pgsql (/usr/lib/php/modules/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_pgsql.so (/usr/lib/php/modules/pdo_pgsql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Installing WP Mail SMTP by WPForms (1.9.0)
https://downloads.wordpress.org/plugin/wp-mail-smtp.1.9.0.zip からインストールパッケージをダウンロード中...
Using cached file '/home/usuha/.wp-cli/cache/plugin/wp-mail-smtp-1.9.0.zip'...
パッケージを展開しています…
Warning: ディレクトリを作成できませんでした。
Warning: The 'wp-mail-smtp' plugin could not be found.
Error: No plugins installed.
[usuha@anarchy:~]$
よく使われるPHP拡張を色々とインストールしました。
その後で、WP Mail SMTP by WPFormsを、もう一度、インストールしてみました。
[usuha@anarchy:~]$ sudo pacman -S composer php-apache php-apcu php-apcu-bc php-cgi php-dblib php-embed php-enchant php-imap php-intl php-odbc php-pgsql php-phpdbg php-pspell php-snmp php-sqlite php-tidy php-xsl drupal emacs-php-mode php-geoip php-grpc php-igbinary php-imagick php-memcache php-memcached php-mongodb
[usuha@anarchy:~]$ sudo pacman -S imagemagick
警告: imagemagick-7.0.10.6-1 は最新です -- 再インストール
依存関係を解決しています...
衝突するパッケージがないか確認しています...
パッケージ (1) 古いバージョン 新しいバージョン 最終的な変化
extra/imagemagick 7.0.10.6-1 7.0.10.6-1 0.00 MiB
合計インストール容量: 9.72 MiB
最終的なアップグレード容量: 0.00 MiB
:: インストールを行いますか? [Y/n] n
[usuha@anarchy:~][1]$ cd
[usuha@anarchy:~]$ sudo bash
[root@anarchy]: /home/usuha># cd
[root@anarchy]: ~># echo 'extension=imagick'>/etc/php/conf.d/imagick.ini
[root@anarchy]: ~># exit
exit
[usuha@anarchy:~]$ cat /etc/php/conf.d/imagick.ini
extension=imagick
[usuha@anarchy:~]$
[usuha@anarchy:~]$ cd /usr/share/nginx/html/wordpress
[usuha@anarchy:html/wordpress]$ wp plugin install wp-mail-smtp
Installing WP Mail SMTP by WPForms (1.9.0)
https://downloads.wordpress.org/plugin/wp-mail-smtp.1.9.0.zip からインストールパッケージをダウンロード中...
Using cached file '/home/usuha/.wp-cli/cache/plugin/wp-mail-smtp-1.9.0.zip'...
パッケージを展開しています…
Warning: ディレクトリを作成できませんでした。
Warning: The 'wp-mail-smtp' plugin could not be found.
Error: No plugins installed.
[usuha@anarchy:html/wordpress][1]$ cd
[usuha@anarchy:~]$
[usuha@anarchy:~]$ sudo systemctl status nginx
[sudo] usuha のパスワード:
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-21 14:02:35 JST; 7min ago
Process: 473 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; error_log stderr; (code=exited, status=0/SUCCESS)
Main PID: 500 (nginx)
Tasks: 2 (limit: 2355)
Memory: 5.2M
CGroup: /system.slice/nginx.service
├─500 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr;
└─501 nginx: worker process
4月 21 14:02:33 anarchy systemd[1]: Starting A high performance web server and a reverse proxy server...
4月 21 14:02:35 anarchy systemd[1]: Started A high performance web server and a reverse proxy server.
[usuha@anarchy:~]$ sudo systemctl status mariadb
● mariadb.service - MariaDB 10.4.12 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-21 14:02:41 JST; 7min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 472 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 482 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_ST>
Process: 554 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 499 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 30 (limit: 2355)
Memory: 100.3M
CGroup: /system.slice/mariadb.service
└─499 /usr/bin/mysqld
4月 21 14:02:39 anarchy mysqld[499]: 2020-04-21 14:02:39 0 [Note] InnoDB: Waiting for purge to start
4月 21 14:02:39 anarchy mysqld[499]: 2020-04-21 14:02:39 0 [Note] InnoDB: 10.4.12 started; log sequence number 2982753; transaction id 2579
4月 21 14:02:39 anarchy mysqld[499]: 2020-04-21 14:02:39 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
4月 21 14:02:40 anarchy mysqld[499]: 2020-04-21 14:02:40 0 [Note] Server socket created on IP: '::'.
4月 21 14:02:40 anarchy mysqld[499]: 2020-04-21 14:02:40 0 [Note] InnoDB: Buffer pool(s) load completed at 200421 14:02:40
4月 21 14:02:40 anarchy mysqld[499]: 2020-04-21 14:02:40 0 [Note] Reading of all Master_info entries succeeded
4月 21 14:02:40 anarchy mysqld[499]: 2020-04-21 14:02:40 0 [Note] Added new Master_info '' to hash table
4月 21 14:02:40 anarchy mysqld[499]: 2020-04-21 14:02:40 0 [Note] /usr/bin/mysqld: ready for connections.
4月 21 14:02:40 anarchy mysqld[499]: Version: '10.4.12-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 Arch Linux
4月 21 14:02:41 anarchy systemd[1]: Started MariaDB 10.4.12 database server.
lines 1-25/25 (END)
[1] + 1688 suspended sudo systemctl status mariadb
[usuha@anarchy:~][148]$ cd
[usuha@anarchy:~]$ sudo systemctl status php-fpm
● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2020-04-21 14:02:39 JST; 8min ago
Main PID: 474 (php-fpm)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
Tasks: 3 (limit: 2355)
Memory: 27.8M
CGroup: /system.slice/php-fpm.service
├─474 php-fpm: master process (/etc/php/php-fpm.conf)
├─532 php-fpm: pool www
└─533 php-fpm: pool www
4月 21 14:02:33 anarchy systemd[1]: Starting The PHP FastCGI Process Manager...
4月 21 14:02:39 anarchy php-fpm[474]: [NOTICE] fpm is running, pid 474
4月 21 14:02:39 anarchy php-fpm[474]: [NOTICE] ready to handle connections
4月 21 14:02:39 anarchy systemd[1]: Started The PHP FastCGI Process Manager.
4月 21 14:02:39 anarchy php-fpm[474]: [NOTICE] systemd monitor interval set to 10000ms
[usuha@anarchy:~]$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[usuha@anarchy:~]$ sudo php -v
PHP 7.4.5 (cli) (built: Apr 15 2020 17:14:40) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
[usuha@anarchy:~]$
よろしくお願いいたします。
wordpressディレクトリの所有者の問題と思いますが、下記失敗しているので、nginxおよびphp-fpmのコンフィグにてuser、groupがそれぞれ何にしているか確認してみてください
># chown -R nginx:nginx /usr/share/nginx/html/wordpress
>「chown: ユーザー指定が不正: 'nginx:nginx'」と表示がされます。
ありがとうございます。
nginx.conf & php-fpm(www.conf)の user、group はそれぞれ何に設定しているか確認をしました。
nginx は user、group は特に設定していないです。
php-fpm(www.conf)は、user、group は http に設定されています。
[usuha@anarchy:~]$ cat /etc/nginx/nginx.conf
#user html;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
types_hash_max_size 4096;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm index.php;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
root /usr/share/nginx/html;
include fastcgi.conf;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
[usuha@anarchy:~]$ cat /etc/php/php-fom.d/www.conf
...
...
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = http
group = http
...
...
; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. The owner
; and group can be specified either by name or by their numeric IDs.
; Default Values: user and group are set as the running user
; mode is set to 0660
listen.owner = http
listen.group = http
;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
; When set, listen.owner and listen.group are ignored
;listen.acl_users =
;listen.acl_groups =
...
...
[usuha@anarchy:~]$ sudo chown -R http:http /usr/share/nginx/html/wordpress/
[sudo] usuha のパスワード:
[usuha@anarchy:~]$ cd /usr/share/nginx/html
[usuha@anarchy:nginx/html]$ ls -l
合計 16
-rw-r--r-- 1 root root 494 4月 17 01:11 50x.html
-rw-r--r-- 1 root root 612 4月 17 01:11 index.html
drwxr-xr-x 13 root root 4096 4月 18 21:47 phpMyAdmin/
drwxrwxrwx 5 http http 4096 4月 19 00:30 wordpress/
[usuha@anarchy:nginx/html]$ cd (04-21 20:08)
[usuha@anarchy:~]$ cd /usr/share/nginx/html/wordpress/
[usuha@anarchy:html/wordpress]$ wp plugin install wp-mail-smtp
Installing WP Mail SMTP by WPForms (1.9.0)
https://downloads.wordpress.org/plugin/wp-mail-smtp.1.9.0.zip からインストールパッケージをダウンロード中...
Using cached file '/home/usuha/.wp-cli/cache/plugin/wp-mail-smtp-1.9.0.zip'...
パッケージを展開しています…
Warning: ディレクトリを作成できませんでした。
Warning: The 'wp-mail-smtp' plugin could not be found.
Error: No plugins installed.
[usuha@anarchy:html/wordpress][1]$ cd
[usuha@anarchy:~]$
WP Mail SMTP by WPForms は、インストールされませんでした。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー