Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------SET A------------------------
- Q1
- 1. configure ftp server put gateway 1.1
- 2. put 1.1 in router peer IP
- 3. make user read read
- 4. make file in text editor and save as file.txt
- 5. cmd >> ftp 10.10.10.2 >> dir >> put file.txt
- 6. next pc >> get file.txt
- Q2.
- 1.sudo groupadd <groupname>
- 2. sudo usermod -aG <groupname> john
- 3. getent group <groupname>
- 4. su <username>
- 5. whoami
- Q3.
- 1. sudo yum install samba samba-common samba-client
- 2. net config workstation
- 3. sudo mv /etc/samba/smb.conf /etc/samba/smb.con.bak
- 4. sudo mkdir -p /srv/samba/shared
- sudo chmod -R 0755 /srv/samba/shared
- sudo chown -R nobody:nobody /srv/samba/shared
- sudo chcon -t samba_share_t /srv/samba/shared
- 5. sudo vim /etc/samba/smb.conf
- 6. sudo testparm
- 7. sudo firewall-cmd - -add-service=samba --zone=public - -permanent
- sudo firewall-cmd - -reload
- 8. sudo systemctl start smb
- sudo systemctl enable smb
- 9. sudo systemctl start nmb
- sudo systemctl enable nmb
- sudo systemctl status nmb
- 10. Press windows+R to open “Run” dialog in Windows
- Type \\ IP Address of CentOS and press enter
- 11. cd /srv/samba/shared
- -------------------------SET B------------------------
- Q1.
- 1. configure email server put gateway1.1
- 2.put 1.1 in router peer IP
- 3. make domain in email server "cisco.com"
- 4. PC >> email >> configure mail
- name : pc
- email : [email protected]
- mail server:172.16.32.2
- out: 172.16.32.2
- username: created username
- passwd: created passwd
- 5. send mail from one pc to another
- Q2.
- 1. Yum install httpd
- 2. sudo firewall-cmd --permanent --add-service=http
- 3. sudo firewall-cmd --permanent --add-service=https
- 4. sudo firewall-cmd –reload
- 5. sudo systemctl start httpd
- 6. sudo systemctl status httpd
- Q3.
- 1. sudo yum install bind bind-utils
- 2. sudo nano /etc/named.conf
- listen-on port 53 { 127.0.0.1; <Your IP address>; };
- allow-query { localhost; 192.168.107.0/24; };
- zone "prime.com" IN {
- type master;
- file "/var/named/prime.com.zone";
- allow-update{none;};
- };
- 3. sudo nano /var/named/prime.com.zone
- 4. sudo chown named:named /var/named/prime.com.zone
- sudo chown named:named /var/named/16.101.168.192.in-addr.arpa.zone
- sudo chmod 640 /var/named/prime.com.zone
- sudo chmod 640 /var/named/16.101.168.192.in-addr.arpa.zone
- 5. sudo systemctl enable named
- sudo systemctl start named
- 6. sudo firewall-cmd --permanent --add-service=dns
- sudo firewall-cmd –reload
- 7. nslookup <domain_name> (E.g. nslookup prime.com)
- -------------------------SET C------------------------
- Q2.
- 1. yum update
- 2.yum install wget
- 3. sudo wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
- 4. sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm
- 5. sudo yum install mysql-server
- 6. suo systemctl start mysqld
- 7. sudo systemctl status mysqld
- 8. sudo mysql_secure_installation
- 9. sudo grep 'password' /var/log/mysqld.log
- 10. mysql -u root -p
- 11. CREATE USER 'myuser'@'%' IDENTIFIED BY 'password';
- 12. GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'%';
- Q3. se
- 1. yum install telnet-server telnet
- 2. firewall-cmd --add-service=telnet --zone=public --permanent
- 3. systemctl start telnet.socket
- 4. systemctl enable telnet.socket
- 5. telnet google.com
Advertisement
Add Comment
Please, Sign In to add comment