When atom installs, it sets up a symbolic link to the location where it is installed. You can open a file or folder in atom by using the following commands
a) Open the editor
b) Open a file
$ atom index.html
c) Open atom in the current folder
$ atom .
First set up the httpd (web) service
$ yum install httpd
If httpd service is already installed, update the service
$ yum update httpd
Now, start the web server
$ service httpd start
Redirecting to /bin/systemctl start httpd.service
Check the status of the web server
$ service httpd status
First step is to install dependencies
$ sudo yum groupinstall “Development Tools”
$ sudo yum install kernel-devel
Mount the Virtualbox Additions CD ISO. You should download the virtualbox additions iso from http://download.virtualbox.org/virtualbox/ depending on your version of Virtual Box.
$ sudo mkdir /media/cdrom/
$ sudo mount /dev/cdrom /media/cdrom/
$ cd /media/cdrom
$ sudo ./VBoxLinuxAdditions.run
Before this step, create a shared folder in your host system. Say for example, if you created a shared folder named “CentosShare” in the host system you will follow the steps given below to access the share from within Centos.
$ mkdir ~/share
$ mount -t vboxs CentosShare ~/share
Edit /etc/php.ini and add the timezone setting within the file. For a list of timezone settings, visit http://php.net/manual/en/timezones.php
[Date] ; Defines the default timezone used by the date functions
date.timezone = America/New_York
In earlier systems, passwords were stored in the file /etc/passwd and they were not encrypted.
After the user is created, an entry gets recorded in /etc/passwd with ‘x’ in the second column instead of the acutal password.
$ useradd timmy
$ cat /etc/passwd
For security reasons, passwords are now stored in the file /etc/shadow and they are encrypted. Password was not set initially, when the user was created. This is indicated by !! mark (in RedHat, ! – Debian)
$ cat /etc/shadow
Files created in windows when moved to linux will have ^M character at the end of lines when you open the files in Vi editor.
To remove the strange characters open the file in Vi editor and type
Linux supports many file system types like Ext2, Ext3, Ext4, NFS, FAT16, FAT32, NTFS etc. To find out what type of file systems are mounted in your system, issue the command
$ df -T
Output from the command
Filesystem Type 1K-blocks Used Available Use% Mounted on /dev/sda1 ext4 94088076 9090252 80218356 11% / udev devtmpfs 1023536 4 1023532 1% /dev
Fail2ban is a software used to ban IP’s which shows strange behavior. It can be configured to reject IP’s for a certain amount of time.
To install Fail2ban we need to download the application from the source. Login as the root user and go to /opt
$ cd /opt
$ wget http://downloads.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2?use_mirror=transact
Next unzip the downloaded file
$ tar -xf fail2ban-0.8.4.tar.bz2
$ cd fail2ban-0.8.4