CentOS Stream 9 | LAMP環境構築 | Linux Life : Cinnamon

Linux Life : Cinnamon

Redhat系のLinux愛好者です。
Fedora、AlmaLinux、RockyLinuxを愛用してます。
デスクトップは、Cinnamonですが、
GNOMEも理解しているつもりです。

【CentOS Stream 9 | LAMP環境構築】

 

L → Linux

A → Apache

M → Mariadb(MySQL)

P → PHP

 

【EPEL】

Extra Packages for Enterprise Linux

を追加します。

 

dnf install epel-release

 

Epelはcrb Repositoryが必要らしい。

 

dnf config-manager --enable crb

 

でcrbレポを有効にします。

 

 

 

【Apache | sendmail | postfix | perl】

 

dnf install httpd sendmail postfix perl perl-CGI mod_perl

 

 

【alternatives】

alternativesでメール送信

アプリを有効にします。

 

alernatives --config mta

 

でsendmailからpostfix

にメール送信アプリを変更

します。

 

 

【SE_Linux】

SE-Linux関連アプリの

インストール

 

dnf install "policycoreutils*"

 

 

【データーベース】

 

dnf install "mariadb*"

 

 

【PHP | phpMyAdmin】

 

dnf install php phpMyAdmin composer php-fedora-autoloader

 

 

【SELinux Management】

 

SELinuxの管理アプリで

論理値を有効にして

phpプログラムやデーターベース

がサーバーサイドで機能するように

します。

 

 

 

【SELinux論理値】

 

httpd_can_sendmail

httpd_ssi_exec

httpd_enable_homedirs

httpd_can_network_connect

httpd_execmem

 

を適宜有効にします。

 

 

【hostnamectl】

 

Static hostnameを設定して

ローカル環境でメール送信

できるようにします。

 

 

【systemctl】

systemctlコマンドで

httpd

postfix

mariadb

を有効にします。

 

【httpd】

systemctl status httpd

systemctl enable httpd

systemctl start httpd

 

 

 

【postfix】

systemctl status postfix

systemctl enable postfix

systemctl start postfix

 
 

 

【mariadb】

systemctl status mariadb

systemctl enable mariadb

systemctl start mariadb

 

 

【Apache】

 

http://localhost/

 

ブラウザーでアクセス

してTEST PAGEが表示

されれば成功です。

 

 

【phpMyAdmin】

 

http://localhost/phpMyAdmin/

 

ブラウザーでphpMyAdminが

表示されれば成功です。

 

 

以上、CentOS Stream 9 

LAMP環境構築の紹介でした。

有難うございました。