So, there has been a lot of interest in how to build your own school services such as blogs, wikis, and social network. This session is dedicated to understanding the basics of how you can setup a basic social networking sites for your class, school, or district.
To accomplish this task we are going to need to learn about a few things:
- Server Virtualization
- DNS basics
- Linux LAMP
- WordPress and Buddypress

Server Virtualization
Basically virtualization is software/hardware that allows you to run a complete operating system on an existing machine as through it is a different physical machine. This allows a systems resources to be maximized and for an end user to interact with an operating system independent of the underlying hardware.
We are going to use Virtualbox by Oracle an open-source virtualization tool for this session. It is quit easy and can be used on Windows, OS X, and just about any variety of Linux.
- Install following the directions in the user manual.
- Configure Example VM settings
- Copy Example.VDI folder to your VMMachine Directory
- Adjust VM settings to suit your machine
- Start it up.
VM Setup after install:
- Update Current Modules
sudo apt-get update
- Upgrade your server to latest software and patches
sudo apt-get upgrade
- Install openSSH server so that you can use a terminal to control server
sudo apt-get install openssh-server
- Open terminal session your platform of choice and ssh into the box
ssh bpadmin@<your-ip-address>
(You’ll be prompted to add the RSA Key, type “yes” and then input your password.)
- Setup Webmin on your server using APT repositories
- Add Webmin APT repository to server APT sources
sudo nano /etc/apt/sources.list
- Add Comment and Webmin URLs
##Webmin Repositories for web-based server administration
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
- Fetch and install my GPG key with which the repository is signed
cd /root
wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
- Update your repositories and install webmin
sudo apt-get update
sudo apt-get install webmin
- Test your webmin install by navigating to https://<your-ip-address>:10000
- Your get an untrusted certificate warning (This is normal unless you purchased a 3rd party certificate, which is totally unnecessary.)
- Accept it.
- Login using admin user info.
- Configure local DNS using Hosts file
- Server DNS
- Set up an entry for host server in the /etc/hosts file
sudo nano /etc/hosts
- Add line with server reference to end
<your-ip-address> buddypress
- Check your DNS by pinging your URL, it should have the IP in the response.
- Save
- Client DNS
- Setup an entry on your client machine, this various depending on the flavor of your OS.
- Check your DNS by pinging your URL, it should have the same IP as the server
- Begin our LAMP (Linux, Apache, MSQL, and PHP) server setup (Adapted from HowtoForge.com)
- Install MySQL database server
sudo apt-get install mysql-server mysql-client
- Set up a strong root password
- Check MySQL in command-line
mysql -u root -p
(enter password)
- We’ll check the status of the server with a sql command (the semi-colon is critical)
show status;
- Exit MySQL Shell
exit;
- Install Apache2 server
sudo apt-get install apache2
- Open your web-browser and check your apache server at both IP address and buddypress URL. Both should work.
- Configure apache2 settings and modules in webmin
- Log into Webmin @ https://<server-ip-address>:10000
- Click Servers
- Click Apache Webserver
- Click Global Configuration Tab
- Click Configure Apache Modules icon
- Make sure rewrite is enabled and save
- Stop and start the apache server using the hyperlink in the top right corner
- Install PHP5 to use with Apache2
sudo apt-get install php-5 php5-suhosin
- Restart Apache
sudo /etc/init.d/apache2 restart
- Create a phpinfo file to verify PHP settings
sudo nano /var/www/info.php
- Add the phpinfo function to file
<?php phpinfo(); ?>
- Save
- In your web-browser navigate to http://<your-ip-address>/info.php
- Verify PHP settings.
- Add additional useful PHP extensions
sudo apt-get install php5-mysql php5-gd php5-imagick php5-curl
- Your webserver is now ready to rock!
Setting Up WordPress with SVN
- Install SVN client for linux
sudo apt-get install subversion
- Change to web directory
cd /var/www
- Use the guide provided by WordPress.org
sudo svn co http://core.svn.wordpress.org/tags/3.1 .
- Now prepare a database for wordpress install using Webmin
- In your browser navigate to https://<your-server-ip>:10000
- Go to >Servers>MySQL Database Server
- Login using root and root password
- Click Create a New Database
- Give it an original name (“wpbp”), set character set to (“utf8″), and set collation to (“utf8_bin”)
- Click Save
- Create wordpress DB user to limit server permissions.
- Under Global Options click User Permissions
- Click Create new User
- Give it a name (“wpdb_user”), a complex password, and give it the following permissions (“select, insert, update, delete, create, alter, and drop”)
- Click save.
- Now your DB and DB user are ready for the installation
- Make sure that your wordpress files and directories are read/write for install and default html is removed.
sudo chown -R www-data:www-data /var/www
sudo rm /var/www/index.html
- Configure mod_rewrite in Apache so that you can use pretty URLS
- In Webmin go to >Servers>Apache Webserver
- Click on virtual server
- Click Edit Directives
- Find options and make sure that it includes FollowSymLinks
- Find
AllowOverride and make sure that it include FileInfo or ALL
- Save
- Start and stop Apache2 server
- Navigate to our webserver in a web browser and follow the directions.
- Verify successful wordpress install at your URL.
Setting Up Blog Network and Buddypress
- Create blog network following directions @ wordpress.org
- In terminal edit the /var/www/wp-config.php file as described in the article above by adding
define(‘WP_ALLOW_MULTISITE’, true);
- Log in and go to >Tools>Network
- Select sub-directories
- Follow directions on the “Enabling Networks” page by using copy and paste with terminal
- Create directory
sudo mkdir /var/www/wp-content/blogs.dir
- Correct folder permissions for upload folder
sudo chown -R www-data:www-data /var/www/wp-content/blogs.dir
- Edit /var/www/wp-content.php
sudo nano /var/www/wp-content.php
- Edit /var/www/.htaccess
sudo nano /var/www/.htaccess
- Log out of WordPress and then log back in.
- You should now have a “Network Admin” in the top right corner.
- Now we need to make sure that our site permissions are correct with CHMOD
- For most installations the following should suffice
sudo chmod -R 755 /var/www
- If you are interested in setting a more hardened WordPress install check out this article
- You are ready start building blogs and installing Buddy Press.
- Install Buddypress plugin
- Login in as admin if you haven’t already
- Click “Network Admin” in the top right corner
- Go to > Plugins > Add Plugin
- Search for Buddypress
- Click Install Now link
- Click the Network Activate link
- Make Buddypress theme available to main blog
- Go to Sites
- Click the edit link under “/” blog
- Click theme tab
- Enable Buddypress default theme
- Go back to main blog admin page by clicking Site Admin link
- Click > Appearance > Themes
- Activate Buddypress theme
- View site