GNU/Linux >> Linux の 問題 >  >> Linux

ルートとしてユーザーアカウントにWordPressをインストールします

サーバーにSoftaculousがなく、ユーザーからWordPressのインストールを求められました。
WordPress zipをダウンロードし、アーカイブを解凍し、FTP経由でユーザーアカウントにファイルをアップロードできます。また、cPanelにログインして、データベースとユーザー名を作成する必要があります。

WordPressをインストールする別の方法を紹介します。ユーザー「plothost」用にWordPressをインストールします。

1.ウェブホスティングサーバーにSSH経由でrootとしてログインします。

2.WordPressをインストールする場所に場所を変更します

root@web [~]# cd /home/plothost/public_html/
root@web [/home/plothost/public_html]# 

3.最新のWordPressバージョンをダウンロードします。永続的なリンクはhttps://wordpress.org/latest.zip

です。
root@web [/home/plothost/public_html]# wget https://wordpress.org/latest.zip --2017-05-01 08:14:59--  https://wordpress.org/latest.zip Resolving wordpress.org (wordpress.org)... 66.155.40.249, 66.155.40.250 Connecting to wordpress.org (wordpress.org)|66.155.40.249|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 8756989 (8.4M) [application/zip] Saving to: 'latest.zip' 100%[==============================================================================================================================>] 8,756,989   7.07MB/s   in 1.2s 2017-05-01 08:15:01 (7.07 MB/s) - 'latest.zip' saved [8756989/8756989] 
root@web [/home/plothost/public_html]# 

4.現在のディレクトリにあるarchive-zipファイルを抽出します。

root@web [/home/plothost/public_html]# unzip latest.zip -d . 

zipアーカイブはpublic_html/plothost / wordpress /

に抽出されます

5.WordPressをpublic_html/フォルダーにインストールします。それでは、ファイルを移動しましょう。

root@web [/home/plothost/public_html]# mv ./wordpress/* . 

6.これで、すべてのWordPressファイルが/ plothost /public_html/にあります。データベースを作成し、ユーザー名を割り当てる必要があります

root@web [/home/plothost/public_html]# mysql 
Welcome to the MariaDB monitor.  Commands end with ; or \g. Your MariaDB connection id is 384766 Server version: 10.1.22-MariaDB MariaDB Server Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE wpbase; 
Query OK, 1 row affected (0.00 sec) 
MariaDB [(none)]> CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'pass123456';
Query OK, 0 rows affected (0.19 sec) 
MariaDB [(none)]> GRANT ALL ON wpbase.* TO 'wpuser'@'localhost'; 
Query OK, 0 rows affected (0.02 sec) 
MariaDB [(none)]> 

7.構成ファイルの名前をwp-config-sample.phpに変更します。 wp-config.php

root@web [/home/plothost/public_html]# mv wp-config-sample.php wp-config.php
root@web [/home/plothost/public_html]# 

8.お好みのエディター(viなど)でファイルwp-config.phpを編集します。以前に使用したWordPressの詳細で行を変更します:

/**WordPressのデータベースの名前*/
define(‘DB_NAME’、‘database_name_here’); /**MySQLデータベースのユーザー名*/
define(‘DB_USER’、‘username_here’); /**MySQLデータベースのパスワード*/
define(‘DB_PASSWORD’、‘password_here’);

になります

/**WordPressのデータベースの名前*/
define(‘DB_NAME’、‘wpbase’); /**MySQLデータベースのユーザー名*/
define(‘DB_USER’、‘wpuser’); /**MySQLデータベースのパスワード*/
define(‘DB_PASSWORD’、‘pass123456’);

9.ほぼ完成です。ユーザーがファイルを変更できるように、ファイルのユーザー/グループを変更しましょう。

root@web [/home/plothost/public_html]# chown -R plothost:plothost . 

10.これで、ユーザーにインストールURLを指定できます。ユーザーは、サイトタイトルを入力してインストールを完了します。 、管理者のユーザー名とパスワードメール 。 (下の画像のように)

私たちのウェブホスティングプランでは、Softaculousを介してWordPressを簡単にインストールできます。 WordPressホスティングページをご覧ください。


Linux
  1. LinuxにApacheを使用してWordPressをインストールする

  2. ユーザーアカウント「systemd-bus-proxy」

  3. root 以外のユーザー アカウントで Git をインストールする

  1. Linuxでrootアカウントを無効にする4つの方法

  2. root アカウントの UID/GID は常に 0 ですか?

  3. 追加の root ユーザーを作成するには?

  1. Linuxでrootアカウントを無効にする方法

  2. Debian9StretchにWordPressをインストールする方法

  3. Debian10にWordPressをインストールする方法