• Home
  • Kategori
  • Cari
gudangarsip.my.id

Reset file folder permission

Details
Written by: Bayu Aji
Category: OS
Published: 12 July 2021
#reset permission

cd /var/www/
sudo chgrp -R www-data html
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;

#set date :
sudo dpkg-reconfigure tzdata

Install ssl letsencrypt Ubuntu 20.04

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

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

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

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

Page 17 of 69

  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

2026@gudangarsip.my.id

  • Tentang Saya
  • CopyLeft