forked from i12bretro/tutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0061.html
76 lines (75 loc) · 3.78 KB
/
0061.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!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,LAMP,Web Server Administration,Web Server,Web Developer,Self-hosted,System Administrator,System Administration,Self-Hosted,Debian,Developer,Development,Browser Based,Web Based Tools,Web Based,Single Board Computer,SBC,Install Guide,Home Lab,Administration,Database,PHP Configuration,Apache HTTPD Configuration,Apache HTTPD,Apache HTTPD Administration,Free Software,How To,Tutorial,i12bretro">
<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">
<meta name="revised" content="03/29/2022 01:19:28 PM" />
<link rel="icon" type="image/x-icon" href="includes/favicon.ico">
<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>