Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Info] Tutorial setup Termux & VPS untuk jalankan script PHP CLI & Python

#1
Information 
Berikut ini adalah Tutorial setup Termux untuk jalankan script PHP CLI & Python

TERMUX

Install PHP

Code:
Pkg update && pkg upgrade
Pkg install php
Termux-Setup-Storage
Cd /sdcard/folderbotkamu
php scriptkamu.php

Install Python

Code:
pkg update && pkg upgrade
pkg install touch
pkg install python
pkg install python2
pip install --upgrade pip
pip install telethon
pip install requests
pip install bs4
pip install rsa
pip install pyaes
pip install pytz
pip install async_generator
pip install colorama
pip install beautifulsoup4
termux-setup-storage
cd /sdcard/folderscriptkamu

python scriptkamu.py

Secara default termux akan menginstall python 3.9x, dan kebanyakan script tidak kompitable dengan python terbaru, jadi jika ingin downgrade python bisa ikuti tutorial DISINI


VPS DEBIAN/UBUNTU


Install PHP CLI

Code:
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y

cd folderscript
php namascript.php

Kalau install di vps amazon (ubuntu 18.x) php cuman sampai 7.2 jadi pakai cara dibawah aja

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
php --version


Install Python 3.8

Code:
apt-get upgrade
sudo apt-get update
sudo apt-get upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8
apt install python3-pip
pip3 install --upgrade pip
pip3 install telethon
pip3 install requests
pip3 install bs4
pip3 install rsa
pip3 install pyaes
pip3 install pytz
pip3 install async_generator
pip3 install colorama
pip3 install beautifulsoup4
cd /folderscriptkamu
python3 scriptkamu.py

kalau untuk ubuntu 20.x atau debian 10 keatas di beberapa penyedia saya rasa defaultnya sudah pake python 3.x karena pyhton2 sudah tidak lagi didukung oleh Python Software Foundation 1 januari 2020.

jika kalian pake ubuntu 18 kebawah bisa coba pakai cara dibawah ini agar python3 menjadi default menggantikan python2

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.8
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
apt install python-pip
pip install telethon
pip install --upgrade pip
pip install requests
pip install bs4
pip install rsa
pip install pyaes
pip install pytz
pip install async_generator
pip install colorama
pip install beautifulsoup4
cd /folderscriptkamu
python scriptkamu.py

kalau error pake cara diatas, googling aja yah  buahaha
  


Possibly Related Threads…
Thread Author Replies Views Last Post
  Faucet Auto Claim Dogecoin instant to Faucetpay + Script Termux & VPS ForNesiaFreak 0 58 10-12-2021, 04:42 PM
Last Post: ForNesiaFreak
  Faucet Auto Claim Tronoshi (TRX) instant to Faucetpay + Script Termux & VPS ForNesiaFreak 0 51 10-12-2021, 04:00 PM
Last Post: ForNesiaFreak