Last active
September 4, 2023 22:41
-
-
Save huchka/f30c03e918c1f3bab221f3135dec644a to your computer and use it in GitHub Desktop.
Shell script to install wordpress on ubuntu xenial.
This file contains 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
#!/usr/bin/env bash | |
apt-get update | |
apt-get upgrade | |
apt-get install emacs -y | |
apt-get install apache2 apache2-utils -y | |
systemctl enable apache2 | |
systemctl start apache2 | |
apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-cli php7.0-cgi php7.0-gd -y | |
systemctl restart apache2 | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password password password' | |
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password password' | |
apt-get install mysql-client mysql-server -y | |
cd /root | |
wget -c http://wordpress.org/latest.tar.gz | |
tar -xzf latest.tar.gz | |
mv wordpress/* /var/www/html/ | |
rm -r wordpress | |
chown -R www-data:www-data /var/www/html/ | |
chmod -R 755 /var/www/html/ | |
rm /var/www/html/index.html | |
echo "create database wordpress" | mysql -u root -ppassword |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment