Download presentation
Presentation is loading. Please wait.
Published byThomasine Tucker Modified over 8 years ago
1
WordPress and Etherpad with BlueMix and Docker
2
Our aim is to run on BlueMix containers (now in beta) these two famous services In the BlueMix dashboard, we click create a container, we then follow the steps, paste a SSH public key, and wait for the creation to be confirmed. Then, we connect to the container using the SSH private key (I used putty as a SSh client on windows). Once connected as root, we are ready to work with our container.
3
WordPress WordPress is a CMS (kind of blog manager) widely used and easy to configure. To run WordPress, we will need Apache, as a web server, MySQL for the database, and php will be the scripting language. Finally, we will install and run WordPress.
4
Apache Installation Our containers are based on ubuntu 14.04, we will be able to use its packet manager, called apt. The command is : apt-get update && apt-get install apache2 && service apache2 start
5
MySQL installation apt-get install mysql-server php5-mysql service mysql start mysql_install_db mysql_secure_installation The installation script will run, and questions will be asked through the terminal (which password, which user …?)
6
Php install (version 5 used) apt-get install php5 libapache2-mod-php5 php5-mycrypt php5-gd libssh2-php We then edit (for example with nano) /etc/apache2/mods- enabled/dir.conf We switch the order of index.html and index.php,
7
Creation of the database mysql –u root –p CREATE DATABASE wordpress; CREATE user wordpress_user@localhost IDENTIFIED BY ‘our_password’; GRANT ALL PRIVILEGES ON wordpress.* TO wordpress_user@localhost; FLUSH PRIVILEGES; exit
8
Wordpress download cd ~ wget http://wordpress.org/latest.tar.gz tar xzvf latest.tar.gz
9
Wordpress configuration cd./wordpress cp wp-onfig-sample.php wp-config.php nano wp-config.php define('DB_NAME', 'wordpress'); define('DB_USER', 'wordpress_user'); define('DB_PASSWORD', ‘our_password');
10
Linking apache and wordpress rsync -avP ~/wordpress/ /var/www/html/
11
First launch We access 129.41.227.85 (or the address given by bluemix)
12
Etherpad Etherpad is a collaborative tool used to edit text, very similar to a Google Doc We will use etherpad lite, that works with nodejs, and NginX will take care of the network.
13
Installation of node.js Etherpad requires a given version of node.js (between 0.10 and 0.12). I then chose to download it directly from the node.js website. Wget http://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz Tar xzvf node-v0.12.4.tar.gz./configure Make #This is the compilation step, it may take time Make install Node –v checks the version of node installed (0.12 for me).
14
etherpad lite installation Mkdir etherpad_folder Cd etherpad_folder git clone https://github.com/ether/etherpad-lite.git./bin/installDep.sh If dependencies are not up-to-date, there are errors : we must update. We can edit the address: ~/etherpad_folder/etherpad- lite/settings.json to switch from 0.0.0.0 to 127.0.0.1.
15
Launching through a screen When etherpad is running, there is no way to type other commands. Thus, we will use what is called a screen, that allows to have more tha none terminal window. If it is not already installed: apt-get install screen Then : screen # we have a blank new window ~/dossier_etherpad/etherpad-lite/bin/run.sh #launching We go back to the main terminal by using the shortcut : press Ctrl and a, then d. To go back to the screen, the command is screen - rd
16
What is the use of nginx? Through wget 127.0.0.1:9001, we check that etherpad works well, (we get an index.html file, its beginning is available with head index.html). We want to access the l’etherpad through the web, we shall use a proxy.
17
Installation of nginx We install it through : apt-get install -t wheezy-backports nginx We create te file : /etc/nginx/sites-available/etherpad And copy the configuration (next slide) Then, we create a symbolic link to the active configuration : ln -s /etc/nginx/sites-available/etherpad /etc/nginx/sites-enabled/ Then, we reload the server and (re)start the service. service nginx reload && service nginx (re)start
18
NginX configuration (you can simply copy/paste it with a few modifications) server { listen 80; // default web http port, sometimes may be 8080 server_129.41.238.118; //replace it with YOUR public IP address, people will access the server through it access_log /var/log/nginx/etherpad.access.log; error_log /var/log/nginx/etherpad.error.log; location / { proxy_pass http://127.0.0.1:9001; //exchanges data with the etherpad proxy_set_header Host $host; proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } map $http_upgrade $connection_upgrade { default upgrade; '' close; }
19
We may now access etherpad through a web browser, and create an active sheet. If there is a problem with the nginx configuration, we get a http 502 bad gateway error.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.