Installation help

 
 
A day at work
Installing on Linux MInt (novice at linux and moodle)
 

I developed a site using the 1and1 one-click installation. I just found out from 1and1 that I will not be able to download or backup the mysql data. So after over a 100 hours of putting content on the site, I think I am going to install Moodle on a Home computer, get my course completed, and hopefull be able to upload that to a hosting company somewhere.

Than being said, is there a generic set of instructions for  installing on Linux or are they distro specific. I have a welding student who appears to be quite a master of the Linux Command Line however I would like to do this myself.

I am going to have to learn quite a bit about linux I would imagine to install on my hosting provider too but right now I just want to get back to building the site.

 

My old site course.weldingclassroom.org was version 1.9.9 I believe and and the latest version is what I should install.

Any help or links are appreciated.

Gerald Austin

weldingclassroom.org

 

 
Average of ratings: -
Picture of Rick Jerz
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Gerald,

Relative to this issue of backing up the mySQL database, the two ways that I have learned to do this is 1) via the command line using SSH, which is pretty easy once you know how, 2) via phpMyAdmin.  Are you sure that with 1and1 you do not have access to either of these methods?

If 1and1 does not allow this, you might consider switching hosting providers.

Your idea to install moodle on a local linux machine is fine, but you might I think that you will have to learn a lot about linux.  And what are you going to do when your student leaves you?

Well, with Moodle you have all kinds of choices.  smile

You will have to also consider whether now is a good time to upgrade to Moodle 2.3.3+ or later.

I think the docs for linux installs can be found at:
http://docs.moodle.org/19/en/Installing_Moodle

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers
Hi

I didn't know welding helps the command line!
smile

Since Linux Mint is Ubuntu-based my instructions should be valid: http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions. (Don't let the /22/ in the URL distract you. Those instructions are valid from 1.6 to 2.3. Perhaps even for 2.4 which is due tomorrow.)

The GUI, in Unix-speech the X Window System, is a burden for a server. You can proceed, however try to ignore it during the installation.

A fresh installation is only necessary if you are going to do a http://docs.moodle.org/19/en/Course_backup and then a http://docs.moodle.org/19/en/Course_restore. In that case, start with the latest 1.9, 1.9.19 right now.

The other alternative would be a http://docs.moodle.org/19/en/Site_backup and then a http://docs.moodle.org/19/en/Site_restore which is a http://docs.moodle.org/19/en/Moodle_migration. Then you transfer the Moodle to the new machine.

If you have many courses the latter is more elegant. I can't believe 1and1 doesn't allow that.
 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Welding helps almost EVERYTHING! big grin.

Thanks for the links. Looking at the documentation now.

 

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Haven't lost everything!  Surely 1and1 doesn't prevent one from making a backup of the courses.  Make course backups ... without users ... and download them to a local archive.  Those can be restored to either 1.9.highest or a 2.

As far as local install of Linux (pic your distro) ... there will be a learning curve and while not impossible, are you ready to tackle it (might need that students assistance ... is that a bad thing? [not!])?  Might ask other students (younger) if they to have some expertise on 'other' operating systems.  One might be pleasantly surprised!  One could also begin an 'Independent Study' program with such students - there's your future 'support' and 'local experts' as you yourself develop expertise!

Regardless of the distro chosen if one looks at the pieces that make up Moodle: Apache, MySQL, and PHP ... Apache and MySQL are 'faceless' ... ie, they do NOT have a GUI for configuring.  PHP is scripting.  So if one going after a distro of Linux for a reputation of their GUI desktop ... no advantage when it comes to AMP and Moodle specifically. 

The 'advantage' of a good GUI desktop has to do with installing/removing software and keeping it updated.  Whatever one does, don't look at a Linux box as if it were the same as Windows (which most folks have experience with).  If your Linux server serving Moodle is accessible by LAN or WAN or Internet, one needs to keep the operating system up to date ... as well as the Moodle code (hint: git).

Which ever distro you choose, find a good resource for learning the finer points of administering.  All distros have a site of some sort and there are tons of community sites one can use for references.

If you plan to install this once and forget it, then you might need to re-think.  Not sure that Linux Mint (really designed for desktop use - not server) has what is called 'long term support' ...

http://www.linuxmint.com/oldreleases.php

On the Ubuntu side of things it does offer a long term support server version.  Ubuntu 12.04.1 LTS for extended support.

http://www.ubuntu.com/download/server

So does CentOS (based upon RedHat Enterprise).

https://www.centos.org/

You are beginning a journey.  Paths chosen might change, but one of the great things about Moodle is that it's transportable (once one learns how to backup a site) to any platform that can run Apache, MySQL, and PHP - including MacOSX Server!

'spirit of sharing', Ken

 
Average of ratings:Useful (1)
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Thanks for the replies. I was able to backup. When I asked the 1and1 representative I was asking about backing up the mysql tables. After reading the manual a little, it looks like its all done by XML. So as was said  "Haven't lost everything!"

Just downloaded the backup .zip file. Installed Linux Mint and going to read up on the moodle install.

The student who I have that is very computer literate, often makes me feel like I may have the expression on my face that I often see when explaining some welding related topic to someone that missed the last 3 classes.

I have been using computers for years and missed out on linux though I loved DOS, GWbasic, and dbase programming. Now I have gotten lazy and don't spend enough time "reading the instructions".

Anyway, thanks

 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Thanks again everybody. I was able to download one of my courses from website, access my installation of moodle on my desktop (the one my student setup for me), and restore the course from another machine on my home network. Still have some other little issues but gonna post those in other forums.

Thanks to all for your help and words that made me realize it could be done. I was pretty bummed for the last couple of days.

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Before going further, strongly suggest checking out how to use git.  I hinted at that but, unfortunately, did not provide a link.  So here's the link:

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

Why?  Moodle 2 is a work in progress and one will want to get updated code and fixes to issues quickly and efficiently.  The way to do that is via git.

Check out the documentation for upgrading/updating your Moodle at http://docs.moodle.org/23/en/Upgrading#Standard_install_package

I actually use git with school moodle servers that have multiple (per campus) moodle sites.  With a script and git, updating is a matter of minutes as opposed to the 'long way' which took about 1 hour+ per site.

'spirit of sharing', Ken

 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Thanks Ken,

Still wrestling with getting Phpmyadmin working.

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

For phpmyadmin to work, mysqld (MySQL Server) has to be running.

Is mysqld running?

Check: from terminal as a user who can sudo or is root user:

ps aux |grep mysqld

ps is a command to show running processes ... aux are switches to the command

the | symbol is a pipe to run the output of ps aux through 'grep' showing only processes that pertain to the MySQL Server (mysqld).

Future note: things that end in 'd' could be daemons ... ie server apps.

You might see some line that looks similar to this (from CentOS server):

mysql     6951  0.2  1.7 627380 281048 ?       Sl   Oct09 162:36 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --open-files-limit=5000 --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock

That means it's running and if one studies that line it provides a wealth of information … log error, process ID file, etc.

For PHPMyAdmin ...
http://community.linuxmint.com/software/view/phpmyadmin

The button that says 'Install' points to: apt://phpmyadmin

But would imagine one could also download the .gz for PHPMyAdmin
http://www.phpmyadmin.net/home_page/index.php
Un-gunzip it, shorten the resulting folder name to something like 'phpmadmin' (mv "longtime" 'shortname'), move the resulting shortname folder into web root, change ownership/permissions on the folder and it's contents, then access with a web browser.
There are docs for PHPMyAdmin @:
http://www.phpmyadmin.net/home_page/docs.php

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Rick Jerz
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

If you are struggling with getting phpmyadmin working, you should definitely contact 1&1.  If you are struggling with understanding phpmyadmin, well, I guess you will have to continue learning.  Consider reading http://docs.moodle.org/23/en/Site_Backup_for_Low-tech_Users.  Or put "moodle backup phpmyadmin" into Google.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers
Hi Ken

> Before going further, strongly suggest checking out how to use git.

L, A, M, P, Moodle, possibly networking and now Git, all in one? I don't mean to underestimate Gerald, a DOS lover has a good chance of falling in love with Unix, still one thing at a time is definitely healthier.
wink

> Why? Moodle 2 is a work in progress and one will want to get updated code and fixes to issues quickly and efficiently.

Is it a polite way of saying the version shuffle is a mess?

> Check out the documentation for upgrading/updating your Moodle at http://docs.moodle.org/23/en/Upgrading#Standard_install_package

Upgrading to 2.x is a separate chapter. I would advice to get a 1.9 (his current or the latest) working clean and stable, master site backup and restore (with the 1.9).
Then start testing 2.x, if site upgrade, then on a copy.
 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

> one thing at a time is definitely healthier.

Maybe.  Wonder how many post there are in these forums that disclose the fact that sites are running in-secure versions (older)?  And why is that?  Maybe the method of updating (while not that difficult) is still 'long' and that's why many don't update.  That and the fact they are remotely hosted on a shared system without ssh access + their web tool doesn't quite do what needs to be done (which is not our case here). 

Bottom line: can't think of anything simplier than 'git pull' [ENTER].

What part of server administration would one leave out for a beginner?  Some things have a natural sequence ... can't access Apache unless networking is in order ... can't use PHPAdmin until MySQL is running (examples).

> Is it a polite way of saying the version shuffle is a mess?

Nope!  All open source apps have their quirks when it comes to versions/updates/upgrades, etc. ... check out Joomla sometime.

Well aware of the the docs for upgrading ... on same page they do have a Git for Administrators link.  Most of what one sees is commandline.  Hummmmm ... but there is the 'download' just to turn around an 'upload' thang.  Granted Moodle docs should focus on Moodle and try to provide information for the majority (whatever that is).  Still don't see some doc for 'experienced server admins' ... those persons might be pleasantly surprised of how easy it is to use 'wget' - that's server to server copy then.

The real bottom line ... what ever Gerald feels comfortable with.  But, may as well plant some seeds for and provide information for alternate ways of doing things.  They will eventually come in handy as one progresses.

'spirit of sharing', Ken

 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Thanks for the continued replies. I am definately struggling with the Mysql and PHPmyadmin. Moodle may be the easy part if I ever get there.  I have tried removing them both and reinstalling but have the same issues.

trying to run mysql results in

an error staring out with "Can't connect to local mysql server ...."

The PHPMYADMIN page at localhost just shows files within that directory.

Tried doing the installing Lamp-Server. Same results.

Question: When I remove something using "Software Manager" do I need to follow up with manually deleting anything. Files/Folders etc.

 

I really appreciate everyones help. I am kinda growing to like the command line. If for nothing other than speed. One of the only features I like better in autocad over the other cad program I use.

Have a good day

 

Gerald

 

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Let's start by disclosing (exactly) what version of Linux Mint you've downloaded and installed - a url to the page that leads to the download link would help.

On this page: http://www.linuxmint.com/oldreleases.php

I see that a version 13 is long term support and there are a few options for 32 bit or 64 bit as well as the GUI desktop included.

And, since you've mentioned going after the 'latest Moodle', check out the requirements for the lastest Moodle at: http://download.moodle.org/

Certain minimum PHP and MySQL versions are required for versions of Moodle (PHP 5.3.2, MySQL 5.1.33 for the most recent versions of Moodle).  Also, it might be important to install the 64 bit version of the operating system for better/faster MySQL performance (that assumes the hardware of the machine you've installed upon is capable).

Linux Mint has a community and in using Google found these:

http://community.linuxmint.com/tutorial/view/805

http://community.linuxmint.com/tutorial/view/486

Interesting to note that one of the users who commented said the GUI was no help when installing phpmyadmin. :|

Please note dates of postings and what version the postings concern.

As to the question concerning does one need to physically remove files when removing apps ... can only guess with Linux Mint.  In CentOS, when removing MySQL Server and related MySQL apps, it doesn't actually remove the databases (database files).

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers
Gerald

In addition to what Ken has requested, I would like to know exactly which instructions you follow. There are dozens: http://docs.moodle.org/en/Category:Installation (it'll jump to /24/, if yours is different, edit the URL to /19/, etc.)

Or whether you are migrating Moodle http://docs.moodle.org/en/Moodle_migration ? (same story with the version in the URL)
 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Linux mint 13 32 bit

PHPinfo says Core Version 5.3.10

Mysql Server Ver 5.5

As of yet I have NOT installed moodle succesfully. Thinking about sticking with 1.9.9 (whats on my 1and1 hosting service).

I have installed these using the software manager and using apt-get.

At one point I was able to login as root, create a test database from the mysql command line, and create a table. I did that AFTER installing MYSQL but BEFORE installing phpmyadmin. When I installed PHPmyadmin I only verified the Login Page showed up. After that I reviewed the instructions at one of the various sources and changed some permissions as instructed. But I am not sure what. May have installed moodle then , not sure.

Left things alone and tried logging in later to localhost/phpmyadmin and received errors. Don't remember what. Its all a blur smile

Sorry I didn't keep bettter track. I appreciate all the advice.

Since then I have went through the steps at http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions a few times thinking I may have missed something.

Now localhost/phpmyadmin just shows a list of files.

 

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

"Now localhost/phpmyadmin just shows a list of files"

Me thinks Apache doesn't know about php and that it can serve out .php scripts.

Might be missing library:

sudo apt-get libapache2-mod-php5

If Mint doesn't restart apache after installing the lib:

sudo /etc/init.d/apache2 restart

Then try phpmyadmin again ...

Actually, forgot to mention this ... might be a good idea to do:

sudo apt-get update [ENTER]

to get all updates since installation of Mint.

'spirit of sharing' ... and about to run out of ideas for a 'buntu' Linux! :\

Ken

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers
Hi Gerald

As the author of http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributionsI am interested to know where it went wrong. Let's go through it step-by-step:

- http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Install_the_system_software
'course you don't need that, you have the Mint 13 32 bit running and login to the console

- http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Configure_network
Now which network setup have you chosen?

- http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Update_the_system_software
Do "apt-get update" and "apt-get upgrade" run without errors?

- http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Install_Apache
"apt-get install apache2" runs without errors?

The doc says, "Once successfully completed the installation script starts the server daemon. Check it by calling the test page as described in the table below. You should get the "It works" page." Have you done that? Which check depends on the answer to the "Configure network" section.

Report back with that information and answers to the other questions in this post before we move on to the next section http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Install_MySQL.

P.S. Linuxers don't need to tamper with screen-shots like Windooze do. A Unix "screen-shot" is pure text, as explained here http://docs.moodle.org/22/en/Installing_Moodle_on_Debian_based_distributions#Typography_and_conventions. You cut-and-paste the text from the terminal in to the text area in the browser.
 
Average of ratings:Useful (1)
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Very well done!  Think I'll 'back out of this' now (but 'tag along' to learn).

Gerald ... your in good hands! ;)

Do have one idea/suggestion and it follows what 'Linuxers need' ... in the docs the commands are already in bold.  If the # (prompt symbols) weren't there a Linuxer could copy from page and paste to terminal.  The black background with green text such as below also helps those who are not very accurate with highlighting/copy. ;)

I've done similar in an old Moodle Administrators course only added color to it:

apt-get install mysql-server

Does MediaWiki not allow such?

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Documentation, the Unix way
Group Particularly helpful Moodlers
Hi Ken

I'm glad that you liked the "Unix way" of documentation! (Talking about the "learn" tag, a good number of my Moodle book marks are your posts.)

Though I don't believe in cut-and-paste in to the terminal (from other people's documentation) I am quite aware that many things can be improved in the formatting. But not in Moodle Docs, sorry. My short appearence there was a fiasco. I am not going to waste another single minute on Moodle Docs, other than maintaining that single page. If you are keen you can read the "Moodle documentation" forum, it's all there.
 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Hello Visvanath,

I decided to start from scratch and reinstalled Linux Mint and to be honest cannot truly remember all that I went through. I now have Apache, MySql, and PhpMyAdmin working.

I did install all the above with Apt-get install xxxx and have yet to run the updates. Worked a few long hours and haven't been back at this since my last post. Going to install moodle in a few minutes.

I may be back here to ask more questions but hopefully this will all work.

 

Gerald

 

 

 
Average of ratings: -
Picture of Ken Task
Re: Installing on Linux MInt (novice at linux and moodle)
Group Particularly helpful Moodlers

Since I've pointed you to a tutorial feel kinda responsible for stuff that's missing.

Your workstation needs to have a static IP address … not DHCP.
Don't randomly guess an IP on your entities network … get with the networking folks to acquire the static IP.
Guessing CAN wreck an entire network … or render it 'confused'.

Following the tutorial at:
http://community.linuxmint.com/tutorial/view/486
have installed Linux Mint 13 (Long term support) in a VirtualBox on a MacOSX laptop.

That how-2 wasn't specifically for Moodle, so the following are some notes made while installing Moodle
on Linux Mint 13 (which isn't a server version, but is long term support).

MySQL has to be installed first and mysqld running for phpmyadmin to work.
In the phpmyadmin Mint install it using MySQL and creates a database for phpmyadmin.

sudo apt-get install mysql-server

When installing MySQL you will be prompted for a user (root) and a password for MySQL.  Leave user as root and provide a password that you can remember.  It will be used later from the command line (mysql prompt below) to create a database for moodle.

In the URL above there is a part about phpmyadmin … adding a line to apache.conf.

[Tue Dec 04 10:30:29 2012] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

But, it works anyway.
And the GUI desktop does have a item in menus for phpmyadmin … just launches the browser and goes to http://localhost/phpmyadmin/


Would also recommend installing:
git: sudo apt-get install git
enables the installation of Moodle via git.

nmap: enables port scanning of your server
sudo apt-get install nmap

openssh (server): allows ssh connection from a workstation (putty Windows, or Terminal from a MacOSX workstation)

sudo apt-get install openssh-server

Might also install alpine … used for reading EMail on the server.
sudo apt-get install alpine

To access alpine from terminal: alpine

For higher versions of Moodle (2.3.3+ and above):
will need to acquire php5-curl (required), php5-xmlrpc and php5-intl

sudo apt-get install php5-curl
sudo apt-get install php5-xmlrpc
sudo apt-get install php5-intl

php5-curl is a stopper … if not installed, Moodle won't install.

for reference: apache2 uses www-data for user and group.  Important for ownerships of folders/files for Moodle.

Web root is in /var/www/
To get moodle running, the Moodle data directory (normally moodledata) has to be defined in apache2.conf.  Moodle will not install if moodledata is at the same level as the code directory.  Work around/fix:

Edit the 000-default file in /etc/apache2/sites-enabled/

ken@ken-VirtualBox /etc/apache2/sites-enabled $ cat 000-default
<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/moodledata>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from localhost
        deny from all
    </Directory>

sudo nano /etc/apache2/sites-enabled/000-default

Installing Moodle via git:
The MOODLE_19_STABLE stuff below could be replaced with any such found in
doing git branch -a
If your machine can handle it.  One could install MOODLE_23_STABLE … even the latest release MOODLE_24_STABLE

cd /var/www/
sudo git clone git://git.moodle.org/moodle.git moodle
cd moodle
git branch -a
sudo git branch --track MOODLE_19_STABLE origin/MOODLE_19_STABLE
sudo git checkout MOODLE_19_STABLE

chown www-data:www-data /var/www/moodle

mkdir /var/moodledata

chown www-data:www-data /var/moodledata

Create the database for Moodle:
mysql -u root -p [ENTER]
You will be prompted for the password

mysql> create database moodle character set utf8 collate utf8_general_ci;

\q
or quit to exit

Now try to hit your server by IP address/moodle from a workstation and see if you get the install routine.

'spirit of sharing' ... and by NO means a Mint/buntu-ese 'guru', Ken

 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Thanks for the instructions. As I said above, I have installed everything one at a time and also tried a lamp package and still no login from mysql. My problem isn't even Moodle yet so I hope I'm not to far off the intent of the forum.

I am going to try what you have listed above. If that doesn't work, reinstall linux or something. I'm sure its all the result of something I did incorrrectly as I looked at various sources online.

 


 
Average of ratings: -
A day at work
Re: Installing on Linux MInt (novice at linux and moodle)
 

Just a follow up,

I was able to get moodle installed on my home laptop using the command line. NUMEROUS trips were made back here and though I don't have 100% confidence in doing it again, I am thankful for all the help. I am still learning and having a resource such as this forum os great.

Have a good day

 

Gerald Austin

 
Average of ratings: -