[root@localhost /]# cd home/
[root@localhost home]# ls -la
total 8
drwxr-xr-x 2 root root 4096 Sep 23 2011 .
drwxr-xr-x 24 root root 4096 Aug 10 22:43 ..
[root@localhost home]# cd ..
[root@localhost /]# cd var/
[root@localhost var]# ls -la
total 80
drwxr-xr-x 20 root root 4096 Jan 8 2015 .
drwxr-xr-x 24 root root 4096 Aug 10 22:43 ..
drwxr-xr-x 7 root root 4096 Jan 8 2015 cache
drwxr-xr-x 2 root root 4096 Nov 22 2013 cvs
drwxr-xr-x 4 root root 4096 Jan 8 2015 db
drwxr-xr-x 3 root root 4096 Jan 8 2015 empty
drwxr-xr-x 2 root root 4096 Sep 23 2011 games
drwxr-xr-x 15 root root 4096 Oct 1 2015 lib
drwxr-xr-x 2 root root 4096 Sep 23 2011 local
drwxrwxr-x 3 root lock 4096 Jan 8 2015 lock
drwxr-xr-x 5 root root 4096 Aug 10 22:43 log
lrwxrwxrwx 1 root root 10 Oct 1 2015 mail -> spool/mail
drwxr-x--- 5 root named 4096 Jan 8 2015 named
drwxr-xr-x 2 root root 4096 Sep 23 2011 nis
drwxr-xr-x 2 root root 4096 Sep 23 2011 opt
drwxr-xr-x 2 root root 4096 Sep 23 2011 preserve
drwxr-xr-x 15 root root 4096 Aug 22 15:23 run
drwxr-xr-x 8 root root 4096 Jan 8 2015 spool
drwxrwxrwt 2 root root 4096 Aug 22 15:23 tmp
drwxr-xr-x 6 root root 4096 Jul 18 11:24 www
drwxr-xr-x 2 root root 4096 Sep 23 2011 yp
[root@localhost var]# cd www/
[root@localhost www]# ls -la
total 24
drwxr-xr-x 6 root root 4096 Jul 18 11:24 .
drwxr-xr-x 20 root root 4096 Jan 8 2015 ..
drwxr-xr-x 2 root root 4096 Jul 18 11:24 cgi-bin
drwxr-xr-x 3 root root 4096 Aug 22 15:23 error
drwxr-xr-x 2 root root 4096 Jul 18 11:24 html
drwxr-xr-x 3 root root 4096 Aug 22 15:23 icons
[root@localhost www]# ht
htcacheclean htdbm htdigest htpasswd httpd httpd.event httpd.worker httxt2dbm
[root@localhost www]# ht
htcacheclean htdbm htdigest htpasswd httpd httpd.event httpd.worker httxt2dbm
[root@localhost www]# cd html/
[root@localhost html]# ls -la
total 8
drwxr-xr-x 2 root root 4096 Jul 18 11:24 .
drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
[root@localhost html]# nano /var/www/html/phpinfo.php
[root@localhost html]# service restart httpd
restart: unrecognized service
[root@localhost html]# cd ..
[root@localhost www]# cd ..
[root@localhost var]# cd ..
[root@localhost /]# service restart httpd
restart: unrecognized service
[root@localhost /]# service start httpd
start: unrecognized service
[root@localhost /]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@localhost /]# grep -ri listen /etc/apache2 outputs: etc/apache2/httpd.conf: Listen 80 /etc/apache2/httpd.conf: Listen 443 /etc/apache2/ports.conf: Listen 80 /etc/apache2/httpd.conf: Listen 443 /etc/apache2/httpd.conf: Listen 443 sudo netstat -ntlp | grep 80
grep: invalid option -- 't'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
[root@localhost /]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@localhost /]# fuser -k -n tcp 80
80/tcp: 1611
[root@localhost /]# service httpd start
Starting httpd: [ OK ]
[root@localhost /]# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost /]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@localhost /]# cd /var/www/html/
[root@localhost html]# ls -la
total 12
drwxr-xr-x 2 root root 4096 Aug 22 15:28 .
drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
-rw-r--r-- 1 root root 20 Aug 22 15:28 phpinfo.php
[root@localhost html]# nano index.html
[root@localhost html]# ls -la
total 16
drwxr-xr-x 2 root root 4096 Aug 22 15:40 .
drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
-rw-r--r-- 1 root root 44 Aug 22 15:40 index.html
-rw-r--r-- 1 root root 20 Aug 22 15:28 phpinfo.php
[root@localhost /]# php -v
PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost /]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@localhost /]# cd /var/www/html/
[root@localhost html]# ls -la
total 12
drwxr-xr-x 2 root root 4096 Aug 22 15:28 .
drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
-rw-r--r-- 1 root root 20 Aug 22 15:28 phpinfo.php
[root@localhost html]# nano index.html
[root@localhost html]# ls -la
total 16
drwxr-xr-x 2 root root 4096 Aug 22 15:40 .
drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
-rw-r--r-- 1 root root 44 Aug 22 15:40 index.html
-rw-r--r-- 1 root root 20 Aug 22 15:28 phpinfo.php
[root@localhost html]# yum install vsftpd
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.chicago.waneq.com
* extras: mirror.supremebytes.com
* updates: mirror.scalabledns.com
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:2.2.2-21.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================
Installing:
vsftpd x86_64 2.2.2-21.el6 base 155 k
Transaction Summary
=========================================================================================================================================================================
Install 1 Package(s)
Total download size: 155 k
Installed size: 340 k
Is this ok [y/N]: y
Downloading Packages:
vsftpd-2.2.2-21.el6.x86_64.rpm | 155 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : vsftpd-2.2.2-21.el6.x86_64 1/1
Verifying : vsftpd-2.2.2-21.el6.x86_64 1/1
Installed:
vsftpd.x86_64 0:2.2.2-21.el6
Complete!
[root@localhost html]# yum install ftp
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.chicago.waneq.com
* extras: mirror.supremebytes.com
* updates: mirror.scalabledns.com
Package ftp-0.17-54.el6.x86_64 already installed and latest version
Nothing to do
[root@localhost html]# vi /etc/vsftpd/vsftpd.conf
[1]+ Stopped vi /etc/vsftpd/vsftpd.conf
[root@localhost html]# nano /etc/vsftpd/vsftpd.conf
[root@localhost html]# service vsftpd restart
Shutting down vsftpd: [FAILED]
Starting vsftpd for vsftpd: [ OK ]
[root@localhost html]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
[root@localhost html]# chkconfig vsftpd on
[root@localhost html]# adduser *********
[root@localhost html]# passwd *********
Changing password for user *********.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost html]# cd /
[root@localhost /]# usermod -m -d /var/www/html/*********
usermod: user '/var/www/html/*********' does not exist
[root@localhost /]# usermod -m -d /var/www/html *********
usermod: directory /var/www/html exists
[root@localhost /]# chown -R *********:********* /var/www/html
[root@localhost /]# usermod -m -d /var/www/html *********
usermod: no changes
[root@localhost /]#
All Process and Fixed Done !!
Command For Fixed: fuser -k -n tcp 80
Note: ********* = My Username
Comments