0% found this document useful (0 votes)
11 views2 pages

Set Up For Python, Mysql Tomcat

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Set Up For Python, Mysql Tomcat

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

*************************Mysql**************************************

For installation Open Terminal (nmamit)

sudo apt-get install mysql-server ----> (while installation give username and
Password as u wish)

To Access open Terminal(student)

mysql -u username -p
enter ur password

then use ur database if there else create one i.e.,

create database Student;


use student;
create table stud(Usn varchar(),Name varchar());

********************PYTHON********************************************
Open Terminal (nmamit)

sudo apt-get install python3-pip ----->(if u get any lock error then type -->
sudo lsof /var/lib/dpkg/lock
note down the process id and kill it as-->
sudo kill -9 (processid)

sudo pip install pymysql


sudo pip3 install pymysql
python3 -m pip install pymysql

To Test Terminal (student)


python

import pymysql
import MySQLdb
exit()

python3
import pymysql
exit()

**************************Tomcat**************************************
In Terminal (nmamit)

sudo nano /etc/sudoers

Add this 2 line after --> root ALL=(ALL:ALL) ALL

student ALL= (ALL) NOPASSWD: /home/student/tomcat/bin/startup.sh


student ALL= (ALL) NOPASSWD: /home/student/tomcat/bin/shutdown.sh

(ctrl+o save ctrl+x exit)

After that edit bashrc file ( open terminal as student)

gedit .bashrc

add 2 lines at the bottom

export JAVA_HOME=/usr/lib/jvm/default-java
export CATALINA_HOME=/home/student/tomcat

Save and close open Terminal to Run

sudo $CATALINA_HOME/bin/startup.sh

after that open Browser and Type

localhost:8080

You might also like