メモ書きにお使いください。(リロードすると消えます。)
Fedora:ブログサイト(Word Press)設定
Webサーバー、PHP設定.
Webサーバー、PHPを設定します。
データベース設定.
データベースを設定します。
ブログ用データーベースを作成.
MariaDBへrootでログインします。
[root@www ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 3 Server version: 5.5.60-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database wordpress ;
MariaDB [(none)]> grant all privileges onwordpress .* towordpress_user @localhost identified by 'password ';
MariaDB [(none)]> exit
WordPressインストール.
PHP7.4をインストールします。
root@www:~# dnf -y update root@www:~# dnf -y install php7.4 php7.4-mbstring php-pear root@www:~# php -v
root@www:~# dnf -y install php-common php-gd php-mysql php-enchant hunspell
root@www:~# systemctl restart php7.4-fpm
[root@www ~]# cd/var/www/html
[root@www ~]# wget https://ja.wordpress.org/latest-ja.tar.gz
[root@www ~]# tar xvflatest-ja.tar.gz [root@www ~]# rmlatest-ja.tar.gz
[root@www ~]# cd
[root@www ~]# chown -R apache:apache/var/www/html /wordpress/
WordPress設定.
WordPressへアクセスし、「さあ、始めましょう!」をクリックします。
https://
データベース名:
ユーザー名:
パスワード:
データベースの接頭辞:wp_
Apache設定.
WordPress用Apache設定ファイルを作成します。
[root@www ~]# echo Alias /wordpress/var/www/html /wordpress > /etc/httpd/conf.d/wordpress.conf
[root@www ~]# systemctl reload httpd
WordPress初期設定.
WordPressへアクセスし、任意で決めた、「サイトのタイトル」、「ユーザー名」、「パスワード」、「メールアドレス」を入力して「WordPressをインストール」をクリックします。
https://
WordPressをドメイン直下での表示設定.
管理画面で「設定」→「一般」を開き、「サイトアドレス(URL)」に「ドメイン」を設定します。
ドメイン:https://
[root@www ~]# cp/var/www/html /wordpress/index.php/var/www/html /index.php
[root@www ~]# vi/var/www/html /index.php
require( dirname( __FILE__ ) . '/wordpress/wp-blog-header.php' );
[root@www ~]# vi/var/www/html /.htaccess # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
コメント