Click here for "Error Codes for Commercial Air Conditioners".

WordPress installation (Apache2.4, Mysql, PHP7)

WordPress installation(Apache2.4、Mysql、PHP7)

█ Installation Requirements 

Install as a virtual host in an Apache 2.4, Mysql, PHP7 environment

█ Installation Order

  • Creating a directory for the subdomain public web (blog1.example.com)
  • Create a database (blog1_database) for the subdomain web (blog1.example.com)
  • Edit the Apache configuration file (httpd.conf)
  • Install WordPress

Creating a directory for the subdomain public web (blog1.example.com)

# mkdir -p /var/www/html/blog1.example.com
# chmod 705 /var/www/html/blog1.example.com
# systemctl restart httpd.service

Creating a database for a subdomain public web (blog1.example.com)

Create a database for wordpress publishing in Mysql. go to the Mysql installation directory.

# mysql -u root -p
Enter password:  ← Root password for Mysql
# systemctl restart httpd.service


> create database blog1_database;
> GRANT ALL PRIVILEGES ON blog1_database.* TO ‘User Name‘@’localhost’ IDENTIFIED BY ‘<password>‘;
> exit

 

Editing the Apache configuration file (httpd.conf)

Move to the directory where you installed Apache 2.4 (different if you installed it with yum or compiled it from source)

# vi /etc/httpd/conf/httpd.conf( or vi /usr/local/apache2/conf/httpd.conf)

<VirtualHost *:80>
ServerAdmin Email address
DocumentRoot /var/www/html/blog1.example.com
ServerName blog1.example.com

<Directory “/var/www/html/ blog1.example.com“>
Options Indexes Includes FollowSymLinks MultiViews ExecCGI
Require all granted
Allow from all
</Directory>
SetEnvIf Request_URI “\.(gif|jpg|png|css|js)$” nolog
ErrorLog logs/blog1.example.com_error_log
CustomLog logs/blog1.example.com_access_log
</VirtualHost>

Restarting Apache

# systemctl restart httpd

Download and install WordPress

# wget https://ja.wordpress.org/wordpress-5.3-ja.tar.gz ← Download
# tar zxvf wordpress-5.3-ja.tar.gz ← extracting
After unzipping, a directory called “wordpress” will be created. Copy its contents to the document root (blog1.example.com).
# cp -fr /wordpress/* /var/www/html/blog1.example.com/

Editing the WordPress configuration file

Move to the wordpress public directory (blog1.example.com)

# vi wp-config.php
define(‘DB_NAME’, ‘database_name_here’);

define(‘DB_NAME’, ‘blog1_database‘);
define(‘DB_USER’, ‘username_here’);

define(‘DB_USER’, ‘User Name’);define(‘DB_PASSWORD’, ‘password_here’);

define(‘DB_PASSWORD’, ‘<password>‘);

Change owner

# chown -R daemon:daemon /var/www/html/blog1.example.com

Initialization of WordPress

When you open http://blog1.example.com/ with a web browser, the WordPress initialization screen will be displayed.
Fill in each field and click “Install WordPress”. (It is best to avoid using a user name that is easy to guess, such as “admin” or “root.)

This completes the installation of Word Press.

タイトルとURLをコピーしました