0061.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Turn a $20 Android TV Box Into a Cheap Web Server</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <ol>
  25. <li>Run the following commands in terminal to install Apache HTTPD web server:
  26. <div class="codeBlock"># update software repositories<br />
  27. sudo apt update<br />
  28. # install available software updates<br />
  29. sudo apt upgrade -y<br />
  30. # install apache httpd<br />
  31. sudo apt install apache2 -y</div>
  32. </li>
  33. <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/ to verify Apache is up and running</span></li>
  34. <li>Run the following command in terminal to install MySQL/MariaDB
  35. <div class="codeBlock"># install mariadb/mysql server<br />
  36. sudo apt install mariadb-server -y<br />
  37. # configure the MySQL database<br />
  38. sudo mysql_secure_installation</div>
  39. </li>
  40. <li><span>Follow the prompts to change passwords and fix some potential security issues</span></li>
  41. <li><span>Once the installation completes, run the following </span>command in terminal to log into MySQL/MariaDB
  42. <div class="codeBlock">sudo su<br />
  43. mysql -u root -p<br />
  44. [enter the root password created earlier]<br />
  45. show databases;<br />
  46. exit<br />
  47. exit</div>
  48. </li>
  49. <li>Run the following commands in terminal to install PHP
  50. <div class="codeBlock"># install php<br />
  51. sudo apt install php libapache2-mod-php php-mysql -y</div>
  52. </li>
  53. <li><span>Once the installation completes, create a file called info.php in /var/www/html and add the following code:</span>
  54. <p>&lt;?php<br />
  55. phpinfo();<br />
  56. ?&gt;</p>
  57. </li>
  58. <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>
  59. <li>Run the following commands in terminal to install phpMyAdmin
  60. <div class="codeBlock"># install phpMyAdmin<br />
  61. sudo apt install phpmyadmin -y<br />
  62. # restart the apache httpd service<br />
  63. sudo systemctl restart apache2</div>
  64. </li>
  65. <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/phpmyadmin</span></li>
  66. <li>Run the following commands in terminal to cleanup downloaded packages
  67. <div class="codeBlock"># clean apt cache<br />
  68. sudo apt clean</div>
  69. </li>
  70. </ol>
  71. </div>
  72. </div>
  73. </body>
  74. </html>