Technology

Configuring CUPS on Linux

CUPS Master Print Server Stop CUPS and back up your current CUPS configuration: # service cups stop # cp -a /etc/cups /etc/cups.saved Edit /etc/cups/cupsd.conf to allow other servers to connect to printers on the master server. First change: Listen localhost:631 to: Listen *:631 or Listen 0.0.0.0:631 This will configure CUPS to listen on all network interfaces. If you would like to limit CUPS to listening on a particular interface, enter the IP address of that interface instead of * or 0.0.0.0. For example: Listen 192.168.102.32:631 Add Allow @LOCAL to the bottom of the stanza so It looks like the following: <Location /> # Allow shared printing Order allow,deny Allow @LOCAL </Location> This will allow clients on the "local" network (the subnet on which the Master Print Server is located) to access CUPS on the Master Print Server. If you would like all clients to access the Master Print Server, then use "Allow all" instead of "Allow @Local". The following steps involve making changes to the CUPS configuration files. For RHEL 6 and earlier, the changes should be made to /etc/cups/cupsd.conf. For RHEL 7 and later, the changes should be made to /etc/cups/cups-browsed.conf. Remove or comment out the following line: BrowseRemoteProtocols  

LVM – from PV to mkfs using loop

Create PVs [root@xsng8934pap ~]# sfdisk -l |grep 486401 |sort sfdisk: start: (c,h,s) expected (0,0,2) found (0,0,1) Disk /dev/sdb: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdc: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdd: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sde: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdf: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdg: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdh: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdi: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdj: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdk: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdl: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdm: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdn: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdo: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdp: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdq: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdr: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sds: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdt: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdu: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdv: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdw: 486401 cylinders, 255 heads, 63 sectors/track Disk /dev/sdx: 486401 cylinders, 255 heads, 63 sectors/track  

Customize your VIM

Connecting via SSH to your serverBrowse to your user directory with the following command: cd ~ Create a .vimrc file with the following command: vi .vimrc Click i for insert mode.Type the following command below to enable syntax and give a specific colorscheme. This example uses the desert colorscheme:syntax on colorscheme desertHold Shift and hit : then type wq to save and quit the file.You should now be able to use vi and the colorscheme you choose to edit files on your Grid.FAQSCan I install my own colorscheme?Yes, first connect to your server via SSH and type the following: cd ~Next, you need to create a .vim/colors directory with the following command: mkdir .vim .vim/colorsNext, you can upload your own colorscheme into the colors folder you created. Finally, just follow the steps from earlier to set it as your default colorscheme. TIP: You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme.For more color schemes, you can browse this library on the vim website.You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.For more information about vi, please visit: Understanding basic  

Change the default directory for local and anonymous users on vsftp on CentOS 6 & 7

To change the default login directory for anonymous user(s): [root@phantom ~]# vim /etc/vsftpd/vsftpd.conf anon_root=/Path to directory To change the default login directory for local user(s): [root@phantom ~]# vim /etc/vsftpd/vsftpd.conf local_root=/Path to directory NOTE: Don't forget to set the SELinux context in case of enabled. [root@phantom ~]# setsebool -P allow_ftpd_anon_write on [root@phantom ~]# setsebool -P ftp_home_dir on You might need to restart the service for the changes to take effe [root@phantom ~]# systemctl restart vsftpd