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


沒有留言:

張貼留言

只要點兩下,就能將input資料夾內所有m4a 轉檔為 mp3

         最近需要將m4a檔案轉檔為mp3,所以寫python程式來處理。希望將很多的m4a放進input資料夾內,只要點兩下滑鼠就能將這些m4a 通通轉檔為 mp3。          Recently, I needed to convert M4A files in...