Pages

Banner1

Tuesday, 20 June 2017

How to create a FTP user with specific /dir/ access only on a Centos / linux installation

I currently have SFTP access to the server via my root user, but am now trying to create a new user with FTP access to a specific directory only on the server, I've done the following:

Before that, please check and confirm 'vsftpd' service already installed. you can check those using below commands.

 #sudo yum install httpd
Now, below commands for new user creation with different home directory.

1. mkdir /var/www/mydomain.com
2. mkdir /var/www/mydomain.com/html
3. useradd <-username>
4. passwd <-username>
5. chown –R <-username> /var/www/mydomain.com
5. groupadd <-groupname>
6. gpasswd -a <-username> <-groupname>
7. chgrp -R <-groupname> /var/www/mydomain.com
8. chmod -R g+rw /var/www/mydomain.com
You have to add the following option on the vsftpd.conf file

chroot_local_user=YES

Monday, 5 June 2017

How To Install and phpMyAdmin in Linux


Step One — Install a LAMP Stack

Before we can install phpMyAdmin, we need to install Apache, MySQL, and PHP on our server. Together, along with the underlying operating system, this is known as a LAMP stack (Linux, Apache, MySQL, PHP). We can go ahead and install the necessary components from the default yum repositories by typing:

# sudo yum install httpd mysql-server php php-mysql
A web server, database server, and dynamic processing language will be installed on your server and ready to use.

Step Two — Check the LAMP Stack

Next, we need to check all the components that we have just installed. Start the Web Server and MySQL server and Check all of them using below commands

#service httpd status
#service mysqld status

Step Three — Install phpMyAdmin

Now, we are ready to install the phpMyAdmin package. This software is not available in the CentOS 6 default repositories. However, it is avialable in the EPEL repos (Extra Packages for Enterprise Linux). We can add access to the EPEL repositories to our system by typing:

#sudo yum install epel-release
After accepting the new repository, you can install the phpMyAdmin package by typing:

#sudo yum install phpmyadmin
This will install phpMyAdmin. We still must configure it though.

Step Four — Configure phpMyAdmin

Configure Apache Files: The phpMyAdmin package installs an Apache Virtual Host file that is used to configure web access. Open the file with the following command:

#vim /etc/httpd/conf.d/phpMyAdmin.conf
.....
Require ip your_workstation_IP_address
.....
Allow from your_workstation_IP_address
.....
Require ip your_workstation_IP_address
.....
Allow from your_workstation_IP_address
Save and close the file. You need to restart the server with the following command:
#sudo service httpd restart
Point your web browser to your VPS IP address followed by "/phpmyadmin"
#http://VPS_IP_address/phpmyadmin



After you provide the requested credentials, you will have access to the phpMyAdmin interface:





Sunday, 4 June 2017

Details: Red Hat Certified System Administrator

An IT professional who has earned the Red Hat Certified System Administrator (RHCSA®) is able to perform the core system administration skills required in Red Hat Enterprise Linux environments. The credential is earned after successfully passing the Red Hat Certified System Administrator (RHCSA) Exam (EX200).

Certification details

Skill: Prove your skills and knowledge

    1. A Red Hat® Certified System Administrator (RHCSA) is able to perform the following tasks:
    2. Understand and use essential tools for handling files, directories, command-line environments, and documentation
    3. Operate running systems, including booting into different run levels, identifying processes, starting and stopping virtual machines, and controlling services
    4. Configure local storage using partitions and logical volumes
    5. Create and configure file systems and file system attributes, such as permissions, encryption, access control lists, and network file systems
    6. Deploy, configure, and maintain systems, including software installation, update, and core services
    7. Manage users and groups, including use of a centralized directory for authentication
    8. Manage security, including basic firewall and SELinux configuration

      Audience: The RHCSA certification is designed for:

        1. Experienced Red Hat Enterprise Linux system administrators seeking validation of their skills
        2. Students who have attended Red Hat System Administration I and II and are on the path to earn RHCSA certification
        3. Experienced Linux system administrators who require a certification either by their organization or based on a mandate (DOD 8570 directive)
        4. IT professionals who are on the path to earn a Red Hat Certified Engineer (RHCE®) certification
        5. RHCEs who are non-current or who are about to become non-current and wish to re-certify as RHCEs

          Exam: Test your skills and knowledge

          EX200 - Red Hat Certified System Administrator (RHCSA) examThe performance-based Red Hat Certified System Administrator (RHCSA) exam (EX200) tests your knowledge and skill in areas of system administration common across a wide range of environments and deployment scenarios. You must be an RHCSA to earn a Red Hat Certified Engineer (RHCE®) certification.

          Training: The best way to learn is to do

          In preparation to earn the Red Hat Certified System Administrator (RHCSA), Red Hat recommends the following:
          For Windows system administrators
          1. Red Hat System Administration I (RH124)
          2. Red Hat System Administration II (RH134)

          For Linux or UNIX administrators
          1. RHCSA Rapid Track Course (RH199)

          Friday, 2 June 2017

          Bringing Up Interface Eth0: Error: No Suitable Device Found: No Device Found for Connection ‘System Eth0’


          The problem begins when, after cloning a virtual machine, the eth0 device cannot be found by the kernel. You will normally notice an error during boot similar to: “Bringing up Interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’.


          Bringing up Interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’
          As I mentioned above, this is caused when the new virtual machine is created. VMware has assigned an Ethernet adapter to the virtual machine with a different MAC address than what the source VM was using.
          ifconfig shows eth1 instead of eth0

          Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 File
          With this information, grab the HWaddr, we will then edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file and change the HWADDR parameter to the MAC address that you found in one of the 2 steps above.


          Edit the MAC address in /etc/sysconfig/network-scripts/ifcfg-eth0
          Restart the Network Service:

          # service network restart

          Exciting Offer