I really need Moodle dev online with Git (for dummies)

I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Number of replies: 38
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

...but  I haven't much idea how to go about it... Local host is fine but it's just that - local on  one laptop and I'd like an instance I can access from anywhere online, any laptop/pc/device. (Yes I have looked at the documentation but I think it is for people who already know what they are doing, and I don't!)

I have a VPS. It has Parallels Plesk Panel and on the Webhosting Access page it says (quote) Here you can view the IP addresses associated with your subscription and change the username and password of the system user account. This account is used for accessing Panel remotely, over SSH on Linux or RDP on Windows.

By which I assume I can get this set up; I just don't know the paths or terms. I know how to make the database- I have plenty of domain  names or subdomains but I don't know what to type and into where! Sorry for the ignorance. On localhosts I have (Win8) Powershell or (Ubuntu) Terminal - am I supposed to type into them and if so, what? I also see this:

Average of ratings: -
In reply to Mary Cooch

Re: I really need Moodle dev online with Git (for dummies)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is a Linux VPS, yeh?  Do you know what 'distribution' it is?

- Set that dropdown to /bin/bash
- Get an ssh client, if your laptop/desktop is Windoze then you want PuTTY. (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html - get the Windows installer)
- Run putty and fire in the IP address of your host plus the username and password. This should get you to the VPS command line.

The command line is a thing called 'bash' and is normal for Linux. I have no idea how much you know about command line Linux... ask away I suppose.

In reply to Howard Miller

Re: I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Does this mean anything : CentOS 6.2 (Final)

I also have a laptop with Ubuntu  on it now (since last week) if that makes it easier than Windows big grin

Once I get to the VPS command line, do I type in the usual stuff I do when I want to make a new Moodle on local host? If so then I can do that bitsmile I also learned about Fred's mdk last week.

In reply to Mary Cooch

Re: I really need Moodle dev online with Git (for dummies)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yep - Centos is a Linux distribution. It doesn't make any difference what the 'client' machine is (the one you type on) as you are just using it as a terminal emulator. The command line will be that of the remote VPS regardless.

Being Centos makes a difference for installing stuff. I'm not a Centos user unfortunately but, for example, installing Git should probably be as simple as...

$ sudo yum install git

Where $ is the prompt (don't type that). Anyway, you can always look up "Installing Git in Centos" in Google.

In the above command 'sudo' means "run the rest as the 'superuser'", 'yum' is Centos's package manager command and the rest should be pretty obvious.

A lot of the docs are for the other big distro, Ubuntu, the big difference is that Ubuntu's package manager command is 'apt-get', otherwise same idea.

After that it should be the usual. I don't know what sort of system you used before. Your web root will now be at /var/www and you'll need not to be surprised by 'sudo chown' and 'sudo chmod' wink

In reply to Howard Miller

Re: I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Greatsmile I had better leave this until the weekend or I won't get any "real" work done, but this could be fun (or extremely frustrating; not sure which yet!)

In reply to Mary Cooch

Re: I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Don't know what was shared but CentOS 6.2 is in need of upgrading ... already ... now available via yum - 6.4.

Maybe the following will help with either your Ubuntu or your CentOS machines:

Ubuntu (a long term support server version) and CentOS (which is already LTS and server);

As a matter of security when using ssh to remote into the server, best to login as a user then escalate privileges … su to root (substitute user).
Most generic commands: ls, pwd, cd, zip, unzip, tar, chown, chmod, git, etc. are the same and located in /usr/bin/

It is said the most important command in Linux is: man man

Both OS's come with command line editor called nano - which can edit .ini's, .conf, .cnf, sql dumps, etc.

sudo -
Ubuntu - usually on by default - commands that would change config, install software, etc. require one to use 'sudo' in front of them.

CentOS - usually not on by default - su to root user or login directly using root user credentials (latter not recommended)

location of web server document root for apache server -
Ubuntu - normally /var/www/

CentOS - normally /var/www/html/
(note this does relate then to the location, permissions and ownerships of moodledata which is generally up one level from document root.  
In Ubuntu: /var/.  In CentOS: /var/www/

Apache user/group:
Ubuntu - normally www-data (user and group)
CentOS - normally apache (user and group)

Apache configuration:
Ubuntu - normally located in /etc/apache2/ - there is also a /etc/apache2/conf.d which contains .conf and .load files for extensions
CentOS - normally located in /etc/httpd/conf - there is also a /etc/httpd/conf.d which contains ini files for extensions

MySQL commands:
Ubuntu - as stated before are located in /usr/bin/ ls -l /usr/bin/mysql* to see them
CentOS - ditto


Package Manager - installation of software or acquiring updates -
Ubuntu - apt-get
general comments: Ubuntu does tend to be leading edge with versions of software it has available to install from it's repositories.

CentOS - yum, but rpm [RedHat Package Manager] is still in the underpinnings.
general comment: CentOS [based on RHEL] tends to be conservative with versions of software it has available to install from it's repositories.

For both … as it relates to Moodle … PHP version and extensions:
Commands in terminal (ssh/bash) that:
 show version of PHP: php -v
 show modules of PHP loaded: php - m
 show initialization of PHP: php -i

Location of php.ini:
Ubuntu - /etc/php5/apache2/php.ini
       - /etc/php5/cli/php.ini
CentOS - /etc/php.ini

MySQL:
Databases (the actual files):
Ubuntu - normally located in /var/lib/mysql
CentOS - normally located in /var/lib/mysql/

Configuration of MySQL:
Ubuntu - normally located in /etc/mysql/my.cnf
CentOS - normally located in /etc/my.cnf

MySQL Commands: mysql, mysqladmin, mysqldump, etc.
Both - /usr/bin/

MySQL Version:
Ubuntu - mysql -V
CentOS - mysql -V

Restart of Services from command line:
Ubuntu Apache: /etc/init.d/apache2 restart
Ubuntu MySQL: /etc/init.d/mysqld restart

CentOS Apache: /sbin/service httpd restart
CentOS MySQL: /sbin/service mysqld restart

Note: can also check on status (see if running) by using status at end of command and, if needed, can stop the services using stop at the end of the command

Git Install and Moodle
Both have git or can acquire it with native package manager.  
Both can install Moodle via git.  The only difference is the directory in which to install and the data directory (mentioned above).

The following for a moodle24 directory from document root and as root user or sudo:

git clone git://git.moodle.org/moodle.git moodle24
cd moodle24
git branch -a
git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE
git checkout MOODLE_24_STABLE

Ubuntu: sudo chown www-data:www-data ./moodle24 -R
CentOS: chown apache:apache ../moodle24 -R

The DB for Moodle can be setup via command line or via Webmin (see below)

Ubuntu and CentOS:

mysql -u root -p

and then from the mysql> prompt:

create database moodle character set utf8 collate utf8_general_ci;

** highly recommend installing Webmin for either/both.
It provides a Web based UI for the configuration of the machine and typically runs on port 10000.
It is perl based so even if apache is having issues, one can use Webmin to explore issues, etc..
It has a module for MySQL and for PHP.
It does make server administration less command line only and for systems that can't launch a GUI desktop (due to memory limits) may save countless hours learning the command line just to get started … ie, avoids the 'work to work' catch 22/snafu.

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

CentOS: (as root user in /root)
wget http://downloads.sourceforge.net/project/webadmin/webmin/1.620/webmin-1.620.tar.gz?r=http%3A%2F%2Fwww.webmin.com%2F&ts=1365719063&use_mirror=iweb
tar zxvf webmin-1.620.tar.gz
cd webmin-1.620
./setup.sh
You will be prompted for settings.  Most can be the defaults.
Only change to the setup recommended -  the log directory be /var/log/webmin

To access from another workstation: https://IP:10000
note: server firewall might need to allow port 10000 access

After logging onto Webmin, Webmin can configure itself for ssl.  Webmin can be updated within Webmin.

'spirit of sharing', Ken

In reply to Ken Task

Re: I really need Moodle dev online with Git (for dummies)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Wow......

Just one thing - and I'm not sure if you meant this - I would never suggest anybody (especially someone new to Linux) does 'sudo su' or logs in as root. If you are used to the comfy world of Windoze it can come as a nasty surprise that Unix/Linux systems will just do whatever you tell them without a second chance wink

In reply to Howard Miller

Re: I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Point taken ... never a good idea to access a server remotely using the root user credentials (ssh or no ssh).  But, sooner or later, first time admins will have to use sudo (Ubuntu) or (on CentOS) su to root on dedicated servers (ie, not shared).

That's one main difference in initial installation of Ubuntu and CentOS.  Ubuntu doesn't allow root login via ssh and sudo is in place.  On CentOS the only user one has after initial installation of the OS is the root user unless one created a second user.

On CentOS installations, one of the first orders of business is to create another account (in wheel group) and use that one to login remotely.  This is where webmin comes in handy.

However, sooner or later, even the first time admin must use top level access (sudo or su to root) to make changes necessary to get Moodle configured or for sure PHP/MySQL to taste:

[root@sos etc]# ls -l php.ini
-rw-r--r-- 1 root root 69300 Apr  5 21:15 php.ini

php.ini belongs to user root/group root so in order to change values one must sudo (Ubuntu) or su to root (CentOS) to edit.

[root@sos etc]# ls -l my.cnf
-rw-r--r-- 1 root root 1658 Mar  6 14:20 my.cnf

ditto.

Yeah, it's scary at first.  And the commands that do things recursively (-R) OR rm or mv files are to be considered ... *twice* ... before hitting the enter key!

While Webmin provides a forms based UI interface, one does need to know that whatever one does is just like being root from the command line.

Ok ... will get off the 'soap box' now. ;)

'spirit of sharing', Ken

In reply to Ken Task

Re: I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I think I'm a bit scared again nowblush All I want is this: last year on my Windows (yes Windows) laptop, I downloaded Wamp, made a database, typed some commands I found in the docs into Windows powershell and voilà - I got an easily updatable Moodle .  I just do "git pull" whenever and I get the latest version. I just want to do the same using hosting space  I have online so I can play on my Moodle anywhere. I'm worried it's over my head now!

In reply to Mary Cooch

Re: I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Sorry ... I might have misunderstood ... and thus shared too much information not related to your situation.   Do you have a remotely hosted provider who is allowing ssh (terminal login) to your account?

Installing WAMP/XAMP or other on a machine that you can touch/carry with you ... you probably have the Administrator login thus total access to everything ... including the installation of git so you could do the powershell git pull.  

There really is very little difference on a remotely hosted (not shared) linux server into which one can ssh from what you did on the Windows machine.

So, jump in!!!  Show no fear!!!!  We all being learning journey's a little un-sure of what we are really doing, but as time goes along and one acquires more experience, a comfort level is reached. smile

'spirit of sharing', Ken

In reply to Ken Task

Re: I really need Moodle dev online with Git (for dummies)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ken Task wrote:
> It is said the most important command in Linux is: man man

If no response, have http://en.wikipedia.org/wiki/Control-C handy and call aloud: yes sir!
smile
In reply to Visvanath Ratnaweera

Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Ok I am stuck already. I need step by step sad

  1.  I found a spare domain and space on my VPS
  2. I installed the database 
  3. I changed the dropdown to bin/bash as Howard said at the start
  4. I am confused about the IP address (there is one here visible and also two which say "dedicated" It's the same IP address as my other websites. 
  5. I am on a laptop with ubuntu
  6.  Howard said (quote) fire in the IP address of your host plus the username and password. This should get you to the VPS command line.
  7. Well  , assuming I wasn't going to break anything I pasted the numbers of that IP address into Terminal but it just said (according to how I typed it in) "no such file or directory" or "command not found" So I must be typing it in wrong.

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Oh -after much trial and error I think I'm in

I typed myusername@IPaddress and then was prompted for the password.

Now it says

-bash - 4.1$

So I'm going to google that one....

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You are - that's the 'bash prompt'. You may now type commands wink

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Now the frustration bit  - I tried sudo yum install git and it told me the username I was using wasn't in the sudoer 's file- so then I tried with my main admin name and password that I use to get onto the whole of the VPS as opposed to just this site within it -  and it said permission denied. This would probably be the bit where I paste  publicly  my full VPS server admin details  and password and ask for someone to take a look...except then I'd have to edit my own post to remove them for security reasons, so I won't bothertongueout

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Since I kinda jump in here and encouraged you to be fearless, then felt I should also continue to help (why should Howard have all the fun!  Besides, maybe Howard is taking a well deserved time out! ;)).

A little frustration is expect ... be calm! ;)  New learning sometimes means making little mistakes.  So ... keeping that in mind ...

You've not said what your operating system is ... we know linux, but is it ubuntu or centos or other.   Well here's one way to 'discover' ... typing in command that might error but is harmless.  And it might tell us if the account you setup for yourself to login is just that ... another user that does not have the level of access to change configuration, etc..

Here's the command:  whereis httpd

whereis finds things ... if you ever need to know a path to some executable .. whereis should know.

httpd is what the apache server is called on CentOS.

It's called apache2 on Ubuntu.

If that command responds with a path to httpd then you are running CentOS.  On a typically confgured CentOS server, it may look like the following (some stuff left out in the response below):

[root@sos ktask]# whereis httpd
httpd: /usr/sbin/httpd /usr/share/man/man8/httpd.8.gz

Signifcance ... you may not need to run sudo.  But, you do need to discover what the root password is and su to root.

Once you have the root password, type:

su [ENTER]

provide the root password (type it in, copy and paste can get characters not intended ... like a carriage return, etc.).

If that's the right password, your prompt might change showing you who you are ... ie, root.

Here's what su looks like:

[ktask@sos ~]$ su
Password:
[root@sos ktask]#

Note some things ... the user name I used to login is ktask and the command prompt symbol is a ]$

After su to root, the prompt now shows 'root' and the command prompt symbol has changed to a ]#.

If the whereis command above doesn't respond with an answer (shows you a path to httpd), then issue it again only using apache2.

whereis apache2

Conclusion ... it's Ubuntu

Since I'm unfamilar with exactly your hosting provider and how they set things up, am assuming it's like standalone Ubuntu.  The first user setup is normally (also) part of the group allowed to use sudo.

So, here's something to try.  Just type sudo [ENTER]

Are you prompted for a password?  Try your password.

If that fails then I'd suggest checking with the hosting provider to see if they provide tutorials or documentation on how they setup VPS systems - in particular, ssh access/sudo, etc.  Or, and this isn't disclosing too much, just tell us the hosting provider.  As you know, Google (or other search engine) discovers much.  I have found FAQ's, How-2's, Tutorials for many hosting providers using Google.

'spirit of sharing', Ken

In reply to Ken Task

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

She shaid it was Centos.... many hundreds of lines ago... smile

In reply to Howard Miller

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Ken. Yes, as Howard said, my VPS is Centos 6.2 (which you said was a bit old but it works fine nonetheless) I am on a laptop with ubuntu  but apparently that is irrelevant.

I can access my VPS as admin  just fine. I can acces the domain space on it with a particular user I set up for SSH just fine too. But when I try with the domain user it says it's not  in the sudoer files and when I try with the admin account for the whole VPS it doesn't accept it.

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Git may already be installed. Try typing one of the the commands

which git

or

git --version

If git is not already installed, then I am not sure if you hosting package will let you install it.

Mind you, http://www.tomvernon.co.uk/blog/2009/12/install-git-on-plesk/ (which I got from https://www.google.com/search?as_q=Parallels+Plesk+Panel+install+git ) seems to suggest yum install git should work.

In reply to Tim Hunt

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

This is what I got when I typed which git 

So then I type yum install git and I get "you need to be root to perform this command" However, I don't know which other username and passsword apart from my admin one for the whole VPS to use - and if that isn't root then I don't know what is. But that just gives me permission denied. I will maybe put a support ticket with the hosts. I have looked in all the settings of my VPS and I can't find anything else to help.

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Yes, think one will have to find out via provider.  The admin user of whatever panel provided may not be tied to the 'root' user and thus that's why ,when attempting to do things that require the highest level of user on the system from the command line, you get the 'you need to be root to perform this command'.  But that's good!  Just have to find out how to su to root ... that's all!

From what you've described as the goal, I can't think of any more efficient way to check out the lastest dev version.  Until Moodle provides a way to update Moodle from within Moodle, then git is almost required.

Apologize for sharing too much ... didn't see/know about having CentOS.  Had I seen/known that, I'd have restricted the posting to just CentOS.  But, anyone looking it over should be able to see there's not that much difference between Ubuntu/CentOS and that even an educator can do some of those 'thought to be guru-ish' things. 

Am sorry to have to say it that way ... 'even an educator'.  If any profession should push their knowledge to new limits ... including Linux command line ... it should be an 'educator'.  Yes, maybe command line is not one's preference, but one does what one must.  And, over the years, have found it nice to know there is more than one way to 'git 'er done!'!

So I encourage you to continue with this pursuit/journey (which, like Moodle, really is never ending).  When you do finally arrive at the point where you can easily and efficiently 'git' updates to the dev version, you will enjoy NOT having to do things the 'long way' and then get to learning/evaluating the lastest.

'spirit of sharing', Ken

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Mary

What do you really want to do: Run a Moodle site for your class on a CentOS Linux VPS you rented or learn the Linux command line?

In the first case, give the access codes for your VPS to one of the generous helpers here. I admire Ken's patience (and his "re-engineering" posts), but what he does here is to give you the multiple of two numbers every time you need it rather than you learning how to multiply _any_ two numbers. We all are teachers, aren't we?
;-(

In the second case start with the basics. Well, before we start a new discussion how and when to start Linux or the beauties of GUI verses the ugliy CLI, recap our discussion in the Lounge more than a year ago: https://moodle.org/mod/forum/discuss.php?d=193117.

What happened to your Windows 8 attempt: https://moodle.org/mod/forum/discuss.php?d=225807 BTW? What convinced you to make the dive to Linux: https://moodle.org/mod/forum/discuss.php?d=193117#p840869 ?
In reply to Visvanath Ratnaweera

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hello Visvanath and thanks for joining in. What do I really want to do?

  • Nothing to with classes -this is just for my own test purposes
  • I want a Moodle 2.5 development site that I can update weekly via Git.
  • I gave up, sadly , on the Windows 8 local host attempt because I just couldn't get it workng and I seemed to be wasting my time
  • I had an old Windows laptop and I thought it would be interesting to run ubuntu on it just as a learning experience, and Andrew Nicols kindly set this up for me. That's great.
  • I have succeeded in getting local host Moodle on this ubuntu laptop and that works fine - BUT - it only works on that particular laptop so is a bit restrictive.
  • Since I have a VPS I figured if I could do the same with some online space I could actually access a development Moodle (it will eventually be 2.6 once 2.5 is out) anywhere rather than just on one laptop. The QA site is fine except if you are using it on the hour you lose everything - and  so I want my own sandboxsmile
In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Mary

So it is the first one: "Run a Moodle site for your class on a CentOS Linux VPS you rented ..." except that there is no class, just you working on Moodle - testing it.

It makes sense. A test platform in the Internet is very practical. You can work in it from any client machine which is online. Much better than additional (own) hardware. Only virtualization can beat it, if you always work on one machine, say a powerful laptop. Then you don't even need to go online. But that is a completely different path.

In your case you don't need Linux system administration, nor CLI even at an intermediate level. Just the very basic usage of a few other (not Linux built-in) commands like "git pull", "mysql -u dbuser -p", bar viewing or editing a text file (real ones, not the fake ones here https://moodle.org/mod/forum/discuss.php?d=226174 ;) are sufficient.

If you are keen to start what you want within a reasonable time (2. June?), send the access details you got from your VPS vendor to a helper. Ask to set up Moodle 2.5dev with git and hand you the keys back, with basic instructions on how to take over the VPS. You should be all right from there.

I can offer to do it only in the coming week end. Ask Ken first, he is more in to the RedHat family (there is a whole series, CentOS is only one of them. See the full list in http://distrowatch.com/ lower third column "Page hit rankings" with intro page per distribution).
In reply to Visvanath Ratnaweera

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Visvanath and thanks again for your help. I have got somewhat further forward because, having contacted my VPS host it turns out they don't provide root SSH access to managed servers.  So there was never a way I was going to get root access  But he then said to explain what I wanted done via SSH and he would see what he could do. So -I'll keep you informed smile

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Mary

> I have got somewhat further forward because, having contacted my VPS host it turns out they don't provide root SSH access to managed servers ...

You call that _forward_? You must be an unconvinceable optimist!

Wait, did you say "managed servers"? The management part is know to be expensive. What you need is a cheap VPS, no plesks and other fantastics, just simple and trusted SSH (secure shell). The price range is 20 - 80 USD/month. (Now before the "cloud" trumpets start: You don't need it.)
In reply to Visvanath Ratnaweera

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I'm paying in that range at the momentsmile 

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

First ... don't host anything with them so can't speak with first hand experience, but ...

Have you checked into RackSpace?
Rackspace Cloud Servers

"No control panels or other software installed by default, Cloud Servers give you straight SSH/command line access to your Linux server environment just like you would have with your own dedicated server. If you choose to install a control panel, you certainly can, but we do not make this decision for you."

https://www.rackspace.com/blog/rackspace-cloud-servers-vs-vps-platforms/

http://www.rackspace.com/cloud/servers/pricing_a/

'spirit of sharing', Ken

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You could always compile git yourself: http://spf13.com/post/installing-git-on-a-shared-host

That way, you can install it into your area on the server without needing root access.

In reply to Tim Hunt

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Fortunately I didn't need to do thatsmile My host has installed git for me so now I just need to work out what to  type in next........

In reply to Mary Cooch

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

IF server is CentOS and the default web root is at /var/www/html/.

The var and www directories on a standalone CentOS server belong to root user.  So, even while it was nice (and probably unusual) of your provider to install git for you and even if you learn how to use git to install Moodle, the question still remains if you can create a directory (for Moodle) in the 'standard' spot for apache's document root /var/www/html/

Have they shared with you the root password?

Do you have access to a control panel of some sort that will allow setting up a web accessible directory?  (and then also ownership/permissions to that directory)

Without root level of access, can *only* create a moodle code site in areas where the shell user can write.

One more question: the ownerships/permissions on httpd.conf:

ls -l /etc/httpd/conf/httpd.conf

will show.

Reason I ask ... if one could read/write httpd.conf one could setup what apache calls "UserDir directories" and set one up for the ssh user you have setup.  Thus be able to use git and have total/complete access to all that is contained in the defined 'user' web directory.

If you want to test the git install, login as that user at at the prompt type the following - one line at a time (do NOT copy and paste them all!).  And if the first line doesn't work, neither will the others that follow.

Note: the 'moodle24' in the first line will create a directory by that name.  If you don't want 'moodle24' change that to whatever you like ... lower case letters - no hypens or special characters in the directory name as the directory could very well become part of the URL to access the site:

git clone git://git.moodle.org/moodle.git moodle24
cd moodle24
git branch -a
git branch --track MOODLE_24_STABLE origin/MOODLE_24_STABLE
git checkout MOODLE_24_STABLE

Then to check what has transpired and version number of Moodle:

fgrep release version.php [ENTER]

That should show:

$release  = '2.4.3+ (Build: 20130411)'; // Human-friendly version name

build date might be different.

'spirit of sharing', Ken

In reply to Ken Task

(Resolved) I really need Moodle dev online with Git (for dummies)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

OK I did it - 2.5 dev - with the help of Andrew Nicols  and my trusty two week old ubuntu terminalsmile Thanks to Ken and Howard and Tim and Visvanath for all gratefully received advice. Yes Ken -my host is very helpful and I was able to do the rest of the stuff once he had installed git.

In reply to Mary Cooch

Re: (Resolved) I really need Moodle dev online with Git (for dummies)

by Ken Task -
Picture of Particularly helpful Moodlers

Congrats!  Ok, just ignore my last reponse! ;)

'spirit of sharing', Ken

In reply to Mary Cooch

Re: (Resolved) I really need Moodle dev online with Git (for dummies)

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

After seeing all of the posts about your topic, I was wondering if you might be able to (remember and) share what you did that worked?

It's okay if you share this later, as in another chapter of a book. smile

 

In reply to Mary Cooch

Re: (Resolved) I really need Moodle dev online with Git (for dummies)

by Andrew Lyons -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

For reference, here's how we go things working. These are just a rough guide, and relate to Plesk:

  • Get a working copy of git (or ask someone to install it)
  • In the website settings, change the PHP application setting to use FastCGI.
    • Apache runs as the 'apache' user
    • FastCGI runs as your user
  • SSH to the server
    • You need to set this up - google for how to do this for your version of Plesk
    • Upon login, you'll be in /var/www/vhosts/<domain>
  • mkdir private/moodledata
  • cd into httpdocs (or httpsdocs if you want SSL)
  • Clone the repository:
    • If you want it in the root directory: git clone git://git.moodle.org/moodle.git . (yes - that dot is important. It means current directory)
    • If you want Moodle in a subdirectory, specify this instead of the . (git clone git://git.moodle.org/moodle.git foo)
  • Run your setup
    • During setup, you'll be asked for the path to your moodledata. You'll need to use /var/www/<domain>/private/moodledata (or whatever you called it). Moodle makes an effort to fill this in, but the directory it suggests isn't writeable by the web server so you need to use a different directory instead.

These instructions are only a rough guide and may not be 100% relevant to your version of Plesk.
I know it's possible to have Plesk running Moodle using Apache rather than FastCGI, but for a hosting solution I think it's probably easier if all of your data is owned by your own user. It also means that the new plugin installer in 2.5 will just work without any chmod/chown.

Enjoy,

Andrew

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: Help :: I ) I really need Moodle dev online with Git (for dummies)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
$ git clone https://github.com/git/git.git
would have been shorter.
smile

http://spf13.com/post/installing-git-on-a-shared-host is outdated. The archive in https://www.kernel.org/pub/software/scm/git/ date back to April 2005! I found git-1.8.2.1.tar.gz via https://code.google.com/p/git-core/ (wget https://git-core.googlecode.com/files/git-1.8.2.1.tar.gz). The remaining instructions work, provided that the system has gcc, make and a couple of other tools.