Ubuntu Virtualbox VM for Ellg Noobs

Brief run down of installing an Ubuntu server in Virtual box to test Ellg on.

Download Virtualbox https://www.virtualbox.org/wiki/Downloads
Get the Ubuntu ISO http://www.ubuntu.com/download/server I always work on the LTS (Long Term Support) version.
Might as well get the ssh client PUTTY aswell http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html whilst we are at it.

Install virtual box and create a Linix Ubuntu 64 VM Use bridge networking and the PC-Net FASTIII ethernet emulation as I have found it much easier and more reliable to work with. I just prefer the bridge network with no NAT. In the CD add an ISO and point to the Ubuntu ISO just downloaded. Start the VM. Install a standard 14.04.3 Ubuntu 64 server. In tasksel select SSH & LAMP choose defaults for all other options. The server will reboot logon and get the DHCP assigned address with

sudo ifconfig

We will use putty for the CLI as copy and post is easier and also this will emulate the same as working with a remote machine.
In putty add the IP address and click connect. Click OK to the RSA2 fingerprint and logon.

Update the base system by

sudo apt-get update
sudo apt-get upgrade

First we will install webmin as its a handy tool for much server admin.

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
sudo wget http://prdownloads.sourceforge.net/webadmin/webmin_1.770_all.deb

(version my of changed)

sudo dpkg --install webmin_1.770_all.deb

If you have any probs

sudo apt-get -f install

will resolve any dependency problems Ok so you should have webmin running on port 10000 https://server_ip:10000 and logon to webmin just to check all ok.

Install Git & composer

sudo apt-get install curl php5-cli git
sudo curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

On the cli just to test


is up and running

We install the GD Php library

sudo apt-get install php5-gd
sudo a2enmod rewrite

Also the default site conf for Apache2 on Ubuntu will be ignoring the .Htaccess so you need to edit it,  Webmin https://IP:10000 and logon
Servers > Apache Webserver click on the Default Server and in the Per-Directory Options click on Directory /var/www/
Edit Directives

AllowOverride None


AllowOverride All

Apply Changes or

sudo service apache2 restart

So we now have a base server ready to go with Ellg, you may want to shut down the VM and clone the VM to keep a clean copy to save the above steps.

Use the webmin file manager or the CLI

cd /var/www/html

You will see the default index.html of the apache install so delete it as composer likes an empty folder for install.

sudo rm index.html
sudo composer self-update
sudo composer global require "fxp/composer-asset-plugin:~1.1.1"
sudo composer create-project elgg/starter-project:dev-master .

Copy and paste the URL given in this case https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+ellg+2015-12-07+0515

You will be asked to sign in or create an account so you can be allocated a token.

Generate that token and paste it back in the cli.

Open a browser and http://server-ip/install.php and viola

We need to change the permissions of the /var/www/html directory and the webmin file manager is as good as any.
First change the owner (chown) to root:www-data as apache runs as www-data on Ubuntu.
Username = root, Groupname = www-data check recursive and click change.
Then we will set the permissions (chmod) to read, write and execute for owner and group and in this instance 774 just to get going.

we then need to create a database so webmin > MySQL Database Server

Create a new database "ellg"

User Permissions, create a new user.
Username = ellg

Password = ellg

Hosts =  localhost

Not very secure but hey, click create.

Database Permissions, create new database permissions.

Select ellg

Username = ellg

Hosts = localhost

Permissions = everything but grant privileges.

Back to the file manager and we will create a data directory in /opt/ call it ellg-data but maybe live something less obvious.
Again chown to root:www-data and set owner and group to read, write execute for now.

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking