tag:blogger.com,1999:blog-39634590471256888872024-02-06T22:12:02.212-08:00Configuretion Redhatthis site about redhat linux service configuration, how to configure ftp smtp httpd vsftpd samba BIND, NIS, VSFTPD, NFS, Send mail/ Postfix, File Server, DHCP, SAMBA, HTTP,DNS,FTP Server, YUM, Web Server.
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-3963459047125688887.post-76195358343723656332016-01-17T13:32:00.000-08:002016-01-28T09:44:59.890-08:00How To Configure Yum Server In REDHAT6<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
<div class="MsoNormal">
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18.0pt;">How To Configure Yum Server In REDHAT6</span><span style="font-family: "calibri light" , sans-serif; font-size: 18.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;">1. YellowDog Updater Modified (YUM)<o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;">2. Mount the rhel-6 dvd<br />
mount /dev/cdrom /mnt<o:p></o:p></span></div>
</div>
<div class="MsoNormal">
<span style="background: red; border: 1pt solid; font-family: "calibri light" , sans-serif; font-size: 18pt; padding: 0in;">GOTO</span><span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
3. cd /mnt/Packages<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: red; border: 1pt solid; font-family: "calibri light" , sans-serif; font-size: 18pt; padding: 0in;">NOW INSTALL</span><span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br /> 4. rpm -ivh vsftpd[TAB CLICK]<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> 5. service vsftpd start<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> 6. chkconfig vsftpd on<br /> 7. mkdir /var/ftp/pub/rhelrepo<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> 8. cp -av /mnt/Packages/* /var/ftp/pub/rhelrepo<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> 9. cp /mnt/repodata/*comps*.xml /var/ftp/pub/rhelrepo/comps.xml[optional] [
Need to create group repository]<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> GOTO<br />
10. cd /var/ftp/pub/rhelrepo<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
11. rpm -ivh deltarpm [TAB CLICK]<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
12. rpm -ivh python-deltarpm [TAB CLICK]<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
13. rpm -ivh createrepo [TAB CLICK]<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
14. createrepo -g /var/ftp/pub/rhelrepo/comps.xml /var/ftp/pub/rhelrepo<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: red; border: 1pt solid; font-family: "calibri light" , sans-serif; font-size: 18pt; padding: 0in;">CREATE A FILE</span><span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
15. vim /etc/yum.repos.d/server.repo<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><br />
[server]<br />
name=server repo<br />
baseurl=file:///var/ftp/pub/rhelrepo/<br />
gpgcheck=0<br />
enabled=1<br />
:wq<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: red; border: 1pt solid; font-family: "calibri light" , sans-serif; font-size: 18pt; padding: 0in;">NOW
MAKE SURE</span><span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> <br />
16. yum clean all [if you have local.repo then delete it first]<br />
17. yum makecache<br />
18. To check if the server is up and functioning<br />
yum info squid<br />
yum groupinfo "KDE
Desktop"<br />
19. chcon -R -t public_content_t /var/ftp/pub/rhelrepo<br />
20. service vsftpd restart<br />
<span style="background: red; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in;">Client Configuration</span><br />
<br />
1. mount /dev/cdrom /mnt<br />
2. cd /mnt/Packages/<br />
3. rpm -ivh ftp[TAB]<br />
4. vim /etc/yum.repos.d/yum.repo<br />
[server]<br />
name=server repo<br />
baseurl=ftp://192.168.122.43/pub/rhelrepo/
[assuming that the server ip is 192.168.122.43]<br />
gpgcheck00<br />
enabled=1<br />
:wq<br />
5. yum clean all [if you have local.repo then delete it first]<br />
6. yum makecache<br />
<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;">
<span style="background: red; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in;">Troubleshooting</span><br />
===============<br />
7. If you see any error saying "couldn't connect to host"<br />
then enable port 21 in the yum server<br />
<br />
iptables -I INPUT -p tcp --dport
21 -j ACCEPTservice<br />
service iptables save<br />
service iptables restart<br />
<br />
8. You should also enable the port 20<br />
iptables -I INPUT -p tcp --dport
20 -j ACCEPT<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;">9. If you can login successfully with the anonymous
user but cannot list (ls command) the ftp or pub directory and "no route
to host or entering passive mode is displayed" then<br />
#### remove the 2 lines from
/etc/sysconfig/iptables<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"> -A
FORWARD -j REJECT --reject-with icmp-host-prohibited<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;">
<span style="background: red;">REDHAT6 -USE THIS COMMAND TO MAKE A YUM SERVER</span><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 18pt;"><span style="background: red;">IF YOU HAVE ANY QUESTION PLZ CONTACT US</span></span></div>
<div class="MsoNormal">
<br /></div>
</h2>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0tag:blogger.com,1999:blog-3963459047125688887.post-53045052756264622082016-01-10T00:09:00.001-08:002016-01-28T09:38:06.228-08:00How to configure Autofs<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-tab-span" style="white-space: pre;"> </span>AUTOMOUNT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>=========<br />
Package name: autofs<br />
<br />
What is Autofs---<b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">Autofs</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;"> is a client-side service that automatically mounts the appropriate file system. The components that work together to accomplish automatic mounting are the following thats not parmanent mount when need its auto mount automatic</span><br />
<br />
1. Sometimes you might want to mount a share (nfs or smb) permanently.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>You can do it by adding the share details in the fstab file.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The problem is, if the target computer is not running then your computer would freeze at boot time. The reason is, your computer will try to mount all the filesystems mentioned in the fstab. Since the target computer is not running, your computer would fail to mount the nfs or smb share.<br />
<br />
2. To avoid this situation, we configure automount to mount the shares.<br />
3. Two files are needed to configure automount<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i. auto.master<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ii. auto.misc<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>both files reside in the /etc directory<br />
<br />
4. Let's assume we have a share on a server named server-1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The servers ip is 192.168.1.1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The share path is /share1<br />
<br />
5. We have a client machine named client-1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>The clients ip is 192.168.1.2<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>We will mount the share in the /ok directory<br />
<br />
6. We need to permanently mount the /share1 on client-1<br />
7. First open the auto.master file<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>vim /etc/auto.master<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/ok<span class="Apple-tab-span" style="white-space: pre;"> </span>/etc/auto.misc<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>:wq<br />
<br />
8. <span class="Apple-tab-span" style="white-space: pre;"> </span>vim /etc/auto.misc<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>share1<span class="Apple-tab-span" style="white-space: pre;"> </span>-fstype=nfs<span class="Apple-tab-span" style="white-space: pre;"> </span>192.168.1.1:/share1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>:wq<br />
<br />
9. service autofs restart<br />
<br />
10. ls /ok/share1<br />
<br />
11. you should see the shared files.<br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0tag:blogger.com,1999:blog-3963459047125688887.post-55760539923719163862016-01-09T00:36:00.002-08:002016-01-28T09:38:24.648-08:00How to configuring SAMBA In Redhat 6<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-tab-span" style="white-space: pre;"> </span>Samba Just Magic<br />
what is SAMBA<br />
<span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;">As the front page at </span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">samba</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;"><b>.</b>org says, "</span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">Samba</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;"><b> </b>is an Open Source/Free Software suite that provides seamless file and print services to</span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">SMB</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;">/CIFS clients." </span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">Samba</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;"> is freely available, unlike other </span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">SMB</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;">/CIFS implementations, and allows for interoperability between Linux/Unix</span><b style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 16px; line-height: 19.2px;">servers</b><span style="background-color: white; color: #222222; font-family: "arial" , sans-serif; font-size: 16px; line-height: 19.2px;"> and Windows-based clients.</span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>=====<br />
<br />
Section-1:<br />
Configuring smb client:<br />
1. You don't need to configure any client to use smb.<br />
2. smb-client package is installed by default.<br />
3. To view the shares of a machine type<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>smbclient -L ip-or-hostname -U username<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example: smbclient -L 192.168.100.254 -U student<br />
4. To mount a samba share<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>mount.cifs //target/sharename /mounting_directory -o user=username<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example: mount.cifs //192.168.100.254/share /mountsmb -o user=student<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[assuming that the target server is 192.168.100.254, the sharename is share, the mounting directory is /mountsmb and the user is student]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>enter the password for the user student<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ls /mountsmb<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>you should see the contents of the share in the /mountsmb directory.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Section-2: SAMBA Server<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Configuring samba share:<br />
1. Package name = samba4<br />
2. yum install samba4*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if you get any error<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>yum erase samba*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>then again yum install samba4*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[ if you cannot erase samba then type yum install samba-*]<br />
3. Configure firewall to allow smb traffic<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p tcp --dport 137 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p udp --dport 137 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p tcp --dport 138 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p udp --dport 138 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p tcp --dport 445 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p udp --dport 445 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p tcp --dport 139 -j ACCEPT<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iptables -I INPUT -p udp --dport 139 -j ACCEPT<br />
4. service iptables save<br />
5. service iptables restart<br />
6. create directories which you want to share or use existing directory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>here we are creating a directory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>mkdir /newshare<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>cd /newshare<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>touch file1 file2 file3<br />
7. create a user to access smb share or use existing user<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>here we are creating a new user<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>useradd smbuser<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>passwd smbuser<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>smbpasswd -a smbuser [ if you use existing user then only this command would be enough]<br />
8. vim /etc/samba/smb.conf<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>#find the line starts with "workgroup=mygroup"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>change the mygroup to WORKGROUP<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>#fine the line starts with "host allow="<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>remove the semicolon (;) and modify the line to add the networks you want to give <span class="Apple-tab-span" style="white-space: pre;"> </span>access to<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>#Now go to the last line of the file and insert a new line<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>[sharename]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>comment = any comment<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>path = /path-of-the-share-directory<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>browseable = yes<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>writable = yes<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>printable = yes<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>valid users = username<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>### and many more options which you have to learn on you own interest###<br />
9. For every share you have to cofigure this file again and again<br />
10. service smb start<br />
11. chkconfig smb on<br />
12. service nmb start<br />
13. chkconfig nmb on<br />
14. service winbind start<br />
15. chkconfig winbind on<br />
16. To check the share<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>smbclient -L ip -U username<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>type the password of the user and you should see the shares.<br />
17. Now go to another machine and follow section-1<br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0tag:blogger.com,1999:blog-3963459047125688887.post-13670231488009366472016-01-07T22:30:00.003-08:002016-01-28T09:38:50.888-08:00about LVM<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
about LVM</h2>
<div>
what is lvm:----<span style="background-color: white; color: #222222; font-size: 14pt; line-height: 107%;">Lvm mean
logical volume manager</span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l0 level1 lfo1; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;">u<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;">Logical Volume Manager (LVM) is a
device mapper target that provides a more flexible way to manage disk space
than physical disk partition<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;"> Why we use lvm<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l1 level1 lfo2; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;">u<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;">Some of your partition filled up
you want to expand it<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l1 level1 lfo2; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;">u<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;">You want to shirnk your partition<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l1 level1 lfo2; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;">u<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;">Add one or more disk/device<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in; mso-list: l1 level1 lfo2; tab-stops: list .5in; text-indent: -.25in;">
<!--[if !supportLists]--><span style="color: #222222; font-family: "wingdings 3"; font-size: 14.0pt; line-height: 107%;">u<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span><!--[endif]--><span style="background: white; color: #222222; font-size: 14.0pt; line-height: 107%;">You want to take backup of your
file system/partition while you are still using it<o:p></o:p></span></div>
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
lvm configuration------------------<br />
<br />
<br />
<br />
create lvm---<br />
<br />
<br />
1. Let's assume we have three new hard drives /dev/sda, /dev/sdb, /dev/sdc<br />
2. First we need to create the physical volumes<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>pvcreate /dev/sda /dev/sdb [ /dev/sdc is left to extend the physical volume later]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>pvdisplay<br />
3. Now we need to create the logical volume group<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>vgcreate name-of-the-group /dev/sda /dev/sdb<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example: vgcreate vg1 /dev/sda /dev/sdb<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>vgdisplay<br />
4. lvcreate -n lv1 -L 1G vg1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>lvdisplay<br />
5. mkfs.ext4 /dev/vg1/lv1<br />
6. mkdir /lvolume1 [to mount the logical volume lv1 create a directory]<br />
7. vim /etc/fstab<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/dev/vg1/lv1<span class="Apple-tab-span" style="white-space: pre;"> </span>/lvolume1<span class="Apple-tab-span" style="white-space: pre;"> </span>ext4<span class="Apple-tab-span" style="white-space: pre;"> </span>defaults <span class="Apple-tab-span" style="white-space: pre;"> </span>0 0<br />
or<span class="Apple-tab-span" style="white-space: pre;"> </span>/dev/mapper/vg1-lv1<span class="Apple-tab-span" style="white-space: pre;"> </span>/lvolume1<span class="Apple-tab-span" style="white-space: pre;"> </span>ext4<span class="Apple-tab-span" style="white-space: pre;"> </span>defaults<span class="Apple-tab-span" style="white-space: pre;"> </span>0 0<br />
8. mount -a<br />
9. reboot<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Extend LVM<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>==========<br />
<br />
Situations of extending LVM<br />
<br />
a. The logical volume is out of space => Extend the logical volume.<br />
b. The logical volume and the volume group both are out of space => Extend the volume group by adding new physical volume.<br />
<br />
<br />
1. To extend volume group<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i. <span class="Apple-tab-span" style="white-space: pre;"> </span>Add a new hard drive or create a new partition<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ii. <span class="Apple-tab-span" style="white-space: pre;"> </span>pvcreate /dev/sdc <span class="Apple-tab-span" style="white-space: pre;"> </span>[ assuming your new drive is sdc]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iii.<span class="Apple-tab-span" style="white-space: pre;"> </span>pvscan or pvdisplay<span class="Apple-tab-span" style="white-space: pre;"> </span>[ optional]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iv.<span class="Apple-tab-span" style="white-space: pre;"> </span>vgextend volume-group-name /dev/sdc<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Example: vgextend vg1 /dev/sdc<span class="Apple-tab-span" style="white-space: pre;"> </span>[ assuming your volume group is vg1 and <span class="Apple-tab-span" style="white-space: pre;"> </span>partition is sdc]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>v.<span class="Apple-tab-span" style="white-space: pre;"> </span>vgscan<br />
2. To extend logical volume [ umount /lvolume1 (assuming that you have mounted the logical <span class="Apple-tab-span" style="white-space: pre;"> </span>volume at /lvolume1)]<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>i.<span class="Apple-tab-span" style="white-space: pre;"> </span>lvextend -L +1G /dev/vg1/lv1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>ii.<span class="Apple-tab-span" style="white-space: pre;"> </span>resize2fs -p /dev/vg1/lv1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>iii.<span class="Apple-tab-span" style="white-space: pre;"> </span>mount -a<br />
<br />
<br />
<br />
<br />
<a href="https://www.youtube.com/watch?v=1StGzqQcEEo" target="_blank">https://www.youtube.com/watch?v=1StGzqQcEEo</a><br />
<div>
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0tag:blogger.com,1999:blog-3963459047125688887.post-80206033688751439532016-01-07T22:23:00.000-08:002016-01-28T09:39:24.374-08:00SSH - Secure Shell <div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
<b style="background-color: transparent; line-height: 19.32px;"><span style="line-height: 19.32px;">SSH - Secure Shell</span></b><span style="line-height: 19.32px;"> </span></div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
<span style="line-height: 19.32px;">SSH - Secure Shell</span></div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
------------------------<br />
Port no: 22 (default)<br />
Package: openssh-server<br />
Daemon: sshd<span class="text_exposed_show" style="display: inline;"><br />configuration file: /etc/ssh/sshd_config</span></div>
<div class="text_exposed_show" style="background-color: white; color: #141823; display: inline; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px;">
<div style="margin-bottom: 6px;">
Step by step configuration:<br />
==========================</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Step 01: RPM Query, install<br />
---------------------------------<br />
[root@serverX ~]# rpm -qa | grep openssh-server<br />
openssh-server-6.4p1-8.el7.x86_64</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# yum install openssh* -y [if not found]</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# systemctl restart sshd.service<br />
[root@serverX ~]# systemctl enable sshd.service</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# systemctl stop firewalld.service<br />
[root@serverX ~]# systemctl disable firewalld.service<br />
[root@serverX ~]# setenforce 0 ;SELinux off</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
SSH Client:<br />
-----------<br />
=> Linux Client (defautl installed)<br />
=> Windows Client (putty, ssh client)<br />
> putty > ssh > ip > port (22)</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Testing:<br />
--------<br />
> ping 192.168.11.Y (ssh server)</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
SSH Login with Root User<br />
---------------------------------<br />
[root@desktopX ~]# ssh root@192.168.11.Y</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Are you sure you want to continue connecting (yes/no)? yes<br />
root@192.168.11.Y's password: ******</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# who<br />
[root@serverX ~]# useradd student<br />
[root@serverX ~]# passwd student<br />
: 123<br />
: 123</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# exit</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Linux with Specific user name:<br />
----------------------------<br />
[root@desktopX ~]# ssh student@192.168.11.Y</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[student@serverX~]$ su -<br />
: ********</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# who</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Secure Copy (scp) from Desktop:<br />
-------------------------------<br />
[root@desktopX ~]# scp root@192.168.11.X:/etc/passwd /root/Desktop</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Password Less ssh login:<br />
------------------------<br />
[root@desktopX ~]# ssh-keygen<br />
[root@desktopX ~]# ls -l /root/.ssh<br />
[root@desktopX ~]# ssh-copy-id 192.168.11.X<br />
[root@desktopX ~]# ssh 192.68.11.X</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Change Default Port:<br />
-------------------<br />
[root@serverX ~]# vim /etc/ssh/sshd_config<br />
:set nu</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
17 <a class="_58cn" data-ft="{"tn":"*N","type":104}" href="https://www.facebook.com/hashtag/port?source=feed_text&story_id=1620466808229564" style="color: #3b5998; cursor: pointer; text-decoration: none;"><span aria-label="hashtag" class="_58cl" style="color: #627aad;">#</span><span class="_58cm">Port</span></a> 22 ; old<br />
17 Port 2015 ; new</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# systemctl restart sshd.service</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Verify curren SSH port:<br />
-----------------------<br />
[root@serverX ~]# netstat -ntlp | grep ssh</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
SSH Server Login with Specif Port:<br />
---------------------------------<br />
[root@desktopX ~]# ssh -p 2015 student@192.168.11.Y ; if student user</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Secure Copy (scp) with port:<br />
----------------------------<br />
[root@desktopX ~]# scp -r -P 2015 root@192.168.11.Y:/etc/ /root/Desktop ; if root user</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
* here "-r" for directory copy</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Secure copy (scp) to Remote server:<br />
-----------------------------------<br />
[root@desktopX ~]# scp -r -P 2015 /etc/shadow 192.168.11.X:/root/</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Disabled Root Login:<br />
--------------------<br />
[root@serverX ~]# vim /etc/ssh/sshd_config<br />
:set nu</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
48 <a class="_58cn" data-ft="{"tn":"*N","type":104}" href="https://www.facebook.com/hashtag/permitrootlogin?source=feed_text&story_id=1620466808229564" style="color: #3b5998; cursor: pointer; text-decoration: none;"><span aria-label="hashtag" class="_58cl" style="color: #627aad;">#</span><span class="_58cm">PermitRootLogin</span></a> yes ;old<br />
48 PermitRootLogin no ;new</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@serverX ~]# systemctl restart sshd.service</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
Test:<br />
----</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@desktopX ~]# ssh -p 2015 root@192.168.11.Y</div>
<div style="margin-bottom: 6px; margin-top: 6px;">
[root@desktopX ~]# ssh -p 2015 student@192.168.11.Y</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0tag:blogger.com,1999:blog-3963459047125688887.post-7469123061094560042016-01-01T22:27:00.002-08:002016-01-28T09:39:46.622-08:00লিনাক্স পরিচিতি<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px; margin-top: 6px;">
<i><span style="line-height: 19.32px;">লিনাক্স পরিচিতি</span></i></div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px; margin-top: 6px;">
<br /></div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px; margin-top: 6px;">
<br />
<br />
<br />
লিনাক্স হচ্ছে মূলত একটি কার্নেল, একটি কম্পিউটারকে সচল করার জন্য নুন্যতম এবং আবশ্যিক জিনিস। কার্নেল হচ্ছে একটা কম্পিউটার প্রোগ্রাম যা আপনার কম্পিউটারের বিভিন্ন সফটওয়্যারের ইনপুট ও আউটপুট রিকোয়েস্টকে পরিচালনা করে এবং সিপিইউতে সেটার ডেটা প্রসেস করার জন্য অনুবাদও করে দেয়। অর্থাৎ আপনার কমান্ডগুলো কার্নেলের মধ্য দিয়ে অনুবাদ হয়ে সিপিইউতে যাচ্ছে আবার প্রসেস শেষে আপনার কাঙ্খিত জবাব নিয়ে আপনার মনিটর অথবা অন্য কোনো আউটপুট ডিভাইসে তার আউটপুট দিচ্ছে।</div>
<div style="background-color: white; color: #141823; display: inline; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-top: 6px;">
কার্নেলের সাথে আরো সফটওয়্যার, প্যাকেজ ইত্যাদি মিলে তৈরী হয় একটি অপারেটিং সিস্টেম। তা উইন্ডোজ, লিনাক্স, ওএস এক্স যাই হোক!</div>
<div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
নতুনদের জন্য লিনাক্স নিয়ে কিছু কথা</div>
<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px; margin-top: 6px;">
লিনাক্স! এক অজানা ( যদিও বর্তমানে অনেক বেশী পরিচিতর মধ্যেও পড়ে 😛 ) অদ্ভুত এক নাম! বেশ কিছু মানুষের কাছে এটা একটা ভীতিকর জিনিস, আবার কিছু মানুষের মানুষের কৌতুহলের উদ্রেক ঘটায় এই জিনিস।<br />
বাংলাদেশে বর্তমানে কম্পিউটার ব্যবহারকারী অনেক রয়েছে, কিন্তু তাদের বেশীরভাগই অনেকটা অজ্ঞ; আমি নিজেও বিজ্ঞ নই। লিনাক্স ব্যবহারকারীর সংখ্যা বাংলাদেশে তুলনামূলকভাবে বেশ বেড়েছে কিন্তু এখনো অনেক মানুষ আছে যারা জানেনই না উইন্ডোজ ছাড়া কম্পিউটার চালানো যায়। তাদের মধ্যে<span class="text_exposed_show" style="display: inline;">যারা একটু টিপে টিপে মনে করেন বেশী অভিজ্ঞতা অর্জন করে ফেলেছেন তারা কারো কম্পিউটারে লিনাক্স দেখলে জিজ্ঞেস করে বসেন এটা কোন উইন্ডোজ(!) :roll: । আবার অনেকের হালকা পাতলা ধারণা রয়েছে তারা মনে করেন লিনাক্স ক্ষতিকর কোনো কিছু অথবা এটা সার্ভার বা উঁচু স্তরের প্রোগ্রামিং অথবা হ্যাকিংয়ের জন্য ব্যবহৃত হয়!<br />আবার কিছু মানুষ অনেক কৌতুহল নিয়ে ঘাঁটাঘাঁটি করে কিন্তু তেমন সুযোগ না থাকায় ভালোভাবে জানা হয় না। এই লেখায় লিনাক্স নিয়ে সচরাচর কিছু প্রশ্নের উত্তর দেয়া হবে।</span></div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/09193839981609037108noreply@blogger.com0