Skip to content

Instantly share code, notes, and snippets.

@oroce
Created April 13, 2016 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oroce/663e0504684213015bccabba7737e3da to your computer and use it in GitHub Desktop.
Save oroce/663e0504684213015bccabba7737e3da to your computer and use it in GitHub Desktop.
Wordpress setup script for scaleway VC1 server

Scaleway introduced VC1 (x64) servers but their images are built for arm :(

The setup.sh is basically commands copied from Dockerfile which is used to build the image: https://github.com/scaleway-community/scaleway-wordpress

Until they introduce image building possibilities this is your best shot:(

  1. Create a new server
  2. SSH and run the command above
  3. Shutdown the server
  4. Create a snapshot
  5. Profit
sudo su root -c "debconf-set-selections <<< \"postfix postfix/main_mailer_type string 'Internet Site'\"" && sudo su root -c "debconf-set-selections <<< \"postfix postfix/mailname string localhost\""
apt-get -q update && apt-get -q -y upgrade && apt-get install -y -q mailutils mysql-server-5.5 php5 php5-cli php5-fpm php5-gd php5-mcrypt php5-mysql pwgen nginx && apt-get clean
apt-get -yq remove apache2
export WORDPRESS_VERSION=4.4
apt-get install -yq zip && wget -qO scaleway-wordpress.zip https://github.com/scaleway-community/scaleway-wordpress/archive/master.zip && unzip scaleway-wordpress.zip
cp -R scaleway-wordpress-master/patches/etc/* /etc && cp -R scaleway-wordpress-master/patches/usr/local/* /usr/local && cp -R scaleway-wordpress-master/patches/root/* /root
wget -qO wordpress.tar.gz https://wordpress.org/wordpress-$WORDPRESS_VERSION.tar.gz && tar -xzf wordpress.tar.gz && rm -rf /var/www && mv wordpress /var/www && rm -f /var/www/wp-config-sample.php && /usr/local/bin/wp_config.sh && rm -f /usr/local/bin/wp_config.sh && rm -f wordpress.tar.gz
ln -sf /etc/nginx/sites-available/000-default.conf /etc/nginx/sites-enabled/000-default.conf && rm -f /etc/nginx/sites-enabled/default
/etc/init.d/mysql start && mysql -u root -e 'CREATE DATABASE `wordpress` DEFAULT CHARACTER SET `utf8mb4` COLLATE `utf8mb4_unicode_ci`;' && killall mysqld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment