施勢帆老師的教學網站

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 1026|回復: 0

Install LAMP Stack on Rocky Linux 9 {Step by Step}

[複製鏈接]

609

主題

619

帖子

2897

積分

管理員

Rank: 9Rank: 9Rank: 9

積分
2897
發表於 2024-4-16 14:21:37 | 顯示全部樓層 |閱讀模式
Install LAMP Stack on Rocky Linux 9 {Step by Step}

dnf -y update
dnf -y install httpd
systemctl start httpd
systemctl stop firewalld
dnf install mariadb-server mariadb -y
systemctl start mariadb
mariadb-secure-installation
dnf module enable php:8.1
dnf install php php-cli php-gd php-curl php-zip php-mbstring php-mysqlnd -y
systemctl restart httpd
vi /var/www/html/info.php
<?php   phpinfo();   ?>

How to Install and use phpMyAdmin on Rocky Linux
dnf -y install wget
wget -P /tmp https://www.phpmyadmin.net/downl ... test-english.tar.gz
cd /tmp
tar -xvfz phpMyAdmin-latest-english.tar.gz
mv phpMyAdmin-5.2.1-english /usr/share/phpmyadmin
cd /usr/share/phpmyadmin/
cp config.sample.inc.php config.inc.php
openssl rand -base64 32
BAz+oQ8QA4zI8OIoH2SeJftLKEEunAUjd1eXyLoF3oA=


vi /usr/share/phpmyadmin/config.inc.php


$cfg['blowfish_secret'] = 'BAz+oQ8QA4zI8OIoH2SeJftLKEEunAUjd1eXyLoF3oA='; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['TempDir'] = '/tmp';

mkdir /usr/share/phpmyadmin/tmp
chown -R apache:apache /usr/share/phpmyadmin
chmod 777 /usr/share/phpmyadmin/tmp



vi /etc/httpd/conf.d/phpmyadmin.conf


Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>
<Directory /usr/share/phpmyadmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
</Directory>


chcon -Rv --type=httpd_sys_content_t /usr/share/phpmyadmin/*
systemctl restart httpd


http://your-server-ip-address/phpmyadmin

ngrok config add-authtoken ........

ngrok http 80



Linux
cd
wget https://bin.equinox.io/c/bNyj1mQ ... ble-linux-amd64.tgz
tar xvfz ngrok-v3-stable-linux-amd64.tgz
./ngrok config add-authtoken ......
vi /var/www/html/index.html
i -> insert mode
Linux 123456789
:wq
./ngrok http 80







本帖子中包含更多資源

您需要 登錄 才可以下載或查看,沒有帳號?立即註冊

x
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|小黑屋|施勢帆老師的教學網站

GMT+8, 2024-11-22 11:41 , Processed in 0.040641 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表