Skip to content

Instantly share code, notes, and snippets.

@hvanderlaan
Last active January 4, 2017 06:22
Show Gist options
  • Save hvanderlaan/bc57a3e482a3dbac407cf83eb9e5e61d to your computer and use it in GitHub Desktop.
Save hvanderlaan/bc57a3e482a3dbac407cf83eb9e5e61d to your computer and use it in GitHub Desktop.
wp in lxc
user@host ~ $ lxc launch ubutnu wp-server
user@host ~ $ lxc exec wp-server -- bash
root@wp-server ~ # apt-get update
root@wp-server ~ # apt-get --yes dist-upgrade
root@wp-server ~ # apt-get --yes install wget apache2 libapache2-mod-php7.0 mysql-server php7.0-mysql
root@wp-server ~ # msyql -u root -p
CREATE DATABASE database;
GRANT ALL PRIVILEGES ON database.* TO 'user'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit
root@wp-server ~ # cd /var/www
root@wp-server /var/www # rm -r html
root@wp-server /var/www # wget http://nl.wordpress.org/wordpress-4.7-nl_NL.tar.gz
root@wp-server /var/www # tar zxvf wordpress-4.7-nl_NL.tar.gz
root@wp-server /var/www # ln -s wordpress html
root@wp-server /var/www # cd html
root@wp-server /var/www/html # cp wp-config-sample.php wp-config.php
root@wp-server /var/www/html # vi wp-config.php
  # change database settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment