Install 2.5.5 on GoDaddy VPS

Install 2.5.5 on GoDaddy VPS

by Stefan McGarvey -
Number of replies: 15

Hello, I'm looking at installing Moodle 2.5.5 onto a new Virtual Private Server hosted by GoDaddy and wondering if anyone has done this before and had any advice for me. I currently have 1.9 and have decided instead of upgrading to 2.2 and then to 2.5.5 it would be easier to just start fresh and reinstall my courses later.

If I download the 2.5.5 package and put it up on the FTP site what do I do to launch this? or is it wiser for me to just do the multiply upgrades? I've got basic knowledge and skills.

 

Thank you, Stefan

Average of ratings: -
In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Yun Xu -

Hi Stefan,

For fresh installation:

1. Extract your Moodle package under your wwwroot directory

2. Setup a new database using phpmyadmin, don't forget to check the database hostname, database name and password;

3. enter "yours.domain/moodle/install.php" within a web browser

4. You should know the rest.

Hope it can remind you somthing you have installed Moodle 1.9 before.

In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Ken Task -
Picture of Particularly helpful Moodlers

Your reason for going VPS is negated IF you continue to use the older (non-VPS) methods of installing/updating and upgrading Moodle.   Time for your 'basic knowledge' to up a rung!

First, hope you have an appropriate plan for the VPS:

GoDaddy VPS hosting Plans
Offers CentOS (6.4), Fedora (14), or Windows (2008)

"CentOS Version 6.4 is the operating system of choice for those looking for a highly stable version of Linux that offers enterprise-level reliability."

http://www.godaddy.com/hosting/vps-hosting.aspx

It's LTS (long term support which means
CentOS-6 updates until November 30, 2020
http://wiki.centos.org/FAQ/General#head-fe8a0be91ee3e7dea812e8694491e1dde5b75e6d

Not true of Feodra and certainly NOT Windows

One of the reasons in going VPS is one does't have the restrictions of a shared plan, although one could restrict themselves by purchasing the 'economy package' ... 1 Gig RAM, 40 GB storage ... example.

Here's the **REAL** advantage ...
one can install Moodle, update Moodle and upgrade Moodle via git.

http://docs.moodle.org/26/en/Git_for_Administrators

Yes, it's a learning curve, but once over the hump you'll be glad you spent the time and it will be time well spent.

Assumes CentOS 6.x and a typically installed and configured AMP stack (Apache/MySQL/PHP with git installed via yum.

Installing Moodle via git:

Create the DB for Moodle:

mysql -u [root] -p[password]

from the mysql> prompt:

create database moodle character set utf8 collate utf8_unicode_ci;

\q to quit mysql

Install Moodle via git:

login as root

cd /var/www

mkdir moodledata

chown apache:apache moodledata

git clone git://git.moodle.org/moodle.git html
cd html
git branch -a
git branch --track MOODLE_25_STABLE origin/MOODLE_25_STABLE
git checkout MOODLE_25_STABLE

cd html/admin/cli/

php install.php

This last script will prompt for those items seen in the Web based install.

Once completed make sure everything is readable by apache user:

cd /var/www/html/

chown apache:apache * -R

Hit the site with browser.   Login.  Enjoy!

Example: updating a Moodle 2.5.x that was installed via git to the highest most secure version of 2.5.5 is as simple as the following commands:

1st backup site:

mysqldump -u [user] -p[password] moodle > /home/backup/moodlebackup-$(date +%Y%m%d%-H%M%S).sql
tar -cvf /home/backup/moodlecode-$(date +%Y%m%d%-H%M%S).tar /var/www/html
tar -cvf /home/backup/moodledata-$(date +%Y%m%d%-H%M%S).tar /var/www/moodledata

Now update the site:
cd /var/www/html/
php admin/cli/maintenance.php --enable
git pull
php admin/cli/upgrade.php --non-interactive
php admin/cli/cron.php
php admin/cli/purge_caches.php

Hit the site with browser and login as admin level user.
Go to Notifications and acquire the plugin updates - if there are any.

The above two routines could be put into an executable script in /usr/local/bin/
belonging to and executable by root user ONLY.
The 1st called 'backup'.
The 2nd called 'updatemoodle'.

Once those scripts are in place and made executable by root user, to update a Moodle now it's just two commands as root user:

backup [ENTER]

and when that's ifinished

updatemoodle [ENTER]

Done!

'spirit of sharing', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Install 2.5.5 on GoDaddy VPS

by Ken Task -
Picture of Particularly helpful Moodlers

Oops .... the following a correction/addition for https://moodle.org/mod/forum/discuss.php?d=256830#p1113889

the last command in the example above for updating a site ...

after php admin/cli/purge_caches.php

one should issue:

php admin/cli/maintenance.php --disable

That takes site out of maintenance mode - otherwise, no one can login ... not even admin level users.

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Install 2.5.5 on GoDaddy VPS

by Stefan McGarvey -

Thank you Ken for the in-depth steps to upload a Moodle on a GoDaddy VPS. Can you let me know why the Economy VPS would be a bad starting point. The handful of Moodle sites I have currently have little traffic.

I believe I'll be starting the process today of moving over to a VPS. I have my company site plus 3 Moodle sites that I will be recreating on my new VPS. I think the Cent06 is the way to go and hopefully I can have cpanel included on this as I heard this makes my life a lot less stressful.

If I run into any trouble I'm glad Moodle has such a great team of people willing to share what they know.

Regards, Stefan

In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Usman Asar -
Picture of Plugin developers Picture of Testers

Stefan, have you got CPanel with your hosting? if yes then let me know I will create a video tutorial for you to follow.

In reply to Usman Asar

Re: Install 2.5.5 on GoDaddy VPS

by Stefan McGarvey -

Hello Usman, I will be requesting CPanel so any video tutorials would be helpful. With this video and the information Ken has provided my stress levels should be gone when attempting this install.

Thank you, Stefan

In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Usman Asar -
Picture of Plugin developers Picture of Testers

just PM me when you are up & ready, btw how much you have paid for the VPS @ goDaddy? and let me know configuration as well.

In reply to Usman Asar

Re: Install 2.5.5 on GoDaddy VPS

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Usman, I purchased a GoDaddy "Value" VPS last Thanksgiving, under a GoDaddy promotion, for $32.5/month for six months.  This has 2GB RAM, and I find that when I do a "TOP" command on my VPS, that I have around 800MB free memory.  This is why I believe the GoDaddy "Value" VPS (Linux, of course) is the best starting point for Moodle.  This particular VPS is my "experimental" VPS, and I am able to continue learning.  Also, I found that with Opcache running, memory consumption was a little higher, but I still have 800MB free.

I am not sure where Stefan is in his install, and I see at least two topics on his issues.  It's a little hard following all of the advice he is getting.

From my own experience, I am very comfortable running my small Moodle site (15 courses/year, 300 students/year) with this GoDaddy VPS.  The server has been very solid, and I haven't needed GoDaddy to resolve an issue for around two years.

In reply to Rick Jerz

Re: Install 2.5.5 on GoDaddy VPS

by Usman Asar -
Picture of Plugin developers Picture of Testers

Thanks for your reply Rick, you have always been helpful in replying to queries quicker and in efficient manner (Appreciated), Thats bit weird to know Opcache is consuming bit more of memory, though thinking that system load may have been bit less.

I assume you are running Apache in background? I manage to get another shared hosting (Just fora test)  this Valentine's day with CrocWeb (Canadian Based, and have heard very good reviews about them), so far so good they haven't had shown a second of downtime since February 13th, the main reason to go with them wasn't uptime, but they are on LiteSpeed web servers as unlike Apache (Free), LiteSpeed is actually paid server and bring substantial speed and performance improvements over Apache, lets see if LiteSpeed is upto the claims of twice as fast as Apache on PHP.

In reply to Usman Asar

Re: Install 2.5.5 on GoDaddy VPS

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yes, I am running Apache.  Here are my specs:

Moodle 2.6.2 (Build: 20140310), PHP Version 5.5.7, MySQL 5.5.34, CENTOS 6.4, Apache 2.2.26.

Now that I think about it, I am not sure if it was Opcache or some mySQL settings that consumed more memory.  I made changes to both of these at the same time.  I will have to experiment to confirm.

I will have to look into CrocWeb someday.  Do you have a V1 Croc?

In reply to Rick Jerz

Re: Install 2.5.5 on GoDaddy VPS

by Usman Asar -
Picture of Plugin developers Picture of Testers

Rick, I am on shared hosting with Croc, as my site(s) are not yet heavy enough for me to consider bigger possibilities, with Croc was waiting for Valentine's day deals so grabbed anything with better deal, because Croc offered 50% OFF for 3 years so just to test I went with their basic, though haven't put to test yet, as If I have to go for VPS or highers then it will be wiredtree, have heard a lot good about them as well, another good host that is very much recommended is  asmallorange.

you should as well keep in touch with webhostingtalk.com (offer's section), you'll be grabbing loads of deals when time's right. like I manage to get 75% off for life on turnkey's internet for their E-Commerce server (400G space, 4TB bandwidth, static IP and SSL) all for $2.80 a month, despite reading plenty mixed reviews I went for it and to date I am not complaining, very good uptime and very responsive team.

In reply to Usman Asar

Re: Install 2.5.5 on GoDaddy VPS

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Thanks for the tips.  Even GoDaddy has promotions, so I never pay full price for anything.

In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Stefan McGarvey -

Hello Rick, it's been awhile since I've been in here. My GoDaddy VPS migration has now been complete. I can log into my CPanel but don't know where to look to find the files I need to change for php.ini to help with my upload/time limit. Since I have 3 moodle sites I figured I'll play around with upgrading the 1.9 platform to 2.6.2 on my demo site instead of one of my clients.

Any help in figuring out how to use CPanel would be appreciated.

Take care, Stefan

 

 

In reply to Stefan McGarvey

Re: Install 2.5.5 on GoDaddy VPS

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

On my GoDaddy VPS, php.ini is in /usr/local/lib/.  My changes to this file include:

upload_max_filesize  = 128M
post_max_size  = 128M
memory_limit = 256M 
max_input_time from 200 
max_execution_time from 900
Add max_input_vars = 1000

I also add the recommended lines for Opcache.  Mine are:

==================

[opcache]

opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 4000
opcache.revalidate_freq = 60 

; Required for Moodle
opcache.use_cwd = 1
opcache.validate_timestamps = 1
opcache.save_comments = 1
opcache.enable_file_override = 0

; If something does not work in Moodle
;opcache.revalidate_path = 1 ; May fix problems with include paths
; Experimental for Moodle 2.6 and later
;opcache.fast_shutdown = 1
;opcache.enable_cli = 1 ; Speeds up CLI cron
;opcache.load_comments = 0 ; May lower memory use, might not be compatible with add-ons and other apps.

; Need to specify this
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20121212/opcache.so

================

I used "Easy Apache" in WHM to pick the latest version of php and mySQL.  Also in Easy Apache, I turned on the following components: zip, xmlrpc, soap, mysql improved, mbstring, intl, gd.

I also modified the my.cnf file, which is for mySQL.  You probably don't need to do this, but my file is attached.

Here is my current configuration: Moodle 2.6.2 (Build: 20140310), PHP Version 5.5.7, MySQL 5.5.34, CENTOS 6.4, Apache 2.2.26.

Hope all of this helps you. 

 

In reply to Rick Jerz

Re: Install 2.5.5 on GoDaddy VPS

by Stefan McGarvey -

Thanks Rick, I will give this a shot and hope for the best.

 

Regards, Stefan