Moodle + lamp + ubuntu

Source: Internet
Author: User
Moodle + lamp + ubuntu-Linux Enterprise Application-Linux server application information. The following is a detailed description. From: blog.sina.com.cn/gifttolisa

I have installed ubuntu for the greatest purpose is to install moodle. There are few references for installing moodle in Windows XP linux. After searching for half a day, I only saw a little bit of information. However, after my efforts, moodle was successfully installed! The following is my effort:

I. Installation of lamp
Linux + apache + mysql + php + phpadmin

(1) install apache and php5

At first, I did not check too much information, so I took it for granted.

Sudo apt-get install php5

Then apache2 and php5 are installed, and it works is written in index. php in/var/www!

Enter localhost in firefox.

This indicates that apache is successfully installed!

(2) mssql Installation

Sudo apt-get install mysql-server

The difficulty I encountered here is that there are many other types of statements on the Internet, so I won't say much here! At least this is in my line!

Default username: root

Password: set it as moodle.

(3) phpadmin Installation
Ask me what this is. I can only say that the biggest function is to manage the mysql database.

The general usage is localhost/phpmyadmin.

But the real problem is that phpmyadmin is not in the/var/www directory but under/usr/share/. How can this problem be solved?

Method 1: copy the phpmyadmin folder to www

Implementation:
Step 1: Find the/usr/share/phpmyadmin folder and copy it to home/taozheis2000 (your username)/phpmyadmin. Then we can use the following statements to do things:

$ Sudo mv phpmyadmin/var/www
$ Sudo chown-R www-data: www-data/var/www/phpmyadmin

The function of these two statements is to cut phpmyadmin under your home/taozheis2000 (your user name) to/var/www.

Additional knowledge: Of course, for folder transfer, you can cut and paste the folder with the mouse (the same as for windows), but you do not have the ubuntu permission here. I will explain this question: After you log on to ubuntu, you have the user permission, while the owner does not give you the permission, but you have worked hard to install ubuntu. If you do not have the owner permission, you do not have the permission to operate some folders with high security requirements. The only way is to use some special statements.

A) sudo-s directly jumps to the root permission, that is, the owner temporarily changes the permission.

B) sudo chmod 777/the permission to change a specific folder in the folder path seems permanent.

I think this is dangerous for security.

Therefore, we need to study other methods in the future to improve security. Of course, the method of moving phpmyadmin is still very good in moving folders or files.

Step 2: as a common sense player, you want phpmyadmin to be installed under/usr/share by default, but we want to use/var/www

Phpmyadmin, then there is a problem here: Can phpmyadmin find mysql?

I have not tried any settings here. I have made the following settings:

Configure phpmyadmin
Phpmyadmin is not installed under/var/www by default, but in/usr/share/phpmyadmin

You can copy phpmyadmin or someone on the internet says that you can create a link and copy the Link (not tried)

Then run the command in the terminal

Sudo gedit/etc/phpmyadmin/apache. conf

Then, change the path of the following two sentences to/var/www/phpmyadmin (because I have configured the environment, I forgot how to write the default configuration in phpmyadmin .. There are two sentences in the third and fourth rows. If I remember correctly, it should be as follows)

Alias/phpmyadmin/usr/share/phpmyadmin

Changed:

Alias/phpmyadmin/var/www/phpmyadmin

Install and configure the lamp server in ubuntu wiki. Open the browser and enter localhost/phpmyadmin. You can see it is absolutely good. Where is it? People who are not familiar with the database code can have a visual interface to manage database pulling!

Method 2: create a link between the www folder and the phpmyadmin folder.

I have never practiced this method, and I don't know if it's good. If it's feasible, it's good for us if it's so troublesome to set ubuntu permissions!

Wait for someone else to give advice

Ii. moodle Installation

You can finally install moodle! It's easy to download a new moodle compressed package on a website, in tgz format! Zip format is not available!

1. Extract it to/home/taozheis2000/moodle. Remember that the moodle folder is not a moodle folder, that is,/moodle.

2. $ sudo mv moodle/var/www

$ Sudo chown-R www-data: www-data/var/www/moodle

3. Enter localhost/moodle in ff (firefox). I am very excited when I see the installation interface, but don't worry. Many problems are coming soon!

4. Create a database under phpmyadmin

The name is moodle.

5. On the second interface of moodle, it creates many folders. What is it used?

The/var/moodledata folder is used to store user-uploaded objects. It is recommended that you do not create a folder in the same folder as the website, here is/var/www/moodle.

6. When I press backward, it always prompts that the folder cannot be created manually.

I guess it is a permission problem. I do not have the permission to modify the var folder. What should I do?

Sudo cd/var

Sudo mkdir moodledata

Sudo chmod 777/var/moodledata

Sudo chmod 777/var/www/moodle

In this way, both the moodledata and the moodle folder have the owner permission.

7. Back-monitoring installation environment: lack of gd

Therefore

Sudo apt-get install php5-gd this sentence may not work, specifically I forgot

Sudo/etc/init. d/apache2 restart apache

8. Return to the moodle screen and continue. Enter the database username, password, and database name.

Root

Moodle

Moodle

8. Finally, the system crashed and found that xmlrc and crl were missing.

Therefore

Sudo apt-get install crl

Sudo apt-get install xmlrc

9. A pleasant journey in the future

You can run moodle and find that the effect is not a big problem!

Operator: Common commands

1. Restart apache

Sudo/etc/init. d/apache2 restart

2. Restart mysql

Sudo/etc/init. d/mysql restart

[ This post was last edited by Growth MB]
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.