VPS Mastery Archives - pakarbot

Tahapan Setup WordPress Di VPS Menggunakan Nginx

Seting DNS (lihat video part #1 di https://www.pakarbot.com/vps-mastery-8-step-by-step-setup-wordpress-dari-nol-di-vultr/)

Connect ke server via SSH menggunakan putty -> https://youtu.be/ANu10Hkxip4

Buat user baru non root

# adduser userpakarbot
# usermod -aG sudo userpakarbot

Lihat videonya di sini -> https://youtu.be/ZX8Dv-Al4XQ

Install nginx

$sudo apt update
$sudo apt install nginx
$sudo ufw status <- untuk melihat service yang diijinkan oleh fw
$sudo ufw app list <- untuk melihat perintah fw yang tersedia
$sudo ufw allow 'Nginx Full'
$sudo ufw status <- cek lagi nginx full sudah ada dilist yang diijinkan oleh fw atau belum
$sudo nano /etc/nginx/nginx.conf

Aktifkan bagian ini:

server_names_hash_bucket_size 64;

tambahkan ini dibawahnya:

fastcgi_buffering off; <- untuk enable php flush
fastcgi_read_timeout 1800; <- untuk pgp biar bisa running lebih lama

$systemctl status nginx <- untuk melihat service nginx sudah nyala atau belum 
$sudo /etc/init.d/nginx start

Install MySql
$sudo apt-get install mysql-server

Lihat videonya di sini -> https://youtu.be/PjTFTedPtUc

Install php
$sudo apt install php-fpm php-mysql <- install php versi terakhir
$sudo apt show php -a

Lihat videonya di sini -> https://youtu.be/NpIm1k9jpx8

Install 2 Versi PHP Dalam 1 Server

$sudo apt-get install software-properties-common
$sudo add-apt-repository ppa:ondrej/php
$sudo apt-get update
$sudo apt install php7.4-fpm <- ubah angka sesuai versi php yang ingin diinstall
$sudo apt install php7.4-cli php7.4-xml php7.4-mysql <- install php module yang dibutuhkan.
untuk install modul lain bisa lihat daftarnya dengan cara
$sudo apt install php7.4 kemudian tekan tab2x

Lihat videonya di sini -> https://youtu.be/3zwFgKp59JM

Set Default Versi PHP

$php -v <- untuk cek versi default php
$sudo update-alternatives - -set php /usr/bin/php7.4
$php -v <- untuk cek versi default php sudah berubah atau belum

Lihat videonya di sini -> https://youtu.be/7jhfDeAvaTM

Konfigurasi PHP Untuk PGP

$ sudo nano /etc/php/7.4/fpm/php.ini
cari baris:
max_execution_time = 30

ubah ke:
max_execution_time = 1800

$ sudo apt-get install php7.4-curl
$ sudo /etc/init.d/php7.4-fpm restart

Lihat videonya di sini -> https://youtu.be/18EXEj7tHpw

Menambahkan Domain/Addon Domain/Subdomain Ke nginx

$cd /etc/nginx/sites-available/
$sudo nano namadomain.com

isi dengan script ini:
-----------
server {
listen 80;

root /var/www/namadomain.com;
index index.html index.htm index.nginx-debian.html index.php;

server_name namadomain.com www.namadomain.com;

location / {
try_files $uri $uri/ /index.php?$args;
client_max_body_size 100M; #untuk memperbesar limit upload
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
# fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; #sesuaikan dengan versi php
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; #sesuaikan dengan versi php yang ingin dipakai
}

location ~ /\.ht {
deny all;
}
}

$sudo mkdir -p /var/www/namadomain.com
$sudo nano /var/w
ww/namadomain.com/tes.html

isi dengan ini:
---
horee... konfig nginx berhasil
---

$sudo chown -R www-data:www-data /var/www/namadomain.com

$sudo ln -s /etc/nginx/sites-available/namadomain.com /etc/nginx/sites-enabled/

$sudo /etc/init.d/nginx restart

Coba akses dari browser http://namadomain.com/tes.html

Install HTTPS/SSL sertifikat

$sudo apt install certbot python3-certbot-nginx
$sudo certbot --nginx -d namadomain.com -d www.namadomain.com

Coba akses dari browser namadomain.com/tes.html sudah mengarah ke https atau belum

Buat database untuk WP

$sudo mysql
mysql> create database namadb;
mysql> CREATE USER 'pakarbot'@'localhost' IDENTIFIED BY 'pakarbot123';
mysql> GRANT ALL ON *.* TO 'pakarbot'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> show databases; <- untuk melihat db sudah berhasil dibuat atau belum

ctrl+d untuk keluar dari console mysql

Lihat videonya di sini -> https://youtu.be/jaXS6n_tgN8

Download Installer WordPress

$ cd /var/www/namadomain.com/
$ sudo wget http://wordpress.org/latest.zip
$ sudo apt-get install unzip
$ sudo unzip latest.zip
$ sudo mv -vf wordpress/* ./
$ sudo rm -rvf wordpress/

Lihat Videonya di sini -> https://youtu.be/wfns5lE4Aok

Konfigurasi wp-config

$ cd /var/www/namadomain.com
$ sudo cp wp-config-sample.php wp-config.php
$ sudo nano wp-config.php <- ubah db name,user, & pass

Akses dari browser namadomain.com atau https://namadomain.com/wp-admin/install.php

Lihat videonya di sini -> https://youtu.be/ZnjgarYDSxs

Tahapan Setup WordPress di VPS Menggunakan Apache

Seting DNS (lihat video part #1 di https://www.pakarbot.com/vps-mastery-8-step-by-step-setup-wordpress-dari-nol-di-vultr/)

Connect ke server via SSH menggunakan putty -> https://youtu.be/ANu10Hkxip4

Buat user baru non root

# adduser userpakarbot
# usermod -aG sudo userpakarbot

Lihat videonya di sini -> https://youtu.be/ZX8Dv-Al4XQ

Install apache

Sebelum mulai install apache silahkan close dulu putty-nya kemudian buka lagi, login lagi menggunakan user non root yang baru saja kita buat sebelumnya.

$ sudo apt update
$ sudo apt install apache2
$ sudo ufw app list
$ sudo ufw allow 'Apache Full'
$ sudo ufw status
$ sudo a2enmod rewrite <- untuk enable modul rewrite apache
$ sudo nano /etc/apache2/apache2.conf


kemudian cari baris script yang seperti ini

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Pastikan allowoverride nya all

/etc/init.d/apache2 restart

Lihat videonya di sini -> https://youtu.be/9v7kuMJGxyA

Install MySQL

$ sudo apt-get install mysql-server

Lihat videonya di sini -> https://youtu.be/PjTFTedPtUc

Install PHP

$ sudo apt install php-fpm php-mysql
$ sudo apt show php -a

Lihat videonya di sini -> https://youtu.be/NpIm1k9jpx8

Install 2 Versi PHP Dalam 1 Server

$ sudo apt-get install software-properties-common -y
$ sudo add-apt-repository ppa:ondrej/php
$ sudo add-apt-repository ppa:ondrej/apache2
$ sudo apt-get update -y
$ sudo apt-get install php7.4 php7.4-fpm php7.4-mysql libapache2-mod-php7.4 libapache2-mod-fcgid -y
$ sudo systemctl start php7.4-fpm
$ sudo a2enmod actions fcgid alias proxy_fcgi
$ sudo systemctl restart apache2

Lihat videonya di sini -> https://youtu.be/3zwFgKp59JM

Ubah Default Versi PHP

$ php -v <- untuk cek versi default php
$ sudo update-alternatives --set php /usr/bin/php7.4
$ php -v <- untuk cek versi default php sudah berubah atau belum

Lihat videonya di sini -> https://youtu.be/7jhfDeAvaTM

Konfigurasi PHP max_execution_time Untuk PGP

$ sudo nano /etc/php/7.4/fpm/php.ini
cari baris:
max_execution_time = 30

ubah ke:
max_execution_time = 1800

$ sudo /etc/init.d/php7.4-fpm restart

Lihat videonya di sini -> https://youtu.be/18EXEj7tHpw

Menambahkan Domain/Addon Domain/Sub Domain Ke Apache

$ cd /etc/apache2/sites-available
$ sudo cp 000-default.conf namadomain.com.conf
$ sudo nano namadomain.com.conf

Edit ServerName, ServerAlias, dan directory (lihat video)
tambahkan
---
<FilesMatch \.php$>
      # For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server
      SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
    </FilesMatch>
---

$ sudo ln -s /etc/apache2/sites-available/namadomain.com.conf /etc/apache2/sites-enable

Lihat videonya di sini -> https://youtu.be/IVqKbxpwc9k

Install SSL/HTTPS Sertificate

Sebelum install SSL certificate jalankan ini dulu supaya akses SSL tidak terblokir oleh firewall

$ sudo ufw allow 'Apache Secure'
$ sudo apt install certbot python3-certbot-apache
$ sudo certbot --apache -d namadomain.com -d www.namadomain.com

Lihat videonya di sini -> https://youtu.be/nDIUt_PU6jw

Buat Database Untuk WordPress

$sudo mysql
mysql> create database namadb;
mysql> CREATE USER 'pakarbot'@'localhost' IDENTIFIED BY 'pakarbot123';
mysql> GRANT ALL ON *.* TO 'pakarbot'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> show databases; <- untuk melihat db sudah berhasil dibuat atau belum

ctrl+d untuk keluar dari console mysql

Lihat videonya di sini -> https://youtu.be/jaXS6n_tgN8

Download Installer WordPress

$ cd /var/www/namadomain.com/
$ sudo wget http://wordpress.org/latest.zip
$ sudo apt-get install unzip
$ sudo unzip latest.zip
$ sudo mv -vf wordpress/* ./
$ sudo rm -rvf wordpress/

Lihat Videonya di sini -> https://youtu.be/wfns5lE4Aok

Konfigurasi wp-config.php

$ cd /var/www/namadomain.com
$ sudo cp wp-config-sample.php wp-config.php
$ sudo nano wp-config.php <- ubah db name,user, & pass

Akses dari browser namadomain.com atau https://namadomain.com/wp-admin/install.php

Lihat videonya di sini -> https://youtu.be/ZnjgarYDSxs

Install ekstensi-ekstensi tambahan

install mysql extension
# apt-get install php7.4-mysql

install php-xml extension
# sudo apt-get install php-xml

install curl
# sudo apt-get install php7.4-curl

tambahkan swap
lihat di sini https://pakarbot.com/member/content/p/id/30/

Penjelasan Step-step tambahan

+ Muncul error missing MySQL extension

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

Jika muncul error seperti di atas artinya module mysql untuk php belum terinstall.

cek dulu apa sudah terinstall atau belum
# dpkg –list | grep php7.0-mysql

jika tidak ada maka install dulu
# apt-get install php7.0-mysql

+ Install plugin gagal (minta akses ke FTP)

/var/www/html# chown -R www-data:www-data ./*

buka file wp-config.php kemudian tambahkan baris ini tepat di bawah tulisan

/* Add any custom values between this line and the “stop editing” line. */

define (‘FS_METHOD’, ‘direct’); define (‘FS_CHMOD_DIR’, 0755); define (‘FS_CHMOD_FILE’, 0644);

lihat video di sini https://pakarbot.com/vps-mastery-tambahan-2-troubleshoot-gagal-install-plugintheme-di-wordpress/

+ curl belum terinstall

# dpkg –list | grep php7.0-curl
# sudo apt-get install php7.0-curl

+ wordpress permalink error 404

lihat video nya di sini

# chown -R www-data:www-data .htaccess
# chmod -R 666 .htaccess
# sudo a2enmod rewrite

setting apache
# sudo nano /etc/apache2/apache2.conf

kemudian cari baris script yang seperti ini

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

pastikan allowoverride nya all

+ connect ke jetpack tidak bisa, muncul error

The Jetpack server was unable to communicate with your site [HTTP 500]

# sudo apt-get install php-xml

VPS Mastery 16 – Cara Setup VPS Di Contabo

VPS Mastery

#16 – Cara Setup VPS Di Contabo

Part 1 – Cara beli

video lama

video
play-sharp-fill

video update

part 1b

video
play-sharp-fill

Part 2 – Seting DNS

video
play-sharp-fill

part 3

Menit 01:15 dan seterusnya silahkan lihat video cara setup vps vultr di sini -> https://www.pakarbot.com/vps-mastery-8-step-by-step-setup-wordpress-dari-nol-di-vultr/

video
play-sharp-fill

part 4

video
play-sharp-fill

Perlu bantuan?

Tim kami siap membantu Anda. Silahkan kirimkan tiket bantuan ke tim support kami melalui tombol di bawah ini.

2017-2022 © PT Pakarbot Solusi Bisnis
Home | Login | Contact Us | Affiliate

VPS Mastery 15 – Pindahan Dari Share Hosting Ke VPS

VPS Mastery

#15 – Pindahan Dari Share Hosting Ke VPS

video
play-sharp-fill

part 2

video
play-sharp-fill

part 3

video
play-sharp-fill

2017-2019 © pakarbot.com
Home | Login | Affiliate