Pages

Thursday, 23 April 2015

How to config IP Address in CentOS via Terminal

Step 1. Open terminal
Step 2. Switch to root, next
       
              #vi /etc/sysconfig/network-scripts/ifcfg-eth0
           
                         DEVICE = "eth0"
                         BOOTPROTO = "Static"
                         ONBOOT = "Yes"
                         TYPE = "Ethernet"
                         IPADDR = 192.168.4.4
                         NETMASK = 255.255.255.0
                         GATEWAY = 192.168.4.7
                         DNS1 = 8.8.8.8
                         DNS2 = 8.8.4.4
        Press Esc, wq!

           # /etc/init.d/network restart

Wednesday, 22 April 2015

How to config VSFTPD in CentOS

Step 1. Open your terminal
Step 2. Need to change admin mode
              $ su -
              Password: ("give your admin password")
Step 3. Want to install VSFTP before make sure if any previous install was made in that machine
             # rpm -q vsftpd
             if no previous vsftpd then
             # yum -y install vsftpd
             if completed
             # vim /etc/vsftpd/vsftpd.conf
             you want do two more action here. un-command these two line, press i to modify.
             
             anonymous_enable=No
             chroot_local_user=Yes
           
             press Esc, then
             
             :wq!

Step 4. Now you want create a specify user to access ftp file.
            #useradd ftpuser
            #passwd ftpuser
             password: ("give your ftpuser password at twice")
Step 5. Put the folder on your user account
            go to computer, file system,home, ftpuser
            if you want to change folder permission like

            #chmod -R 777 /home/ftpuser
            
            now you may paste specify folder inside your user folder
Step 6. Next start the vsftpd service like
           
            #service vsftpd start
            for permanent start like
            #chkconfig vsftpd on

Step 7. If you want to delete ftp user like
            
            #userdel ftpuser
            
            delete the ftpuser files 
           
            #rm -rf /home/ftpuser

Create directory and texfile command
   #mkdir /home/ftpuser/ftpfile
   #touch /home/ftpuser/test
   
Want to remove VSFTPD 
  #yum remove vsftpd