Installation help

 
 
Picture of Simon Bryan
Re: Got Git installed in my existing Moodle site. Here is How!
 

Just jumping in cause this all very confusing!! CVS was so easy  smile

So if I hve my manually created moodle folder at /var/www/html/moodle

I would run the above set of commands from /var/www/html?

Cheers

Simon

 
Average of ratings: -
Picture of Ken Task
Re: Got Git installed in my existing Moodle site. Here is How!
Group Particularly helpful Moodlers

Yes, I agree ... it is confusing ... at first.  Like many things moodle it is recommended to tinker on a non-production site first.

Glad to play a part in Rodney's 'adventure' and he definitly dug into it for an existing moodle code directory.  He is indeed correct.  Just think that there is/might be an easier transition method ... that's all ... and that's what I'm sharing! ;)

Do you have existing moodle code in the moodle directory and is it your currently active site?

if so, git won't (without more commands than shown in the Moodle docs and the additional steps shown in the first posting here in this thread) update/create/change any files/folders in an existing moodle code directory.  One good thing about it ... one 'gets into git' .... deep!  Nothing wrong with that.  I, myself, might be re-visiting this thread to re-read what Rodney did ... should I have the need later (hope not!).

In the older documentation for upgrading a site, they advised renaming the existing moodle folder to 'moodle.back', unzipping a download, using FTP to upload to a 'moodle' directory on the site and then copy the addons/themes and config.php file to the newly created moodle directory.   That's probably why you went to CVS, huh?

My method is similar to that ... cept it's on the server using git and there is no download/upload issues.

In your case, and if using my 'twist', one would issue the commands at /var/www/html/ and the directory you are creating with the first git command I'd recommend be 'moodlegit'.

 

git clone git://git.moodle.org/moodle.git moodlegit

cd moodlegit

git branch -a

git branch --track MOODLE_XX_STABLE origin/MOODLE_XX_STABLE

git checkout MOODLE_XX_STABLE

After 'moodlegit' directory as been configured to track the SAME version you already have in the 'moodle' directory, then cp -rp the mods/blocks/themes that are NOT core into the mod/block/theme directory of the 'moodlegit' folder.  Copy the config.php file also from 'moodle' to 'moodlegit'.

Change ownerships/permissons on 'moodlegit' as per system dictates ... in my case ... CentOS so from /var/www/html/

chown apache:apache moodlegit -R

IF one is ready and double checked themes/blocks/mods, then all one needs to do is 'swap' the folders ...

mv moodle moodle.back

(renames the 'moodle' folder to 'moodle.back')

mv moodlegit moodle

(renames the 'moodlegit' folder to that which is accessed by URL 'moodle').

Then hit site with browser and login.

That help?

Once that is done and it's working, then it's like CVS in that one executes 'git pull' *inside* the 'moodle' directory.

BTW, am not saying by any means/form/or fashion that my 'twist method' is the best, but I think it dives into git less than other methods right now and gets the job done.  One should set aside some time to tinker with git ... just not on active production server, but a 'tinker' instance.

'spirit of sharing', Ken

 
Average of ratings:Useful (2)
Picture of Simon Bryan
Re: Got Git installed in my existing Moodle site. Here is How!
 

ABsolutley perfect instructions - just what I needed. Did not wnt to become a git expert just update Moodle!! 

All working and reports up to date.

 

Cheers and thanks again Ken

 
Average of ratings: -
Picture of Ken Task
Re: Got Git installed in my existing Moodle site. Here is How!
Group Particularly helpful Moodlers

Great!  Glad to hear it.  Feel free to rate the post that helped as 'Useful'! ;)

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Simon Bryan
Re: Got Git installed in my existing Moodle site. Here is How!
 
Done! Didn't realise there were ratings
 
Average of ratings: -