Posts

Showing posts with the label ftp

Linux Tricks

Here are some of the tricks, i'll keep it updating as i'll get something new. Cheers :) 1 . use "ftp 0" or "ssh 0" command instead of typing "ftp 0.0.0.0" or "ssh localhost" or "ftp localhost" for quickly testing newly configured ftpd or sshd service. 2 . See memory and rss usage on your system: #watch ps -A --sort -rss -o pid,comm,pmem,rss 3 . Sample random password generator (put in your ~/.bashrc): genpasswd ( ) { local l= $1 [ "$l" == "" ] && l= 20 tr - dc A-Za-z0-9_ < /dev/urandom | head -c $ { l } | xargs } Run it: genpasswd 16 Output: uw8CnDVMwC6vOKgW 4. You can configure any Linux system to automatically log users out after a period of inactivity. Simply login as the root user and create a file called /etc/profile.d/autologout.sh, # vi /etc/profile.d/autologout.sh Append the following code: TMOUT= 300 readonly TMOUT export T...

How to add remote FTP / HTTP repository to RHEL or CentOS 6/7

To do it, first you need to collect below two details; FTP / HTTP YUM server IP i.e. "10.0.0.1" Packages location on remote YUM server i.e. "/rhel6_64repo/Packages/" Then create a repo file " rhel6_ftp_remote " in "/etc/yum.repos.d/" folder with below content; [rhel6_ftp_remote] name=Remote FTP Repository for RHEL6 $releasever – $basearch baseurl= ftp ://10.0.0.1/rhel6_64repo/Packages/ enabled=1 gpgcheck=0 If you want to add HTTP repo link, then replace "ftp" with "http". [rhel6_http_remote] name=Remote HTTP Repository for RHEL6 $releasever – $basearch baseurl= http ://10.0.0.1/rhel6_64repo/Packages/ enabled=1 gpgcheck=0 To add Local repo, read this article .

How to create and add a Local YUM Repository on RHEL or CentOS 7

How to setup local yum repository on RHEL or CentOS 7?  This tutorial describes how to setup a local Yum repository on CentOS or RHEL 7 system. Later i will show you how you can use this repository to fetch software, security updates and fixes. Local repository is an efficient way to deploy new software's or patches as it will be over LAN where deployment will be fast, saving your internet bill. I have two CentOS 7 systems here one is YUM repository server and another will be Client which will fetch the updates from repository server over FTP protocol. Setting up YUM repo server with FTP: Step 1. Mount CentOS 7 ISO and copy all the RPM packages to a FTP directory: [root@localhost ~]# mount /dev/cdrom /mnt/ mount: /dev/sr0 is write-protected, mounting read-only [root@localhost ~]# mkdir /var/ftp/pub/localrepo [root@localhost ~]# cp -ar /mnt/Packages/* /var/ftp/pub/localrepo/ Step 2. Install vsftpd package and start it's service: [root@localhost ~]# cd /mn...