29/04/2025, 10:14 172.16.34.57/some text file/Set up for Python ,Mysql Tomcat.
txt
*************************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)
172.16.34.57/some text file/Set up for Python ,Mysql Tomcat.txt 1/2
29/04/2025, 10:14 172.16.34.57/some text file/Set up for Python ,Mysql Tomcat.txt
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
172.16.34.57/some text file/Set up for Python ,Mysql Tomcat.txt 2/2