Web Server Localhost Android

Hasil gambar untuk localhost

Watsap Gaes
Kali ini ane akan share cara memasang Web Server di Android dengan & tanpa aplikasi

Apasih Localhost itu?
Localhost adalah nama standar yang diberikan sebagai alamat loopbcak network interface. Dengan menjadikan komputer kita sebagai local server, kita dapat bekerja secara offline tanpa harus takut menghadapi masalah biaya, waktu dan kenyamanan. Tidak berlaku di semua komputer karena ini ada jika melakukan instalasi software semacam, xampp, wamp, dll.
Localhost dapat diakses dengan memasukkan '127.0.0.1' atau 'localhost' di browser (tanpa tanda petik).
Beberapa aplikasi menggunakan port :8080, jadi kita tidak dapat mengakses localhost tanpa port tersebut. Contoh 127.0.0.1:8080 
Untuk mengakses Localhost, Kita harus mengaktifkan aplikasinya terlebih dahulu.

Berikut beberapa aplikasi Web Server untuk Android

1. Palapa Web Server
Hasil gambar untuk palapa web server
Download disini


2. Web Server PHP|MyAdmin|MySQL
 Web Server PHP|MyAdmin|MySQL icon
Features

– Built-in PHPMyAdmin ( phpMyAdmin 4.1.10)
– PHP 5.5.9
– MySQL 5.1.62
– Lighttpd 1.4.34
– MSMTP 1.4.31
– Nginx 1.5.1

Download disini

Males install aplikasi? Pake Termux aja
Berikut tutorialnya

1. Buka Termux (ga punya termux? download disini)
2. Ketik Command
$apt-get update && apt-get upgrade
$apt-get install git
$apt-get install wget
Setelah itu, kita install sudo nya..
Ini berfungsi untuk masuk ke sudo chroot ubuntu..
Kamu bisa install di https://github.com/mrcakil/Mrcakil.git
Ketik Command
$git clone https://github.com/mrcakil/Mrcakil.git
$cd Mrcakil
$chmod 777 tools
$./tools
pilih nomor sudo nya dan ubuntu nya.
$31
Nah jika sudah install sudo nya
Kita install chroot ubuntu nya
Caranya sama kaya di atas

Setelah terinstall
Ketik..
$cd termux-ubuntu
$./ubuntu.sh
Lalu kita masuk ke chroot ubuntu nya.
$sudo ./start.sh
Nanti akan muncul kaya gini
root@localhost# 
Lalu ketik
apt-get update
Nanti keluar tulisan seperti ini
root@localhost#apt-get update.
Lalu install LAMP (Linux.Apache.Mysql.Php/python/Perl)
masukan command
$apt-get install apache2
$apt-get install nano 
Lalu kita test dengan command
$apache2ctl configtest
Nanti akan terlihat seperti ini

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK 

Edit apache2 conf nya
$nano /etc/apache2/apache2.conf
isi di paling atas

ServerName server_domain_or_IP 


(liat gambar)
contoh
ServerName 127.0.0.1
Save file nya>
nah coba kita check lagi
$apache2ctl configtest
Nanti akan terlihat seperti ini
Syntax OK
 


(liat gambar)
Nah kita restart apache nya
$service apache2 restart
atau
$systemctl restart apache2
(liat gambar atas)
Coba check  di browser kamu
http://ipservertadi/
atau
http://localhost


(liat gambar) 


Kalo udah begitu kita tinggal install mysql  dengan perintah
$apt-get install mysql-server
$mysql_secure_installation
Masukin password yg kamu mau.
contoh :
root 
masukan kembali password nya
root

(liat gambar)


Kita install php nya

$apt-get install php libapache2-mod-php php-mcrypt php-mysql
Kalau sudah.. kita edit apache2 nya lagi
$nano /etc/apache2/mods-enabled/dir.conf
Nanti akan terlihat seperti ini
<IfModule mod_dir.c>
    DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
Pindahin directory index html menjadi seperti ini

<IfModule mod_dir.c>
    DirectoryIndex index.php index.cgi index.pl index.html index.xhtml index.htm
</IfModule>

Restart apache nya lagi

$service apache2 restart

Kita test apakah jalan php nya atau tidak

$nano /var/www/html/initester.php

Isi dengan

<?php
phpinfo();
?>
 (liat gambar)
Nah coba kita cek di browser
http://localhost/initester.php
atau
http://ipserveryangkamumasukantadi/initester.php

Install WordPress ?
Ketik perintah
$mysql -u root -p 
Masukan pw mysql yang udah kamu buat
Create database nya dengan perintah
$create database wordpress; 
(wordpress bisa ganti sesukamu)
configurasi user nya dengan mengetik
$CREATE USER wordpressuser@localhost IDENTIFIED BY 'password';
ketik lagi
$GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost;
ketik lagi
$FLUSH PRIVILEGES;
nah kalo sudah kita exit mysql nya dengan perintah
$exit
Sekarang kita download WordPress nya dengan perintah
$wget http://wordpress.org/latest.tar.gz 
extract wordpress nya dengan perintah
$tar xzvf latest.tar.gz 
Kita pindah kan WordPress nya ke /var/www/html/ dengan perintah
$mv wordpress /var/www/html
Sekarang kita check di browser




Thanks 99Syndicate (Mr.Cakil)

0 Comments:

Post a Comment