In
this manual replace the user name with the user name of your
system. Before reading further, ensure your system has LAMP(Linux,Apache, Mysql and PHP), and Django
installed.
1. Download TCC Software of automation from the
http://sarovar.org/frs/download.php /1327/TCC.tar.bz2
.Then, extract it and place the extracted folder in the home folder.
One thing that should be kept in mind is that the name of the folder
that was extract is same as the name used in the files contained by
the folder.
2. Run the following commands:
sudo apt-get install apache2 libapache2-mod-wsgi
(this command is to run the software on localhost)
sudo
apt-get install python-mysqldb
3. Open the extracted folder suppose the name of the
folder is TCC11_12. Open the TCC11_12 folder and make the changes in the apache
folder and settings.py
In apache folder there is a “django.wsgi” file which contains sys.path.append (‘/home/user name/’), in this give your system's user name.
In settings.py file,where there is a user name and password, give the user name and the password of your phpmyadmin. Also make following changes:
In apache folder there is a “django.wsgi” file which contains sys.path.append (‘/home/user name/’), in this give your system's user name.
In settings.py file,where there is a user name and password, give the user name and the password of your phpmyadmin. Also make following changes:
and
MEDIA_URL='http://192.168.2.178/media/' to MEDIA_URL='http://localhost/media/'
Give the path in TEMPLATE_DIRS = (“/home/username/“) in settings.py file of your templates of TCC application as:
TEMPLATE_DIRS=(“/home/USER_NAME/TCC11_12/templates”
replace the USER_NAME with the user name of your system.
Create a database of the same name as given in the settings.py file
4. Run the following command in terminal to go into the TCC project
cd TCC11_12
5. Then, go to phpmyadmin and in the above database from the tables created above we have to drop two tables: automation_teachers and automation_variables. The procedure to drop the tables is : Select the tables that are to be dropped and at the end there is “with selected” click on this and select “drop” and then at the end on the right side there is “go”, click on “go”.After click on “go”,your selected tables was dropped.
6.
Now, we have to import the dropped tables: automation_teachers and
automation_variable. And the procedure is : When you go to the
phpmyadmin and open the database of the TCC project, at the top,
click on the import.
Then,
in order to import the tables browse the “tcc11_12.sql” file.The
”tcc11_12.sql” file is given below and you have to first copy it
on the desktop first and then browse it in the import portion of the
phpmyadmin .Then, at the end there is “go”. Click on “go”.
7. Save following text in a file ( say /home/username/httpTCC.txt ). Change the path of media folder to your own path that you follow instead of the path given.(instead of toor give your own user name)
WSGIScriptAlias
/tcc11_12 /home/toor/TCC11_12/apache/django.wsgi
<Directory
/home/toor/TCC11_12/apache/>
Order
allow,deny
Allow
from all
</Directory>
Alias
/media/
/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/
<Directory
/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/>
Options
Indexes
Order
deny,allow
Allow
from all
</Directory>
8. Issue following command:
sudo
gedit /etc/apache2/httpd.conf
Copy
the contents of httpTCC.txt file into the opened file and save it.
9.
One most important thing that must be done is to copy the media file
and replace it on the media path i.e
/usr/local/lib/python2.6/dist-packages/django/contrib/admin/media.Given
link is the link of the media.tar.gz , compressed file of the media
file, you will have to first save, extract it and then copy it and
replace it on the above path of the media file.
http://202.164.53.122/~sandy/media.tar.gz
10. Give the permissions
755 to TCC11_12 folder (project) by using the following command:
sudo chmod 755 -R /home/username/TCC11_12
In the command written above give the path of your own TCC11_12 folder.
Then, at last final step is go into the browser and type - http:// localhost/tcc11_12/. (here, instead of tcc you will have to give the name of your project or folder ). This will open the TCC software in the browser.
When you installed the software completely if there is problem in opening the “credit and feedback” link in running software make the following changes in /home/toor/TCC11_12/contact/views.py:
from
TCC.contact.forms import *
to
from
TCC11_12.contact.forms import *
No comments:
Post a Comment