SISTER




 Catatan Oprekan Sister

1. bypass akses root vm

2. ganti root password vm

3. masuk sebagai  su - postgres
4. setelah masuk lakukan perintah pg_dumall > backup.bak

4. Transfer backup.bak ke vm baru



Install VM baru Sister

1. Ubuntu 18.04 LTS

2. Install ssh dan open remote

3. locale-gen en_US.UTF-8 (dpkg-reconfigure locale)

3. Install apache2 enable mod_rewrite (sdid.so copy from vm asli dan register ke conf.d apache2)

4. Install php5.6 dan Plugin (driver postgres)

5. Install Postgres 9.5

6. ganti password postgres ke postgresql123

7. rubah template1 encoding ke utf8 serta collate, ctype ke en_US.UTF-8


postgres=# UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';

postgres=# DROP DATABASE template1;

postgres=# CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UTF8';

postgres=# UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';

postgres=# \c template1;

You are now connected to database "template1" as user "postgres".

template1=# VACUUM FREEZE;  


postgres=# \list

                                    List of databases

      Name      |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   

----------------+----------+----------+-------------+-------------+-----------------------

 postgres       | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 

 sister_db      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 

 sister_sandbox | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 

 template0      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +

                |          |          |             |             | postgres=CTc/postgres

 template1      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | postgres=CTc/postgres+

                |          |          |             |             | =c/postgres

(5 rows)


postgres=# 



cara Restore backup.bak postgres ke vm baru

1. 

        sudo -i -u postgres

       cd  /home

psql -f backup.bak postgres 


apt install git


cd /var/


git clone https://sister_sdid:[email protected]/miftah_anshory/frontend-publish.git


mv www www-backup


hak akses folder www 711  

cd /var/

chmod 711 www

hak akses folder di dalam www 700

cd /var/www/

chmod -R 700 *


chown -R www-data:www-data *


menambahkan ke nano/etc/sudoers


www-data ALL=(www-data) NOPASSWD: /usr/bin/php

admin_sister ALL= NOPASSWD: /sbin/ifconfig, /sbin/route, /bin/nano /etc/network/interfaces

1 Komentar

Please Select Embedded Mode To Show The Comment System.*

Lebih baru Lebih lama

Formulir Kontak