You are on page 1of 3

create database lab05;

create table Emp11(


EmployeeNo int primary key,
EmployeeName varchar(50),
Job varchar(50),
MGR int,
HireDate date,
Sal int,
Comm int,
DeptNo int foreign key references Dept12(DeptNo)
);
create table Dept12(
DeptNo int primary key,
Dname varchar(50),
Loc varchar(50),
);

insert into Emp11( EmployeeNo,EmployeeName,Job,MGR,HireDate,Sal,Comm,DeptNo)


values(7839,'afzaal','clerk',null,'2019/10/24',3000,null,10),
(7698,'blake','manager',7839,'2019/10/25',2850,null,30),
(7709,'clark','manager',7839,'2019/11/25',2450,null,10),
(7622,'ben','manager',7009,'2019/10/21',6750,null,20),
(7688,'jim','manager',7569,'2019/10/22',3000,null,20),
(7677,'steve','analyist',7349,'2019/10/23',2350,null,20),
(7678,'obama','clerk',7849,'2019/10/24',1250,null,20),
(7656,'trump','salesman',7839,'2019/10/25',1650,300,20),
(7634,'bilal','salesman',7829,'2019/10/26',1250,500,30),
(7612,'bazeed','salesman',7819,'2019/10/2',1210,250,100);

insert into Dept12(DeptNo,Dname,Loc)


values(10,'Accounting','New York'),
(20,'Research','Dallas'),
(30,'Sales','Chicago'),
(40,'Operations','Boston');

select Emp11.EmployeeName , Dept12.Loc


from Emp11, Dept12
where EmployeeName = 'afzaal' and Emp11.DeptNo = Dept12.DeptNo;
devian
slackware
redhat

linux partition

swap
slash

linux command
pwd to check the file
man pwd
ls for contents
ls download to check files

cd ..
clear to clear screen
mkdir to create folder
cd + file and folder

gedit to crete file

file viewer
gedit
more + file name

copy paste and cut

mv: to move file from source to destination

move file from folder to desktop


mv destination to /admin/Desktop

copy: cp +file name and then y for yes and to rename

hostname is used to check the hostname

gedit /etc/sysconfig/network to change the hostname

ifconfig: is used to check the ip address

eth2:

inet addr:10.0.15
netmask: 255.255.255.0

setup command is used to fix the ip address

service network restart command is used to check the status of the network

init 0 : is used to shut down


Import Red Hat Linux from D:
Others -> root -> admin12345

Lab Topic:
Configuring FTP(File Transfer Protocol) Server

What is FTP Server?

What is the service of FTP server?

Configuration Steps for FTP Server

1. Install package(software) of FTP Server


(a) Connect RedHat CD image
(b) Go to folder Packages with that command (cd/media/Red_ _/Packages)
(c) Install "vsftpd"

2. Start it's Service

3. Stop two Linux firewalls


iptables --> stop rules
SELinux (Security Enhanced Linux) --> disable

4. Restart
5. Open browser and confirm FTP
ftp://localhost
Pub folder (public)

6. Create a folder in FTP server location

root--> admin12345
rpm -qa vsftpd
pwd
cd /
pwd
ls
cd media
ls

ls
cd Packages

pwd
Packages
rpm -ivh vs now press tab
press enter

rpm -qa vsftpd


service vsftpd start

cd /var/ftp/pub/
pwd
mkdir abc

iptables -L

iptables -F
iptables -L

service iptables stop^c

chkconfig iptables off


chkconfig vsftpd on

gedit /etc/sysconfig/selinux
write disabled in place on enforcing and then save

rm -rf /etc/sysconfig/iptables

init 6
disable cd before restart

You might also like