0061.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Turn a $20 Android TV Box Into a Cheap Web Server</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Linux,PHP,Apache,HTTPD,MySQL,MariaDB,Armbian,Android,TV Box,HowTo,Tutorial,i12bretro,LAMP">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Turn a $20 Android TV Box Into a Cheap Web Server">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  12. <script type="text/javascript" src="includes/js/steps.js"></script>
  13. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  14. </head>
  15. <body>
  16. <div id="gridContainer">
  17. <div class="topMargin"></div>
  18. <div id="listName" class="topMargin">
  19. <h1>Turn a $20 Android TV Box Into a Cheap Web Server</h1>
  20. </div>
  21. <div></div>
  22. <div id="content">
  23. <ol>
  24. <li>Run the following commands in terminal to install Apache HTTPD web server:
  25. <div class="codeBlock"># update software repositories<br />
  26. sudo apt update<br />
  27. # install available software updates<br />
  28. sudo apt upgrade -y<br />
  29. # install apache httpd<br />
  30. sudo apt install apache2 -y</div>
  31. </li>
  32. <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/ to verify Apache is up and running</span></li>
  33. <li>Run the following command in terminal to install MySQL/MariaDB
  34. <div class="codeBlock"># install mariadb/mysql server<br />
  35. sudo apt install mariadb-server -y<br />
  36. # configure the MySQL database<br />
  37. sudo mysql_secure_installation</div>
  38. </li>
  39. <li><span>Follow the prompts to change passwords and fix some potential security issues</span></li>
  40. <li><span>Once the installation completes, run the following </span>command in terminal to log into MySQL/MariaDB
  41. <div class="codeBlock">sudo su<br />
  42. mysql -u root -p<br />
  43. [enter the root password created earlier]<br />
  44. show databases;<br />
  45. exit<br />
  46. exit</div>
  47. </li>
  48. <li>Run the following commands in terminal to install PHP
  49. <div class="codeBlock"># install php<br />
  50. sudo apt install php libapache2-mod-php php-mysql -y</div>
  51. </li>
  52. <li><span>Once the installation completes, create a file called info.php in /var/www/html and add the following code:</span>
  53. <p>&lt;?php<br />
  54. phpinfo();<br />
  55. ?&gt;</p>
  56. </li>
  57. <li><span>Open a web browser and navigate to http://DNSorIP/info.php to verify Apache is up and running with PHP support</span></li>
  58. <li>Run the following commands in terminal to install phpMyAdmin
  59. <div class="codeBlock"># install phpMyAdmin<br />
  60. sudo apt install phpmyadmin -y<br />
  61. # restart the apache httpd service<br />
  62. sudo systemctl restart apache2</div>
  63. </li>
  64. <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/phpmyadmin</span></li>
  65. <li>Run the following commands in terminal to cleanup downloaded packages
  66. <div class="codeBlock"># clean apt cache<br />
  67. sudo apt clean</div>
  68. </li>
  69. </ol>
  70. </div>
  71. </div>
  72. </body>
  73. </html>