Menambahkan super user di mysql

9.7.18 ilham.sp 0 Comments


Login ke mysql dengan akses root :
sudo mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
While not particularly secure, in some cases you may wish to create another ‘super user’, that has ALL privileges across ALL databases on the server. That can be performed similar to above, but by replacing the database_name with the wildcard asterisk:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%';
Now username has the same privileges as the default root account, beware!


As a final step following any updates to the user privileges, be sure to save the changes by issuing the FLUSH PRIVILEGES command from the mysql prompt:
Query OK, 0 rows affected (0.01 sec)

0 komentar:

Ganti port dan seting private key untuk ssh centos 7

9.7.18 ilham.sp 0 Comments

Ganti Port
First Take a backup copy of the existing SSH server configuration :
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
Now Edit the configuration file :
vim /etc/ssh/sshd_config
and change the Port number from 22 to any custom port you choose :
Port 2244
Save the file with :wq!
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
Example Case :
you need to install policycoreutils package to run the semanage command. to do this :
yum -y install policycoreutils-python
now update SeLinux policy to allow new port for SSH service. to do this, run below :
semanage port -a -t ssh_port_t -p tcp 2244
now you need to update Firewall policy to allow new SSH Port, to do this run below :
firewall-cmd --permanent --zone=public --add-port=2244/tcp
firewall-cmd --reload
systemctl restart sshd.service
to Check the service status, run below :
ss -tnlp | grep ssh

Setting Private key
Once you have access to your account on the remote server, you should make sure the ~/.ssh directory exists. This command will create the directory if necessary, or do nothing if it already exists:
  • mkdir -p ~/.ssh
copykan atau buat file authorized_keys dengan isi public key yang akan di gunakan.

  • vi authorized_keys

Finally, we’ll ensure that the ~/.ssh directory and authorized_keys file have the appropriate permissions set:
  • chmod -R go= ~/.ssh
This recursively removes all “group” and “other” permissions for the ~/.ssh/ directory.
If you’re using the root account to set up keys for a user account, it’s also important that the ~/.sshdirectory belongs to the user and not to root:
  • chown -R sammy:sammy ~/.ssh
In this tutorial our user is named sammy but you should substitute the appropriate username into the above command.
We can now attempt passwordless authentication with our Ubuntu server.
cara login ssh

  • chown -R sammy: sudo ssh -i path_private_key_disimpan -p port user@IP_yang_dituju

0 komentar:

error load APCU.SO di WHM

28.5.18 ilham.sp 0 Comments versi baru 5.x.x tidak kompatibel untuk PHP 7 kebawah, untuk instal di PHP 5.6 via terminal perintahnya :

/opt/cpanel/ea-php56/root/usr/bin/pecl install channel://
sedangkan untuk php 7 :

/opt/cpanel/ea-php70/root/usr/bin/pecl install apcu 

0 komentar:

Thing to do after install ubuntu 18.04 LTS

18.5.18 ilham.sp 0 Comments

  1. update dan upgrade 
    sudo apt-get update && sudo apt-get upgrade
  2. install theme, favorit saya mac os theme
  3. Instal atom editor penganti sublime
  4. insall mysql workbench 
  5. install wine dan playon atau

0 komentar:

The 'grub-efi-amd64-signed' package failed to install Ubuntu 18.04

18.5.18 ilham.sp 1 Comments

The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB bootloader, the installed system will not boot.

buat satu partisi lagi pada saat instalasi dengan type ESP or EPS, dengan besar 100-200mb, di rekomendasikan 500mb, kemudian pada pilihan loader pilih lah SDA1 (keseluruhan hardisk) jangan per partisi.  selebihnya lanjutkan seperti instalasi biasa.

1 komentar:

Install ubuntu 18.04 LTS

18.5.18 ilham.sp 0 Comments

0 komentar:

Solusi mudah murah prekaman arsip digital : Perekaman Arsip Kepegawaian

23.4.18 ilham.sp 0 Comments

0 komentar:

Pengalaman Rp.10.000 pertama - Cryptocurrency

19.4.18 ilham.sp 0 Comments

0 komentar:

Solusi mudah murah prerkaman arsip digital : Convert dan compesi image ke pdf

16.4.18 ilham.sp 0 Comments

Untuk aplikasi non proprietary aplikasi satu ini dapat diandalkan, kelebihanya selain dapat di gunakan sebagai aplikasi pengolah scanner dengan semua fitur aplikasi manajeen scaner yang canggih, termasuk OCR, juga dapat dimanfaatkan untuk konversi hasil scan ke bebagai format file dari pdf, sampai djvu.

aplikasi ini cukup ringan berjalan pada ubuntu 16.04, saya sendiri sempat dipusingkan dengan aplikasi pengolahan PDF yang bagus untuk mengconvert dan mengkompresi file/image hasil perekaman(scan) arsip fisik menjadi arsip digital, untuk yang masih menggunakan windows bisa menggunakan Acrobat Reader DC yang mumpuni banget dengan fitur lengkap, paling cuma pusing beli (nge-crack) lisensinya.

saya merasa cukup puas dngan aplikasi g2scan ini, fitur-fitur yang di butuhkan sudah tersedia, seperti bookmark (indexing halaamn), compresi ukuran image, rotatate orinetasi, samapai membuat odd page sudah ada, kurang apalagi coba? gratis, halal, cukup memenuhi kebutuhan, dan ringan.

0 komentar:

Cara Compress ukuran pdf di linux ubuntu 16.04

11.4.18 ilham.sp 0 Comments

Native solutions

  • Ghostscript is a great tool for compressing PDFs. In our tests it delivered the best compression ratio. Simply run:
Use the following ghostscript command:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
  • -dPDFSETTINGS=/screen lower quality, smaller size.
  • -dPDFSETTINGS=/ebook for better quality, but slightly larger pdfs.
  • -dPDFSETTINGS=/prepress output similar to Acrobat Distiller "Prepress Optimized" setting
  • -dPDFSETTINGS=/printer selects output similar to the Acrobat Distiller "Print Optimized" setting
  • -dPDFSETTINGS=/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file
  • Run the Shrinkpdf script:
    $ ./shrinkpdf in.pdf out.pdf
    The script is almost same as the explicit gs command above. However, it has one advantage – it does an output file size check.
  • qpdf:  A cmdline program that does structural, content-preserving changes to PDF files. The simplest way to invoke it:
    $ qpdf --linearize input.pdf output.pdf
    However, this didn’t provide a very optimized output in our tests.
    To install qpdf on Ubuntu, run:
    $ sudo apt-get install qpdf
  • smpdf is a commercial closed source tool. However, there is an evaluation copy available for download which adds an unlicensed version mark to the modified document. Usage:
    $ smpdf in.pdf -o out.pdf

0 komentar: