ผลต่างระหว่างรุ่นของ "ฐานความรู้"
Cardcaptor (คุย | มีส่วนร่วม) |
Cardcaptor (คุย | มีส่วนร่วม) |
||
แถว 30: | แถว 30: | ||
gem install haml --no-ri | gem install haml --no-ri | ||
− | ==== Checking out | + | ==== Checking out the Grader Web Interface ==== |
First, make a directory that will contain all the grader files. In my case, I make a directory called "grader" inside my home directory. | First, make a directory that will contain all the grader files. In my case, I make a directory called "grader" inside my home directory. | ||
mkdir ~/grader | mkdir ~/grader | ||
Inside the directory, you check out the web interface. | Inside the directory, you check out the web interface. | ||
svn co http://theory.cpe.ku.ac.th/grader/web/trunk ~/grader/web | svn co http://theory.cpe.ku.ac.th/grader/web/trunk ~/grader/web | ||
+ | ==== Install HAML inside the Grader ==== | ||
+ | haml --rails ~/grader/web | ||
+ | ==== Setting up the Database ==== | ||
Next, you set up the '''database.yml''' file. | Next, you set up the '''database.yml''' file. | ||
cd ~/grader/config | cd ~/grader/config | ||
cp database.yml.SAMPLE database.yml | cp database.yml.SAMPLE database.yml | ||
Edit '''<tt>database.yml</tt>''' so that it reflects the database setting of your machine. | Edit '''<tt>database.yml</tt>''' so that it reflects the database setting of your machine. |
รุ่นแก้ไขเมื่อ 09:40, 16 มีนาคม 2551
เนื้อหา
Apache2 on Ubuntu
Enabling User Directory
This is how to set up Apache2 on Ubuntu so that, when hxxp://server/~username is accessed, the browser returns the content in /home/username/public_html.
First, user directory is now a mod in Ubuntu's apache2. If you have not installed the mod, then execute the following command:
sudo a2enmod userdir
Second, edit /etc/apache2/apache2.conf and add the following lines:
<IfModule mod_userdir.c> UserDir public_html </IfModule> <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options Indexes SymLinksIfOwnerMatch IncludesNoExec </Directory>
Third, execute the following command:
cd /etc/apache2/mods-enabled sudo ln -s /etc/apache2/mods-available/userdir.conf userdir.conf sudo ln -s /etc/apache2/mods-available/userdir.load userdir.load
Forth, restart your apache2:
sudo /etc/init.d/apache2 restart
Grader
Checking Out the Grader from SVN Repository
Installing HAML
The grader makes use of HAML. So you need to install it first.
gem install haml --no-ri
Checking out the Grader Web Interface
First, make a directory that will contain all the grader files. In my case, I make a directory called "grader" inside my home directory.
mkdir ~/grader
Inside the directory, you check out the web interface.
svn co http://theory.cpe.ku.ac.th/grader/web/trunk ~/grader/web
Install HAML inside the Grader
haml --rails ~/grader/web
Setting up the Database
Next, you set up the database.yml file.
cd ~/grader/config cp database.yml.SAMPLE database.yml
Edit database.yml so that it reflects the database setting of your machine.