systemctl --state=failed
Raspberry Reposiroty
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi deb http://mirrordirector.raspbian.org/raspbian wheezy main contrib non-free rpi deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi deb-src http://mirrordirector.raspbian.org/raspbian wheezy main contrib non-free rpi
Linux Set Own Permission
Change the Owner of a File
Change the Owner and Group of a File
chown USER_NMAE file_name.txt
Change the Owner and Group of a File
chown USER:GROUP file_name.txt
Email Log di Ubuntu/Debian
Menangkap detail 'Dari' dan 'Ke' dalam file log (/var/log/maillog).
Pastikan servis Posftfix telah aktif dan berjalan, kemudian ketik perintah:
Pastikan servis Posftfix telah aktif dan berjalan, kemudian ketik perintah:
tail -f /var/log/mail.log
MySQL Update Join
UPDATE table11, table12, table13 SET table11.aval1 = table12.bval1 WHERE table11.id = table13.id AND table12.bval2 = table13.cval1
Mengalihkan Trafik Web HTTP Ke HTTPS
Pengalihan Semua Trafik
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Pengalihan Trafik Dari Domain Tertentu
RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Pengalihan Trafik Dari Direktori Tertentu
RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$ https://www.yourdomain.com/folder/$1 [R,L]
Menampilkan semua Error pada PHP
ini_set ( 'display_errors' , 1 ); ini_set ( 'display_startup_errors' , 1 ); error_reporting ( E_ALL );Jika nilai pada display_errors dan display_startup_errors adalah 1 maka pesan kesalahan akan ditampilkan kepada pengguna.
Biasanya, dispay_errors dan display_startup_errors ini harus di set ke 0 setelah tahap development.
Salin semua Berkas dan Direktori
Telah terdapat beberapa file dan direktori pada target dan perlu ditimpa. Menggunakan proses salin data, kemudian setelah data tersalin dan menimpa file yang sudah ada lakukan hapus data sumber. Berikut perintah yang dapat digunakan:
cp -r ./source/* ./destination && rm -R ./source/*
Memindahkan Berkas di Ubuntu/Debian
mv -f /sumber/* /tujuan
Keterangan :
-f : mengabaikan konfirmasi berkas telah ada
Hapus berkas dan direktori di Ubuntu/Debian
rm -r -f /dirname/*
Keterangan :
-r : hapus direktori dan isinya secara rekursif
-f : mengabaikan konfirmasi penghapusan
PPTP VPN Server dengan MikroTik
Gunakan WinBox atau SSH Client untuk menuliskan skrip berikut :
- Membuat IP Pool baru
- Membuat Server Profile
- Membuat Akun Pengguna
- Aktifkan Servis PPTP Server
- Mengaktifkan Firewall untuk koneksi 1723
- Aktifkan Servis Binding
[admin@SRV1Router]> ip pool add name=PPTP-Pool ranges=192.168.99.10-192.168.99.200
[admin@SRV1Router]> ppp profile add change-tcp-mss=yes local-address=PPTP-Pool name=PPTP-Profile only-one=yes remote-address=PPTP-Pool use-encryption=yes dns-server=8.8.8.8,8.8.4.4
[admin@SRV1Router]> ppp secret add name=user1 password=p@sSword1 profile=PPTP-Profile
[admin@SRV1Router]> interface pptp-server server set authentication=chap,mschap1,mschap2 default-profile=PPTP-Profile enabled=yes
[admin@SRV1Router]> ip firewall filter add chain=input comment="PPTP VPN" dst-port=1723 protocol=tcp
[admin@SRV1Router]> interface pptp-server add name=pptp-user1 user=user1
Cetak Daftar File di Command Prompt
dir /b > cetak.txt
akan mencetak hanya nama file saja.
dir /o:d > cetak.txt
akan mencetak file dengan diurutkan berdasarkan tanggal
dir *.jpg /o:d /s > cetak.txt
akan mencetak hanya file yang berekstensi gambar (,jpg)
Opsi-opsi lain pada perintah dir, gunakan : dir /?
akan mencetak hanya nama file saja.
dir /o:d > cetak.txt
akan mencetak file dengan diurutkan berdasarkan tanggal
dir *.jpg /o:d /s > cetak.txt
akan mencetak hanya file yang berekstensi gambar (,jpg)
Opsi-opsi lain pada perintah dir, gunakan : dir /?
Unhidden File
Unhidden file that stress either because of what (usually viral) suddenly hidden in a hidden file and restore want to can use a freeware program called attibute changer that can be downloaded at http://www.petges.lu/download/download.html
can manually enter in the cmd and the search for the location of the file continues to type attrib [file_name]-s-h
For example:
cmd c:> attrib-h-s data.doc
or
Open Ms-DOS command prompt..
type: "x:\attrib /s /d -r -a -s -h
**where "x" is your drive.
hopefully helpful for who do not know yet
can manually enter in the cmd and the search for the location of the file continues to type attrib [file_name]-s-h
For example:
cmd c:> attrib-h-s data.doc
or
Open Ms-DOS command prompt..
type: "x:\attrib /s /d -r -a -s -h
**where "x" is your drive.
hopefully helpful for who do not know yet
Langganan:
Postingan (Atom)