Posts

Showing posts from March, 2015

Install GUI desktop enviornment in FreeBSD 10

HI i am going to tell you installation procedure for MATE desktop gui in freeBSD 10 # pkg install xf86-video-fbdev mate-desktop mate xorg # vim /etc/rc.conf Enter bellow lines to enable services during bootup moused_enable="YES" dbus_enable="YES" hald_enable="YES" Now install display manager slim # pkg install slim Again add this also to /etc/rc.conf file   at the end of file slim_enable="YES" Edit file # vim /root/.xinitrc exec mate-session Now just reboot the machine # reboot that it All set now!!

How to configure SFTP server in Linux

There are some scenario where system admin wants only few users should be  allowed to transfer files to Linux boxes not ssh . We can achieve this by setting up SFTP in chroot environment. Background of SFTP & chroot : SFTP stands for SSH File Transfer protocol or Secure File Transfer Protocol . SFTP provides file access, file transfer, and file management functionalities over any reliable data stream. When we configure SFTP in chroot environment , then only allowed users will be limited to their home directory , or we can say allowed users will be in jail like environment where they can’t even change their directory. In article we will configure Chroot SFTP in RHEL 6.X & CentOS 6.X. We have one user ‘Jack ’ , this users will be allowed to transfer files on linux box but no ssh access.   Step:1  Create a group [root@localhost ~]# groupadd  sftp_users   Step:2 Assign the secondary group(sftp_users) to the user. If the users doesn’t exist on

Growing LVM on RAID5

I feel to write this blog due to my requirement . Day to day requirement of data storage capacity growing . let assume i made 3 disk software RAID on my Centos6 box having 2Gb disk each( production may have huge size in TB sure) with LVM configured. Let say i have disks /dev/sda  -2GB /dev/sdb  -2GB /dev/sdc  -2GB I made a RAID5 named /dev/md0    ( see my other blog for how to create software RAID) I also made lvm with /dev/md0    /dev/mapper/raidvg-mylv   of 5 GB No i need to extend the size of my logical volume from 5 to 7 hence i need one 2 GB disk in my Raid. So the steps are as bellow:- # mdadm --manage /dev/md0 --add /dev/sdd mdadm:added /dev/sdd See the detail now for status of disk # mdadm --detail /dev/md0 You will see a line for newly added disk        0       8       16        0      active sync   /dev/sda        1       8       32        1      active sync   /dev/sdb        2       8       48        2      active sync   /dev/sdc               3

Software RAID on Centos 6

RAID devices are virtual devices created from two or more real block devices. Linux supports RAID1 and other levels. You need to have same size partition on both disks i.e. on second disk create partitions exactly the same size as those on the first disk, and set the type as fd (Linux raid autodetect). You need to use the following commands to create RAID5 I have disks : /dev/sdb /dev/sdc /dev/sdd #mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd RAID buliding will be start in background hence need to check the status to this give bellow command # watch cat /proc/mdstat When above shows as completed and there is no progress further You can see /dev/md0 is ready to use. you can create lvm with this or use simple block device # mkfs.ext4 /dev/md0 use bellow command to see status details of your configured RAID # mdadm --query --detail /dev/md0 bellow is the output of command [root@centos ~]# mdadm --query --detail /dev/md0 /de