SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


linux:apache_install

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
linux:apache_install [2021/03/03 13:21] – [systemctlの使い方] kimilinux:apache_install [2022/08/19 16:16] – [PHPのインストール] kimi
行 22: 行 22:
 </code> </code>
  
 +<code sh>
 +$ sudo a2enmod ssl
 +Considering dependency setenvif for ssl:
 +Module setenvif already enabled
 +Considering dependency mime for ssl:
 +Module mime already enabled
 +Considering dependency socache_shmcb for ssl:
 +Enabling module socache_shmcb.
 +Enabling module ssl.
 +See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create self-signed certificates.
 +To activate the new configuration, you need to run:
 +  systemctl restart apache2
 +kimi@sstweb:/var/www/html$ sudo a2ensite default-ssl
 +Enabling site default-ssl.
 +To activate the new configuration, you need to run:
 +  systemctl reload apache2
 +$ sudo systemctl reload apache2
 +
 +</code>
 ^  Document root  |  /var/www/html/  | ^  Document root  |  /var/www/html/  |
  
 ===== PHPのインストール ===== ===== PHPのインストール =====
 +
 <code sh> <code sh>
 $ sudo apt install php libapache2-mod-php $ sudo apt install php libapache2-mod-php
行 47: 行 67:
 $ sudo systemctl restart apache2 $ sudo systemctl restart apache2
 </code> </code>
- 
  
  
行 58: 行 77:
 $ sudo tar zxvf ~/dokuwiki-略.tgz  $ sudo tar zxvf ~/dokuwiki-略.tgz 
 $ sudo mv dokuwiki-20??-??-?? dokuwiki $ sudo mv dokuwiki-20??-??-?? dokuwiki
-$ sudo chown -R www-data:www-data /var/www/dokuwiki</code>+$ sudo chown -R www-data:www-data /var/www/html/dokuwiki</code>
   - ウェブブラウザで''http://ip_address_or_FQDN/install.php?''にアクセスし必要事項を設定する。   - ウェブブラウザで''http://ip_address_or_FQDN/install.php?''にアクセスし必要事項を設定する。
  
行 69: 行 88:
  
 ===== Wordpressのインストール ===== ===== Wordpressのインストール =====
 +  - tarボールのダウンロード<code sh>
 +$ wget https://wordpress.org/latest.tar.gz</code>
 +  - DocumentRootにファイルを展開<code sh>
 +$ cd /var/www/html
 +$ sudo tar zxvf ~/latest.tar.gz
 +$ sudo mv wordpress wp
 +$ sudo chown -R www-data:www-data /var/www/html/wp</code>
 +  - MySQLデータベースの設定
 +    - MySQLのインストール<code sh>$ sudo apt install mysql-server
 +$ sudo apt install mysql-client-core-8.0
 +$ sudo apt install mysql-server-core-8.0
 +$ sudo mysql_secure_installation</code>
 +    - Wordpress用データベースと作業用ユーザを設定<code sh>$ sudo mysql -u root -p
 +mysql> create database wpdb;
 +mysql> create user 'wpadmin'@'localhost' identified by '平文パスワード';
 +mysql> grant all on wpdb.* to 'wpadmin'@'localhost';
 +mysql> select user from mysql.user;
 +mysql> quit
 +$</code>
 +  - ウェブブラウザで''http://ip_address_or_FQDN/wp/''にアクセスし必要事項を設定する。
 +
 +^  データベース名  |  wpdb  |
 +^  ユーザー名  |  wpadmin  |
 +^  パスワード  |  .......  |
 +^  ホスト名  |  localhost  |
 +
 +===== systemctlの使い方 =====
 +Apacheを例にsystemctlの使用例を以下に挙げる
 +  * サービスの停止<code sh>$ sudo systemctl stop apache2</code>
 +  * サービスの起動<code sh>$ sudo systemctl start apache2</code>
 +  * サービスの停止後、再開<code sh>$ sudo systemctl restart apache2</code>
 +  * サービスを停止せずに設定だけリロード<code sh>$ sudo systemctl reload apache2</code>
 +  * サービスの自動起動を無効化<code sh>$ sudo systemctl disable apache2</code>
 +  * サービスの自動起動を有効化<code sh>$ sudo systemctl enable apache2</code>
 +
 +====== Under construction ======
 <code sh> <code sh>
-wget https://wordpress.org/latest.tar.gz+
 $ sudo cp -r ~/wordpress/* /var/www/html/ $ sudo cp -r ~/wordpress/* /var/www/html/
 $ tar -xzvf latest.tar.gz $ tar -xzvf latest.tar.gz
行 76: 行 131:
 </code> </code>
  
- 
-====== Under construction ====== 
  
  
linux/apache_install.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki