2021年4月12日 星期一

如何用shell在linux升級 Apache2

1.ubuntu 升級 Apache2 的指令
$sudo add-apt-repository ppa:ondrej/apache2
$sudo apt-get update
$sudo apt install apache2

1.01 shell 升級 Apache2
檔案名稱:UbuntuApache2Update.sh
檔案內容: 
#!/bin/bash
add-apt-repository ppa:ondrej/apache2
apt-get update
apt install apache2

2.CentOS7 升級 http 的指令
$sudo cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
$sudo yum install httpd
$sudo systemctl restart httpd

2.01 shell 升級 Apache2
檔案名稱:CentOSHttpUpdate.sh
檔案內容: 
 #!/bin/bash
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
yum install httpd
systemctl restart httpd


沒有留言:

張貼留言

Laravel 12 CSV 匯入與雙向查詢系統

 一、系統定位           本系統使用 Laravel 12 建立一套 CSV 匯入系統 ,同時兼顧 資料驗證、安全性、API 設計與效能 可將學生帳號資料寫入資料庫,並支援 以「年班座號」查詢帳號 或  以「帳號」反查 年班座號 二、功能清單     1. CSV 上傳...