1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Turn a $20 Android TV Box Into a Cheap Web Server</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta charset="UTF-8">
- <meta name="keywords" content="Linux,PHP,Apache,HTTPD,MySQL,MariaDB,Armbian,Android,TV Box,HowTo,Tutorial,i12bretro,LAMP">
- <meta name="author" content="i12bretro">
- <meta name="description" content="Turn a $20 Android TV Box Into a Cheap Web Server">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="includes/js/steps.js"></script>
- <link href="css/steps.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="gridContainer">
- <div class="topMargin"></div>
- <div id="listName" class="topMargin">
- <h1>Turn a $20 Android TV Box Into a Cheap Web Server</h1>
- </div>
- <div></div>
- <div id="content">
- <ol>
- <li>Run the following commands in terminal to install Apache HTTPD web server:
- <div class="codeBlock"># update software repositories<br />
- sudo apt update<br />
- # install available software updates<br />
- sudo apt upgrade -y<br />
- # install apache httpd<br />
- sudo apt install apache2 -y</div>
- </li>
- <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/ to verify Apache is up and running</span></li>
- <li>Run the following command in terminal to install MySQL/MariaDB
- <div class="codeBlock"># install mariadb/mysql server<br />
- sudo apt install mariadb-server -y<br />
- # configure the MySQL database<br />
- sudo mysql_secure_installation</div>
- </li>
- <li><span>Follow the prompts to change passwords and fix some potential security issues</span></li>
- <li><span>Once the installation completes, run the following </span>command in terminal to log into MySQL/MariaDB
- <div class="codeBlock">sudo su<br />
- mysql -u root -p<br />
- [enter the root password created earlier]<br />
- show databases;<br />
- exit<br />
- exit</div>
- </li>
- <li>Run the following commands in terminal to install PHP
- <div class="codeBlock"># install php<br />
- sudo apt install php libapache2-mod-php php-mysql -y</div>
- </li>
- <li><span>Once the installation completes, create a file called info.php in /var/www/html and add the following code:</span>
- <p><?php<br />
- phpinfo();<br />
- ?></p>
- </li>
- <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>
- <li>Run the following commands in terminal to install phpMyAdmin
- <div class="codeBlock"># install phpMyAdmin<br />
- sudo apt install phpmyadmin -y<br />
- # restart the apache httpd service<br />
- sudo systemctl restart apache2</div>
- </li>
- <li><span>Once the installation completes, open a web browser and navigate to http://DNSorIP/phpmyadmin</span></li>
- <li>Run the following commands in terminal to cleanup downloaded packages
- <div class="codeBlock"># clean apt cache<br />
- sudo apt clean</div>
- </li>
- </ol>
- </div>
- </div>
- </body>
- </html>
-
|