Step-by-step Install Guide for Ubuntu
来源:互联网 发布:晒自拍的软件 编辑:程序博客网 时间:2024/06/10 20:10
Step-by-step Install Guide for Ubuntu
From MoodleDocs
This page requires a review. Please do so and remove this template when finished.
Ubuntu experts, please could you review the comments in Talk:Step-by-step Install Guide for Ubuntu and update this page as necessary.
Contents
[hide]- 1 What you need to start
- 2 Directions
- 2.1 Install Ubuntu
- 2.2 Install MySQL (skip Postgresql)
- 2.3 Install Postgresql (skip MySQL)
- 2.4 Install Apache
- 2.5 Install other software
- 2.6 Install Moodle
- 2.7 Configure Moodle website
- 3 Other Resources
What you need to start
- Ubuntu 8.04 LTS server CD
- A test x86 desktop computer, keyboard, monitor, mouse, and firewalled internet connection.
- One hour of time. (seriously!)
Directions
Install Ubuntu
Start computer and boot from CD.
Select Install to hard drive.
Select your language, country, and keyboard layout (i.e. English, United States, American English)
Select manually configure and set an IP address (or autoconfig if you don't know).
Enter your servername (i.e. moodletest)
Select to manually edit the partition table. I’m doing my testing on a standard 40GB harddrive and will modify these sizes for production.
Select your timezone. (i.e. Central)
Set clock to Universal Time.
Enter Administrators full name. (i.e. Joe Smith)
Enter account name. (i.e. joesmith)
Enter a secure password. (‘abcde’ is not a good one!)
Let the computer restart.
Log in your account.
Edit the /etc/apt/sources.list file. Remove the #mark on lines 22 and 38 to enable access to the universe package sourceand universe security updates. You will need to re-enter your accountpassword when sudo asks for it.
sudo nano /etc/apt/sources.list
Now to get all the security updates.
sudo apt-get update
sudo apt-get dselect-upgrade
Normally you would just use sudo apt-get upgrade.
And reboot to run on the new kernel!
sudo reboot
Install MySQL (skip Postgresql)
At this point we'll need to log in again to the server and type:
sudo apt-get install mysql-server php5-mysql
Press Y to continue the install.
Replace the following string NewRootDatabasePassword with a secure password of your own choosing.
There is no space between the -p and the password on the second command.
mysqladmin -u root password NewRootDatabasePassword
mysqladmin -u root -h localhost password NewRootDatabasePassword -pNewRootDatabasePassword
We now need to create the Moodle database and Moodle user in MySQL.
The mysql command will prompt for your NewRootDatabasePassword (from above).Replace NewMoodleDatabasePassword with a secure password of your own choosing.
mysql -u root -p
> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
> GRANT ALL PRIVILEGES ON moodle.* TO moodleuser@localhost IDENTIFIED BY 'NewMoodleDatabasePassword';
> GRANT SELECT,LOCK TABLES on moodle.* TO moodlebackup@localhost IDENTIFIED BY 'MoodleBackupPassword';
> FLUSH PRIVILEGES;
> QUIT
The above also creates a backup user moodlebackup so that you can use mysqldump to make database backups without accident.
Install Postgresql (skip MySQL)
At this point we'll need to log in again to the server and type:
sudo apt-get install postgresql-8.1 php5-pgsql
Press Y to continue the install.
We now need to create the database user 'moodleuser'.
sudo -u postgres createuser -D -A -P moodleuser
Enter in a NewMoodleDatabasePassword here, then answer 'N' to the question.
We now need to create the database 'moodle' for the user 'moodleuser'. You'll need to enter the password that you just created.
sudo -u postgres createdb -E utf8 -O moodleuser moodle
Let's now secure the postgresql database with an admin password.
sudo -u postgres psql template1
# ALTER USER postgres WITH PASSWORD 'NewAdminDatabasePassword';
# /q
Edit the file '/etc/postgresql/8.1/main/pg_hba.conf' and on line 79 change the words ident sameuser to md5.
sudo nano /etc/postgresql/8.1/main/pg_hba.conf
Restart the database so everything is fine.
sudo /etc/init.d/postgresql-8.1 restart
Install Apache
The following mod-security, ldap, and odbc libraries are optional.
sudo apt-get install apache2 libapache2-mod-php5 php5-gd
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc
Restart Apache
sudo /etc/init.d/apache2 restart
Note: To install Moodle 2.0 for the current ubuntu, you need to install PHP from an external repository --Olli Savolainen 19:28, 10 April 2009 (UTC)
Install other software
On the command line, type:
sudo apt-get install openssh-server unattended-upgrades
sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es
sudo apt-get install curl php5-curl php5-xmlrpc
sudo apt-get install clamav-base clamav-freshclam clamav
Press Y to continue the install after each of these apt-get commands.
The clamav package will support virus checking on file uploads into Moodle. May have to run it again to configure properly.
Additional languages are available for aspell.
Install Moodle
On the command line, type:
cd /var/www
sudo wget http://download.moodle.org/stable19/moodle-latest-19.tgz
sudo tar -zxf moodle-latest-19.tgz
----
in ubuntu 8.04 it should be:
sudo tar zxf moodle-latest-19.tgz
----
sudo mkdir /var/moodledata
sudo chown -R www-data:www-data /var/moodledata
where www-data is whatever user/group was created automatically when apache was installed.
We now need to edit the location of the default web site. On lines five and ten, replace /var/www/ with /var/www/moodle/. Restart Apache. (See page comments for more details on this instruction.)
sudo nano /etc/apache2/sites-available/default
sudo /etc/init.d/apache2 restart
Configure Moodle website
ifconfig (look for your server’s ip address on the 2nd line).
On another computer open a web browser and put in your server address. Make sure your web browser is set to accept cookies.
Complete the Moodle install using a secure username and password.
Go to a bar for a few hours.
Come back and tell your boss that you FINALLY got the test server running.
- Step-by-step Install Guide for Ubuntu
- step by step 安装svn for ubuntu
- step-by-step guide for debugging native code,
- Building Android for Qemu: A Step-by-Step Guide
- MSYS Install: step by step
- Install Connector for Microsoft Dynamics AX step by step
- ubuntu use step by step
- A step-by-step guide for debugging native code (Sequoyah/ndk guide)
- How to Install the ELK Stack on AWS: A Step-By-Step Guide
- KDE 3.0 install STEP by STEP
- mvn install ---step by step 4
- Step by step Install SharePoint Workflow Manager
- Install Oracle on RHEL5 - step by step
- FreeSWITCH 1.2.5.3 Step by Step Install
- Rapid Portlet Development with WebSphere Portlet Factory: Step-by-Step Guide for Building Your Own P
- How to Read and Understand a Scientific Paper: A Step-by-Step Guide for Non-Scientists
- Running OpenBTS with the Nuand bladeRF on Ubuntu (The Definitive and Step by Step Guide)
- josso for tomcat配置 step by step
- 中国IT工作者35岁后的发展出路调查报告
- 多线程编程
- Perl编程几点注意
- 建立基于 JDBC 的 Tomcat 连接池
- VS2005发布网站时生成的DLL名称问题
- Step-by-step Install Guide for Ubuntu
- 在控制台程序中隐藏控制台窗口
- IE下使用js调用系统activex实现文件下载
- 金融危机下网络运维管理的变革之道
- FLEX AIR实践—FLEX AIR XML Encode Bug
- 关于csdn blog的 话
- 机遇与挑战并存 中国网络运维稳步前进
- drupal6中使用drupal_html_to_text方法过滤替换html超文本代码
- CPO是否可以成长为CIO?