業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

Debian11.11 : MySQL8 , WordPress Install

1. MySQL 8

1. 1 Update package index

Install necessary packages

1.2 Import MySQL Community Repository

Import GPG keys

Import Repository

Perform APT update

1.3 MySQL Install

Enter MySQL root password twice

View about the new authentication system

Select <OK>

Match the authentication plugin defaults and select <OK>

aptpolicy installation

operation check

Mysql version confirmation

1.4.  MySQL Server Security Settings

Run the tool mysql_secure_installation to configure security-related settings for the MySQL server.
Once executed, the tool will start several security settings in the form of questions. First, you will be asked if you want to use a plugin for password validation, as shown below. Password validation checks the strength of a user's password for MySQL and restricts it to only accepting passwords that are secure enough. For example, it must be at least as many characters long as the user's password and must contain at least one symbol and one number. You can set this requirement by asking the following questions
Type y and press Enter if you like

Installation Status

Finally, the security settings are complete when you see the message "All done!

When accessing MySQL, use the

2.Install WordPress

2.1 Database Creation

Create a database for Word Press (for example, in this case, the database name is "wp_db", the user name is "wp_user", and the password is "?Y123456y")
If you receive a message "Your password does not satisfy the current policy requirements" when creating an account, please make sure your password is at least 8 characters long and includes upper and lower case letters, numbers, symbols, etc.

2.2 WordPress Download and Installation

Download and Deployment

Edit WordPress configuration file

Edit contents of wp-config.php

<?php
/**

  • The base configuration for WordPress
    *
  • The wp-config.php creation script uses this file during the installation.
  • and fill in the values.
    *
  • This file contains the following configurations:
    *
  • * Database settings
  • * Secret keys
  • * Database table prefix
  • * ABSPATH
    *
    *
  • @package WordPress
    */

define( 'DB_NAME', 'wp_db' ); ←Database name created in “2.1 Database Creation"
define( 'DB_USER', 'wp_user' );
 ←User name created in “2.1 Database Creation"

/** Database password */
define( 'DB_PASSWORD', '?Y123456y' ); ←Password for the user created in “2.1 Database Creation"

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+

  • Authentication unique keys and salts.
    *
  • Change these to different unique phrases! You can generate these using
    *
  • This will force all users to have to log in again.
    *
  • @since 2.6.0
    define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
    define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
    define( 'NONCE_KEY', 'put your unique phrase here' );
    define( 'AUTH_SALT', 'put your unique phrase here' );
    define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
    define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
    define( 'NONCE_SALT', 'put your unique phrase here' );

/*#@-/

/**

  • WordPress database table prefix.
    *
    *
  • Changing this value after WordPress is installed will make your site think
  • it has not been installed.
    *
    */
    $table_prefix = 'wp_';

/**

  • For developers: WordPress debugging mode.
    *
  • Change this to true to enable the display of notices during development.
  • It is strongly recommended that plugin and theme developers use WP_DEBUG
  • in their development environments.
    *
  • For information on other constants that can be used for debugging,
  • visit the documentation.
    *
  • @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
    */
    define( 'WP_DEBUG', false );

/* Add any custom values between this line and the "stop editing" line. */

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', DIR . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';

Also, add the following to the last line.
If you do not do this, you will be asked for what amounts to FTP connection information when you add the plugin.

define('FS_METHOD', 'direct'); ←

Moving Files

After confirming that the files have been moved, delete the wordpress directory and the downloaded latest.tar.gz

Make apache the owner of the wordpress directory

⑤Access from a browser
Access http://<FQDN>/wp-admin.
If successful, the following WordPress installation information input screen will be output.

「Your PHP installation appears to be missing the MySQL extension which is required by WordPress.」When displayed

Install php library-related software if not already installed

Restart Apache after installation is complete.

again
Access http://[FQDN]/wp-admin.

On the following input screen

  • Site Title   Any name
  • Username   Any name
  • Password  Any password
  • Your Email  Administrator's email address

Enter the information and click "Install WordPress". Remember to enter your "username" and "password" as they are required to access the WordPress administration screen.

Copied title and URL