• Home
  • Kategori
  • Cari
gudangarsip.my.id

Install ssl letsencrypt Ubuntu 20.04

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
Hits: 507

Tulisan kali ini merupakan lanjutan dari artikel ini

Artikel sebelumnya melakukan instalasi letsencrypt dengan cara manual dari source. Memang sih kita dapat versi letsencrypt yang paling baru, tapi yaitu ribetnya ituloh... he..he..he..

Ok kali ini via port saja yang lebih simple,

sudo apt install certbot python3-certbot-apache
sudo vi /etc/apache2/sites-available/your_domain.conf

...
ServerName your_domain
ServerAlias www.your_domain
...

sudo apache2ctl configtest
sudo systemctl reload apache2

sudo ufw status
sudo ufw enable

sudo certbot --apache
sudo systemctl status certbot.timer

Dah gitu doang... he..he..he...

Karena versi free jadi banyak kekurangan, tapi kalau mau serius dengan full enkripsi dan fitur ssl bisa beli sertifikat ssl.

Instal apache php mysql di Raspberry - Ubuntu

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
Hits: 446

Sekedar pengingat saja, jadi maaf kalau berantakan.. :D

# INSTALL APACHE

sudo apt install apache2
sudo ufw app list
sudo ufw app info "Apache Full"
sudo ufw allow in "Apache Full"
test : http://your_server_ip

cek ip address : 
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'


# INSTALL MYSQL

sudo apt install mysql-server
sudo mysql_secure_installation
sudo mysql
SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

sudo vi /etc/mysql/my.cnf

[mysqld]
validate_password.policy=LOW

#Jika pusing hapus aja policy nya :
#1. Login to the mysql server as root mysql -h localhost -u root -p
#2. Run the following sql command: uninstall plugin validate_password;
#3. If last line doesn't work (new mysql release), you should execute UNINSTALL COMPONENT 'file://component_validate_password';

FLUSH PRIVILEGES;

Cek ulang :
SELECT user,authentication_string,plugin,host FROM mysql.user;

exit

sudo apt install php libapache2-mod-php php-mysql

sudo vi /etc/apache2/mods-enabled/dir.conf

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

# menjadi :

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

sudo systemctl restart apache2
sudo systemctl status apache2

# MEMBUAT VIRTUAL HOST APACHE

sudo vi /etc/apache2/sites-available/your_domain.conf

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName your_domain
    ServerAlias www.your_domain
    DocumentRoot /var/www/your_domain
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

sudo a2ensite your_domain.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo vi /etc/apache2/apache2.conf

ServerName gudangarsip.my.id

sudo systemctl restart apache2

# INSTALL PHP

sudo apt update
sudo apt-get install php7.4-gettext
sudo apt install phpmyadmin php-mbstring php-gettext
sudo phpenmod mbstring
sudo systemctl restart apache2


# INSTALL phpmyadmin

sudo vi /etc/apache2/conf-available/phpmyadmin.conf

<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
    . . .

sudo vi /usr/share/phpmyadmin/.htaccess

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/phpmyadmin/.htpasswd
Require valid-user

sudo htpasswd -c /etc/phpmyadmin/.htpasswd username

Edit network di Raspberry - Ubuntu 20.04

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
Hits: 459

Untuk melakukan setting ip di Ubuntu dilakukan dengan langkah langkah sebagai berikut :

1. Edit netplan

sudo vi /etc/netplan/00-installer-config.yaml

2. Sesuaikan konfigurasi yang akan dipakai

# Untuk setting dhcp
#network:
#    ethernets:
#        eth0:
#            dhcp4: true
#            optional: true
#    version: 2


# untuk setting wifi
#ethernets:
#  id0:
#    [...]
#    access-points:
#      mode: infrastructure
#      bssid: mywifi
#      band: 5GHz
#      channel: 5
#    auth:
#      key-management: none | psk | eap
#      password: my-password-string


# untuk set static ip
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses:
      - 192.168.0.2/24
      gateway4: 192.168.0.1
      nameservers:
        addresses:
        - 208.67.222.222
        - 8.8.8.8


3. Terapkan konfigurasi yang sudah di sesuaikan.

sudo netplan apply

Cek temperature raspberry - Ubuntu

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
Hits: 432

Check temperature :

cat /sys/class/thermal/thermal_zone0/temp

Kalau dalam bentuk script :

#!/bin/bash

temp=$(</sys/class/thermal/thermal_zone0/temp)

temp_f=`echo "$temp/1000" | bc -l`
printf "CPU Temp: %.3f°C\n" $temp_f

 

Instalasi memcache untuk support php fpm

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
Hits: 444

1. Instal memcache

apt-get -y update
apt install memcached libmemcached-tools

2. Check memcached service

Karena memcached jalan otomatis maka tinggal di double check saja

sudo systemctl status memcached

3. Edit konfigurasi memcached jika diperlukan 

sudo vi /etc/memcached.conf
Locate the -m parameter. Change its value to at least 1GB
Locate the -l parameter. Change its value to 127.0.0.1 or localhost

Read more: Instalasi memcache untuk support php fpm

  1. Install php fpm di ubuntu
  2. Sedikit trik copy (cp) pada Ubuntu
  3. Membuat file zip dengan password di Ubuntu
  4. Instalasi MRTG dengan RRDtool dan Routers2 di Ubuntu

Subcategories

Arduino

Mencoba belajar tentang Arduino.

Page 2 of 4

  • 1
  • 2
  • 3
  • 4

2026@gudangarsip.my.id

  • Tentang Saya
  • CopyLeft