Tuesday, February 6, 2018

How to Add Second HDD to Samba Ubuntu

  1 comment
February 06, 2018

At this time I will share how to Add Second HDD (Harddrive) to Samba, after your plug your HDD to PC.

1. Create directory for mounting HDD, i create on folder media and create folder MM002 for mounting HDD
$ cd to /media/{username}
$ sudo mkdir MM002
$ sudo chmod 777 MM002
$ sudo chown nobody:nogroup MM002
2. Cek your HDD with command 

$ sudo fdisk -l

3. make your hdd to be ext4 linux system with command
$ sudo mkfs.ext4 /dev/sda

4. Cek your HDD UUID, and edit fstab with nano or your text editor, i use sublime text editor
$ sudo mkfs.ext4 /dev/sda$ sudo nano /etc/fstab
$ sudo subl /etc/fstab

5. Add new line for your HDD new mounting

6. remounting your HDD and cek
$ sudo mount -a
$ df -h

7. You can double check in disk tool -> klik HHD -> klik gear icon.

8. Now we add HDD name to samba config
$ sudo subl /etc/samba/smb.conf

9. restart samba and restart ubuntu
$ sudo subl /etc/samba/smb.conf

10. done you can access new HDD with samba

Read More

Wednesday, December 20, 2017

Setup VPN PPTP on Ubuntu Server

  No comments
December 20, 2017

Because of the need for public static IP Address usage for connection to the japanese and ISP servers I use using dynamic IP. I am trying to create a vpn server digital ocean and get static ip for registering on japanese server whitelist. the use of this vpn can also be used to open sites that are blocked by isp. i will give a tutorial How to setup PPTP VPN on ubuntu server.

  1. Login root SSH to your server and install some package
    $ apt-get install ppp pptpd iptables
  2. configuration of PPTP IP ranges in server.
    $ vim /etc/pptpd.conf
  3. Then remove the '#' in the configuration file on the following line:
  4. Configuration DNS Server
    $ vim /etc/ppp/pptpd-options
    find 'ms-dns' and change to
  5. Create Account
    $ vim /etc/ppp/chap-secrets
    add new line and create account like this
    # client    server  secret      IP addresses
    izor        pptpd   asd1234     *
  6. Configure NAT for PPTP connections, otherwise we can not connect to any of these servers
    $ vim /etc/rc.local
    add before line exit 0
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && iptables-save
  7. Aktifkan IPv4 forwarding
    $ vim /etc/sysctl.conf
    uncomment or remove the #
  8. Reload konfigurasi
    $ sysctl -p
  9. Reboot your server and run this command
    $ service pptpd start
  10. Now you can setup your PC client to connect the VPN PPTP

Read More

Wednesday, November 29, 2017

Install PHP Imagick in Windows

  No comments
November 29, 2017

How to install php_imagick.dll in windows php. you need to know the exact version of your PHP. To do this: open a command prompt and enter these commands

Determine the PHP version:
php -i|find "PHP Version"

Determine the thread safety
php -i|find "Thread Safety"
You’ll have enabled for thread safe or disable for not thread safe

Determine the architecture
php -i|find "Architecture"
You’ll have x86 for 32 bits and x64 for 64 bits

PHP Imagick

after knowing your php version,  you have to download the dll of the PHP extension and the ImageMagick archive using the following table:

VersionThread Safe# of bitsEstensionImageMagick

Download the file properly and do it this way

  • Extract from php_imagick-….zip to the ext directory the php_imagick.dll file of your PHP installation
  • Extract from ImageMagick-….zip to the root PHP directory (where php.exe resides) the DLL files that start with:
  • Add this line to your php.ini file: extension=php_imagick.dll
Restart your php and your server. Done. your php imagick  on windows has been active

Read More

Friday, November 10, 2017

Add Pemanently to the PATH on MAC OS

  1 comment
November 10, 2017

Sometime after you install binary, example composer and package from composer. You must add composer to PATH, so many tutorial export PATH but is temporarly. Then how to add the path permanent.

  1. open terminal and type
    sudo nano /etc/paths

  2. Enter your password, when prompted.
  3. Go to the bottom of the file, and enter the path you wish to add
  4. Hit control-x to quit. and enter Y
  5. Open new terminal and type
    echo $PATH
You should see something similar to this (including the path you’ve added!):
add composer to PATH
add composer to PATH

Read More

Tuesday, June 20, 2017

Cara Setting DNS di Ubuntu

  No comments
June 20, 2017

Tutorial ini adalah bagian dari cara Setting Local Domain untuk Local Network. Pada tutorial ini akan akan khusus bagaimana setting DNS di Ubuntu agar domain local dapat diakses oleh pc client.

Untuk Setting Domain ke Path folder aplikasi web yang telah kalian buat, akan dilanjutkan ke tutorial berikutnya. Kita lanjut saja masuk ke tutorialnya.

misal disini saya akan buat domain audisi.cchan.app pada server ubuntu dengan IP Saya menggunakan bind9, untuk pengertian apa itu bind9 kalian bisa googling terlebih dahulu, karena banyak website yang membahas detail tentang bind9, disini saya hanya akan menyampaikan tutorialnya saja.

  1. Pastikan Ubuntu kalian sudah update
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
  2. install Bind9 pada terminal
    sudo apt-get isntall bind9 bind9utils bind9-doc
  3. Kita setting IP server pada NDS Cachin
    sudo gedit /etc/bind/named.conf.options
     Pada Bagian forwarder hilangkan remarks dan masukan IP server dan dns ISP kalian.

  4. Tambahkan UP erver DNS pada resolv.conf
    sudo gedit /etc/resolv.conf
  5. Setelah itu kita tambahkan nama domain kita di named.conf pada bind
    sudo gedit /etc/bind/named.conf.default-zones
  6. Setelah itu buat file db.audisi.cchan dan edit
    cp /etc/bind/db.local /etc/bind/db.audisi.cchan
    sudo gedit /etc/bind/db.audisi.cchan
  7. Bua file reverse db.audisi.cchan.rev dan edit
    cp /etc/bind/db.127 /etc/bind/db.audisi.cchan.rev
    sudo gedit /etc/bind/db.audisi.cchan.rev
  8. restart bind
    sudo service bind9 restart
  9. lakukan nslookup pada domain dan ip yang telah di setup tadi
    nslookup audisi.cchan.app
  10. setting router pada port forwarding ke IP yang telah disetup dengan port 80

Read More

Saturday, February 18, 2017

How to import MySQL database from command prompt

  No comments
February 18, 2017

How to import mysql database from command prompt is easy. sometime it use for big database and problem with phpMyAdmin. But if you have SQL Remote Client you can used that to import database.

to import from command prompt, first you must go to folder mysql instaled. got to bin folder and type this command

mysql -u your_mysql_username_here -p name_of_database < file_dump_here.sql
and than type your mysql password

Read More

Friday, February 17, 2017

Web Apps Can't Write File On Unix Server

  1 comment
February 17, 2017

Sometime a web apps need to upload file, and sometime need to write file, or make a folder, and if your apps can't write file or create a folder on unix server maybe your apps folder still on root owner, change to www-data or add www-data to group.

Web Apps Can't Write File On Unix Server - izor Note's

You can do this for change folder owner to www-data.

sudo chown -R www-data:www-data /var/www/sites
sudo chmod u=rx,g=rx,o= /var/www/sites
sudo chmod u=rwx,g=rwx,o= /var/www/sites/files
sudo chmod u=r,g=r,o= /var/www/sites/default/*.php

Read More