Created
June 27, 2020 19:27
-
-
Save peter279k/faed3a3ffdfd6ea775261c96a5f22aec to your computer and use it in GitHub Desktop.
This is about upgrading Apache server on Ubuntu 16.04 and Ubuntu 18.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# References: | |
# https://www.mysterydata.com/update-apache-2-4-to-latest-version-on-ubuntu-16-04-server-vestacp/ | |
sudo_prefix="sudo " | |
if [[ ${USER} == "root" ]]; then | |
sudo_prefix="" | |
else | |
echo "Don't forget to setup ${USER} having the sudo privilege..." | |
fi; | |
${sudo_prefix}apt-get install software-properties-common | |
${sudo_prefix}add-apt-repository ppa:ondrej/apache2 | |
${sudo_prefix}apt-get update | |
${sudo_prefix}apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C | |
${sudo_prefix}cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak1 | |
${sudo_prefix}apt-get update | |
${sudo_prefix}apt-get upgrade -y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apache Tips