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 www.webmin.com%2F&ts=1365719063&use_mirror=iweb" class="_blanktarget">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