kingdraco

Fix Error on My VPS WebServer Backup

Aug 22nd, 2016
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.97 KB | None | 0 0
  1. [root@localhost /]# cd home/
  2. [root@localhost home]# ls -la
  3. total 8
  4. drwxr-xr-x  2 root root 4096 Sep 23  2011 .
  5. drwxr-xr-x 24 root root 4096 Aug 10 22:43 ..
  6. [root@localhost home]# cd ..
  7. [root@localhost /]# cd var/
  8. [root@localhost var]# ls -la
  9. total 80
  10. drwxr-xr-x 20 root root  4096 Jan  8  2015 .
  11. drwxr-xr-x 24 root root  4096 Aug 10 22:43 ..
  12. drwxr-xr-x  7 root root  4096 Jan  8  2015 cache
  13. drwxr-xr-x  2 root root  4096 Nov 22  2013 cvs
  14. drwxr-xr-x  4 root root  4096 Jan  8  2015 db
  15. drwxr-xr-x  3 root root  4096 Jan  8  2015 empty
  16. drwxr-xr-x  2 root root  4096 Sep 23  2011 games
  17. drwxr-xr-x 15 root root  4096 Oct  1  2015 lib
  18. drwxr-xr-x  2 root root  4096 Sep 23  2011 local
  19. drwxrwxr-x  3 root lock  4096 Jan  8  2015 lock
  20. drwxr-xr-x  5 root root  4096 Aug 10 22:43 log
  21. lrwxrwxrwx  1 root root    10 Oct  1  2015 mail -> spool/mail
  22. drwxr-x---  5 root named 4096 Jan  8  2015 named
  23. drwxr-xr-x  2 root root  4096 Sep 23  2011 nis
  24. drwxr-xr-x  2 root root  4096 Sep 23  2011 opt
  25. drwxr-xr-x  2 root root  4096 Sep 23  2011 preserve
  26. drwxr-xr-x 15 root root  4096 Aug 22 15:23 run
  27. drwxr-xr-x  8 root root  4096 Jan  8  2015 spool
  28. drwxrwxrwt  2 root root  4096 Aug 22 15:23 tmp
  29. drwxr-xr-x  6 root root  4096 Jul 18 11:24 www
  30. drwxr-xr-x  2 root root  4096 Sep 23  2011 yp
  31. [root@localhost var]# cd www/
  32. [root@localhost www]# ls -la
  33. total 24
  34. drwxr-xr-x  6 root root 4096 Jul 18 11:24 .
  35. drwxr-xr-x 20 root root 4096 Jan  8  2015 ..
  36. drwxr-xr-x  2 root root 4096 Jul 18 11:24 cgi-bin
  37. drwxr-xr-x  3 root root 4096 Aug 22 15:23 error
  38. drwxr-xr-x  2 root root 4096 Jul 18 11:24 html
  39. drwxr-xr-x  3 root root 4096 Aug 22 15:23 icons
  40. [root@localhost www]# ht
  41. htcacheclean  htdbm         htdigest      htpasswd      httpd         httpd.event   httpd.worker  httxt2dbm    
  42. [root@localhost www]# ht
  43. htcacheclean  htdbm         htdigest      htpasswd      httpd         httpd.event   httpd.worker  httxt2dbm    
  44. [root@localhost www]# cd html/
  45. [root@localhost html]# ls -la
  46. total 8
  47. drwxr-xr-x 2 root root 4096 Jul 18 11:24 .
  48. drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
  49. [root@localhost html]# nano /var/www/html/phpinfo.php
  50. [root@localhost html]# service restart httpd
  51. restart: unrecognized service
  52. [root@localhost html]# cd ..
  53. [root@localhost www]# cd ..
  54. [root@localhost var]# cd ..
  55. [root@localhost /]# service restart httpd
  56. restart: unrecognized service
  57. [root@localhost /]# service start httpd
  58. start: unrecognized service
  59. [root@localhost /]# service httpd start
  60. Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
  61. no listening sockets available, shutting down
  62. Unable to open logs
  63.                                                            [FAILED]
  64. [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
  65. grep: invalid option -- 't'
  66. Usage: grep [OPTION]... PATTERN [FILE]...
  67. Try `grep --help' for more information.
  68. [root@localhost /]# service httpd start
  69. Starting httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
  70. no listening sockets available, shutting down
  71. Unable to open logs
  72.                                                           [FAILED]
  73. [root@localhost /]# fuser -k -n tcp 80
  74. 80/tcp:               1611
  75. [root@localhost /]# service httpd start
  76.  
  77. Starting httpd:                                            [  OK  ]      
  78. [root@localhost /]# php -v
  79. PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
  80. Copyright (c) 1997-2010 The PHP Group
  81. Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
  82. [root@localhost /]# service httpd restart
  83. Stopping httpd:                                            [  OK  ]
  84. Starting httpd:                                            [  OK  ]
  85. [root@localhost /]# cd /var/www/html/
  86. [root@localhost html]# ls -la
  87. total 12
  88. drwxr-xr-x 2 root root 4096 Aug 22 15:28 .
  89. drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
  90. -rw-r--r-- 1 root root   20 Aug 22 15:28 phpinfo.php
  91. [root@localhost html]# nano index.html
  92. [root@localhost html]# ls -la
  93. total 16
  94. drwxr-xr-x 2 root root 4096 Aug 22 15:40 .
  95. drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
  96. -rw-r--r-- 1 root root   44 Aug 22 15:40 index.html
  97. -rw-r--r-- 1 root root   20 Aug 22 15:28 phpinfo.php
  98.  
  99. [root@localhost /]# php -v
  100. PHP 5.3.3 (cli) (built: Aug 11 2016 20:33:53)
  101. Copyright (c) 1997-2010 The PHP Group
  102. Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
  103. [root@localhost /]# service httpd restart
  104. Stopping httpd:                                            [  OK  ]
  105. Starting httpd:                                            [  OK  ]
  106. [root@localhost /]# cd /var/www/html/
  107. [root@localhost html]# ls -la
  108. total 12
  109. drwxr-xr-x 2 root root 4096 Aug 22 15:28 .
  110. drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
  111. -rw-r--r-- 1 root root   20 Aug 22 15:28 phpinfo.php
  112. [root@localhost html]# nano index.html
  113. [root@localhost html]# ls -la
  114. total 16
  115. drwxr-xr-x 2 root root 4096 Aug 22 15:40 .
  116. drwxr-xr-x 6 root root 4096 Jul 18 11:24 ..
  117. -rw-r--r-- 1 root root   44 Aug 22 15:40 index.html
  118. -rw-r--r-- 1 root root   20 Aug 22 15:28 phpinfo.php
  119. [root@localhost html]# yum install vsftpd
  120. Loaded plugins: fastestmirror
  121. Setting up Install Process
  122. Loading mirror speeds from cached hostfile
  123. * base: centos.chicago.waneq.com
  124. * extras: mirror.supremebytes.com
  125. * updates: mirror.scalabledns.com
  126. Resolving Dependencies
  127. --> Running transaction check
  128. ---> Package vsftpd.x86_64 0:2.2.2-21.el6 will be installed
  129. --> Finished Dependency Resolution
  130.  
  131. Dependencies Resolved
  132.  
  133. =========================================================================================================================================================================
  134. Package                                Arch                                   Version                                        Repository                            Size
  135. =========================================================================================================================================================================
  136. Installing:
  137. vsftpd                                 x86_64                                 2.2.2-21.el6                                   base                                 155 k
  138.  
  139. Transaction Summary
  140. =========================================================================================================================================================================
  141. Install       1 Package(s)
  142.  
  143. Total download size: 155 k
  144. Installed size: 340 k
  145. Is this ok [y/N]: y
  146. Downloading Packages:
  147. vsftpd-2.2.2-21.el6.x86_64.rpm                                                                                                                    | 155 kB     00:00    
  148. Running rpm_check_debug
  149. Running Transaction Test
  150. Transaction Test Succeeded
  151. Running Transaction
  152.  Installing : vsftpd-2.2.2-21.el6.x86_64                                                                                                                            1/1
  153.  Verifying  : vsftpd-2.2.2-21.el6.x86_64                                                                                                                            1/1
  154.  
  155. Installed:
  156.  vsftpd.x86_64 0:2.2.2-21.el6                                                                                                                                          
  157.  
  158. Complete!
  159. [root@localhost html]# yum install ftp
  160. Loaded plugins: fastestmirror
  161. Setting up Install Process
  162. Loading mirror speeds from cached hostfile
  163. * base: centos.chicago.waneq.com
  164. * extras: mirror.supremebytes.com
  165. * updates: mirror.scalabledns.com
  166. Package ftp-0.17-54.el6.x86_64 already installed and latest version
  167. Nothing to do
  168. [root@localhost html]# vi /etc/vsftpd/vsftpd.conf
  169.  
  170. [1]+  Stopped                 vi /etc/vsftpd/vsftpd.conf
  171. [root@localhost html]# nano /etc/vsftpd/vsftpd.conf
  172. [root@localhost html]# service vsftpd restart
  173. Shutting down vsftpd:                                      [FAILED]
  174. Starting vsftpd for vsftpd:                                [  OK  ]
  175. [root@localhost html]# service vsftpd restart
  176. Shutting down vsftpd:                                      [  OK  ]
  177. Starting vsftpd for vsftpd:                                [  OK  ]
  178. [root@localhost html]# chkconfig vsftpd on
  179. [root@localhost html]# adduser *********
  180. [root@localhost html]# passwd *********
  181. Changing password for user *********.
  182. New password:
  183. Retype new password:
  184. passwd: all authentication tokens updated successfully.
  185. [root@localhost html]# cd /
  186. [root@localhost /]# usermod -m -d /var/www/html/*********
  187. usermod: user '/var/www/html/*********' does not exist
  188. [root@localhost /]# usermod -m -d /var/www/html *********
  189. usermod: directory /var/www/html exists
  190. [root@localhost /]# chown -R *********:********* /var/www/html
  191. [root@localhost /]# usermod -m -d /var/www/html *********
  192. usermod: no changes
  193. [root@localhost /]#
  194.  
  195. All Process and Fixed Done !!
  196. Command For Fixed: fuser -k -n tcp 80
  197. Note: ********* = My Username
Advertisement
Add Comment
Please, Sign In to add comment