The procedure for installing the LAMP (Linux / Apache / MariaDB / PHP) environment on Ubuntu is described below.
sudo su -
timedatectl set-timezone Asia/Tokyo
apt -y update
apt -y install apache2
systemctl enable apache2
systemctl start apache2
Go to your Ubuntu 20.04 server IP address (you can find it with `` `curl -w'\ n'ifconfig.me```) in your web browser and see if the Apache test page appears.
apt -y install php7.4 php7.4-mysql
apt -y install mariadb-server mariadb-client
systemctl enable mariadb
systemctl start mariadb
MariaDB 10.3.25 was installed as of 2020-11-02.
$ sudo mariadb
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 51
Server version: 10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04
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)]>
Download the current WordPress latest version and extract it under DocumentRoot.
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 .
Create the database wordpress with the character code UTF8 on MariaDB Monitor (mariadb command).
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8;
Create a wordpress user with full privileges only for the database you just created (change your username / password accordingly).
GRANT ALL ON wordpress.* TO wordpress@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Access xx.xx.xx.xx / wordpress / with a web browser and make the initial settings for WordPress.
After successful installation, you can log in to the dashboard with the specified user and password.
Recommended Posts