Subscribe:

Labels


Friday, April 13, 2018

Cara Install phpMyAdmin di Ubuntu 16.04

Pendahuluan

Pada dasarnya, mengelola database dengan MySQL harus dilakukan dengan cara mengetikkan perintah yang sesuai untuk setiap tujuan tertentu. Kita harus hafal bagaimana jika ingin menghapus, membuat atau pun mengubah record , namun dengan phpmyadmin, kita bisa mengelola database dengan mudah Karena berbasis web, sekali klik, semua perintah dapat dijalan kan tanpa mengetik command line.

Persyaratan

  1. Client SSH seperti Bitvise atau Putty
  2. Pengetahuan dasar tentang peritah Linux/Unix
  3. Server atau VPS dengan RAM minimal 256MB (openVZ), disarankan 512 MB jika Anda menggunakan KVM atau Xen
  4. Ubuntu 16.04, 32 bit atau 64 bit

Instal PHPMYADMIN

  1. Pertama dan yang paling penting, anda harus sudah menginstal php7, MariaDB dan web server (apache/nginx)
  2. Sekarang install phpMyAdmin dengan mengetikkan perintah berikut
    apt-get install phpmyadmin
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
  3. Installer akan menanyakan opsi untuk menggunakan dbconfig-common untuk mengkonfigurasi phpMyAdmin. Pilih Yes.
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
  4. Sekarang anda harus memasukkan password untuk database anda
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
    Anda akan diminta mengkonfirmasi sekali lagi.
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
  5. Setelah selesai, phpMyAdmin semestinya sudah terinstal, namun di beberapa kasus anda mungkin akan menemui pesan error yang berbunyi
    ERROR 1045 (28000) : Access denied for user ‘root’@’localhost’ (using password : NO). Your options are … (etc)
    Jika itu terjadi, ikuti langkah tambahan ini
    Pertama, pilih ‘abort’
    Kemudian login sebagai root menggunakan password anda ketika menginstal MariaDB
    mysql -u root -p
    Kemudian jalankan perintah ini
    CREATE DATABASE phpmyadmin;
    GRANT ALL ON phpmyadmin.* TO phpmyadmin@localhost IDENTIFIED BY ‘changethispassword’;
    \q
    Jangan lupa untuk mengganti changethispassword dengan password anda
    Selanjutnya, ubah konfigurasi database
    nano /etc/phpmyadmin/config-db.php
    Kemudian ubah parameter dbpass dengan password anda
    ##
    ## database access settings in php format
    ## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
    ## by /usr/sbin/dbconfig-generate-include
    ##
    ## by default this file is managed via ucf, so you shouldn’t have to
    ## worry about manual changes being silently discarded. *however*,
    ## you’ll probably also want to edit the configuration file mentioned
    ## above too.
    ##
    $dbuser=’phpmyadmin’;
    $dbpass=’changethispassword’;
    $basepath=”;
    $dbname=’phpmyadmin’;
    $dbserver=’localhost’;
    $dbport=”;
    $dbtype=’mysql’;
    Ganti changethispassword dengan milik anda
    Kemudian simpan dengan menekan tombol Ctrl+O lalu Ctrl+X untuk keluar dari nano editor
  6. Instal modul php yang dibutuhkan Karena tanpa itu phpmyadmin tidak akan bekerja
    Maka dari itu, masukkan perintah berikut
    apt-get install php-mbstring php7.0-mbstring php-gettext
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
  7. Sesuaikan file config apache2 agar phpmyadmin dapat di akses
    nano /etc/apache2/apache2.conf
  8. Scroll file konfigurasi hingga ke dasar dan tambahkan kode berikut
    Include /etc/phpmyadmin/apache.conf
    Simpan perubahan dan keluar dari nano editor
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
  9. Restart service apache2
    service apache2 restart
  10. Untuk mengeceknya, buka web browser dan coba akses phpmyadmin lewat URL
    http://x.x.x.x/phpmyadmin
    ganti x.x.x.x dengan IP address server anda
    Cara Install phpMyAdmin di Ubuntu 16.04 LAMP
    Gunakan credential berikut untuk login pertama
    • Username : root
    • Password : password yang dimasukkan ketika instalasi sebelumnya

    SUMBER / SOURCE

Installing Percona Server on Debian and Ubuntu

Installing Percona Server on Debian and Ubuntu

Ready-to-use packages are available from the Percona Server software repositories and the download page.
Supported Releases:
  • Debian:
  • 7.0 (wheezy)
  • 8.0 (jessie)
  • 9.0 (stretch)
  • Ubuntu:
  • 14.04LTS (trusty)
  • 16.04LTS (xenial)
  • 17.04 (zesty)
  • 17.10 (artful)
Supported Platforms:
  • x86
  • x86_64 (also known as amd64)

What’s in each DEB package?

The percona-server-server-5.7 package contains the database server itself, the mysqld binary and associated files.
The percona-server-common-5.7 package contains files common to the server and client.
The percona-server-client-5.7 package contains the command line client.
The percona-server-5.7-dbg package contains debug symbols for the server.
The percona-server-test-5.7 package contains the database test suite.
The percona-server-source-5.7 package contains the server source.
The libperconaserverclient20-dev package contains header files needed to compile software to use the client library.
The libperconaserverclient20 package contains the client shared library. The 18.1 is a reference to the version of the shared library. The version is incremented when there is a ABI change that requires software using the client library to be recompiled or its source code modified.

Installing Percona Server from Percona apt repository

  1. Fetch the repository packages from Percona web:
    wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb
    
  2. Install the downloaded package with dpkg. To do that, run the following commands as root or with sudo:
    dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb
    
    Once you install this package the Percona repositories should be added. You can check the repository setup in the /etc/apt/sources.list.d/percona-release.list file.
  3. Remember to update the local cache:
    $ sudo apt-get update
    
  4. After that you can install the server package:
    $ sudo apt-get install percona-server-server-5.7
    
Note
Percona Server 5.7 comes with the TokuDB storage engine. You can find more information on how to install and enable the TokuDB storage in the TokuDB Installation guide.

Percona apt Testing repository

Percona offers pre-release builds from the testing repository. To enable it add the just uncomment the testing repository lines in the Percona repository definition in your repository file (default /etc/apt/sources.list.d/percona-release.list). It should looks like this (in this example VERSION is the name of your distribution):
# Testing & pre-release packages
#
deb http://repo.percona.com/apt VERSION testing
deb-src http://repo.percona.com/apt VERSION testing

Apt-Pinning the packages

In some cases you might need to “pin” the selected packages to avoid the upgrades from the distribution repositories. You’ll need to make a new file /etc/apt/preferences.d/00percona.pref and add the following lines in it:
Package: *
Pin: release o=Percona Development Team
Pin-Priority: 1001
For more information about the pinning you can check the official debian wiki.

Installing Percona Server using downloaded deb packages

Download the packages of the desired series for your architecture from the download page. The easiest way is to download bundle which contains all the packages. Following example will download Percona Server 5.7.10-3 release packages for Debian 8.0:
You should then unpack the bundle to get the packages:
$ tar xvf Percona-Server-5.7.10-3-r63dafaf-jessie-x86_64-bundle.tar
After you unpack the bundle you should see the following packages:
$ ls *.deb
libperconaserverclient20-dev_5.7.10-3-1.jessie_amd64.deb
libperconaserverclient20_5.7.10-3-1.jessie_amd64.deb
percona-server-5.7-dbg_5.7.10-3-1.jessie_amd64.deb
percona-server-client-5.7_5.7.10-3-1.jessie_amd64.deb
percona-server-common-5.7_5.7.10-3-1.jessie_amd64.deb
percona-server-server-5.7_5.7.10-3-1.jessie_amd64.deb
percona-server-source-5.7_5.7.10-3-1.jessie_amd64.deb
percona-server-test-5.7_5.7.10-3-1.jessie_amd64.deb
percona-server-tokudb-5.7_5.7.10-3-1.jessie_amd64.deb
Now you can install Percona Server by running:
$ sudo dpkg -i *.deb
This will install all the packages from the bundle. Another option is to download/specify only the packages you need for running Percona Server installation (libperconaserverclient20_5.7.10-3-1.jessie_amd64.deb, percona-server-client-5.7_5.7.10-3-1.jessie_amd64.deb, percona-server-common-5.7_5.7.10-3-1.jessie_amd64.deb, and percona-server-server-5.7_5.7.10-3-1.jessie_amd64.deb. Optionally you can install percona-server-tokudb-5.7_5.7.10-3-1.jessie_amd64.deb if you want TokuDB storage engine).
Note
Percona Server 5.7 comes with the TokuDB storage engine. You can find more information on how to install and enable the TokuDB storage in the TokuDB Installation guide.
Warning
When installing packages manually like this, you’ll need to make sure to resolve all the dependencies and install missing packages yourself. Following packages will need to be installed before you can manually install Percona Server: mysql-common, libjemalloc1, libaio1 and libmecab2

Running Percona Server

Percona Server stores the data files in /var/lib/mysql/ by default. You can find the configuration file that is used to manage Percona Server in /etc/mysql/my.cnf.
Note
Debian and Ubuntu installation doesn’t automatically create a special debian-sys-maint user which can be used by the control scripts to control the Percona Server mysqld and mysqld_safe services like it was the case with previous Percona Server versions. If you still require this user you’ll need to create it manually.
  1. Starting the service
    Percona Server is started automatically after it gets installed unless it encounters errors during the installation process. You can also manually start it by running:
    $ sudo service mysql start
    
  2. Confirming that service is running
    You can check the service status by running:
    $ service mysql status
    
  3. Stopping the service
    You can stop the service by running:
    $ sudo service mysql stop
    
  4. Restarting the service
    You can restart the service by running:
    $ sudo service mysql restart
    
Note
Debian 8.0 (jessie) and Ubuntu 15.04 (vivid) come with systemd as the default system and service manager so you can invoke all the above commands with sytemctl instead of service. Currently both are supported.

Uninstalling Percona Server

To uninstall Percona Server you’ll need to remove all the installed packages. Removing packages with apt-get remove will leave the configuration and data files. Removing the packages with apt-get purge will remove all the packages with configuration files and data files (all the databases). Depending on your needs you can choose which command better suits you.
  1. Stop the Percona Server service
    $ sudo service mysql stop
    
  2. Remove the packages
    1. Remove the packages. This will leave the data files (databases, tables, logs, configuration, etc.) behind. In case you don’t need them you’ll need to remove them manually.
    $ sudo apt-get remove percona-server*
    
    1. Purge the packages. NOTE: This will remove all the packages and delete all the data files (databases, tables, logs, etc.)
    $ sudo apt-get purge percona-server*
    

SUMBER / SOURCE

Tuesday, April 3, 2018

CARA INSTALL PRINTER HP DI LINUX MINT - Install HP Printer drivers in Ubuntu, Linux Mint, and elementary OS

Install HP Printer drivers in Ubuntu, Linux Mint, and elementary OS



HP Linux Imaging and Printing (HPLIP) is an HP-developed application for printing, scanning, and faxing with HP inkjet and laser based printers connected to Linux computers. The HPLIP  includes print, scan and fax support for 2594 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP.

Check if HPLIP is already installed

Most of recent Linux distros come preinstalled with a version of HPLIP, but it’s possible that you may not have latest one. It’s a good idea to first check if at all your PC already has the latest HPLIP installed or not.


Launch ‘Terminal’ and enter the following command in it.
dpkg -l hplip

Uninstall HPLIP

If this version is not the latest, you can simply uninstall it and install the latest version as described below. Even if you proceed without uninstalling, the HPLIP installer will prompt you that there is already a version available and you can then choose to remove the old and install the latest package. This command will remove HPLIP from your PC.
dpkg -r hplip
Before you start installing HPLIP, I suggest to confirm if your HP printer is compatible to this application. You can look up your exact HP model number compatibility at their official webpage.

Install HP Linux Imaging and Printing in Ubuntu, Linux Mint, and elementary OS

This guide will also serve as a reference for those who want to reinstall HP drivers due to corrupted programs and broken packages.
STEP 1: Go to official HP sourceforge webpage and download the HPLIP installer package. It should look something like hplip-3.16.11.run. Version number may be different in your case.
STEP 2: Go to ‘Applications’ or ‘Menu’ and launch ‘Terminal’.
STEP 3: I’m assuming that the downloaded hplip-3.16.11.run installer is in ‘Downloads’ directory. Navigate into it using cd command:
cd Downloads
HPLIP Installation
HPLIP Installation
STEP 4:  Use list command to see the contents of the ‘Downloads’ directory.
ls
STEP 5: Run the installer using sh command
sh hplip-3.16.11.run
STEP 6: Pay attention to ‘Terminal’ progress. Type ‘y’ and hit enter for automatic installation prompt followed by ‘a’.
STEP 7: It will confirm your current Linux distro. Enter ‘y’ and hit enter.
Linux Mint Terminal showing HPLIP installation
Linux Mint Terminal showing HPLIP installation
STEP 8: Enter your root password to continue installation.
STEP 9: Press enter to continue.
STEP 10: It will ask if would you like to have this installer install the hplip specific policy/profile. Type ‘y’ and continue.
STEP 11: In this step it will show you dependencies that are not installed. HPLIP will not work if all REQUIRED dependencies are not installed and some of the HPLIP features will not work if OPTIONAL dependencies are not installed. Go ahead and type ‘y’.
Terminal showing Dependencies of HPLIP
Terminal showing Dependencies of HPLIP
STEP 12: The installer will no automatically run dpkg command for each of the dependencies to download and install them. You need to have internet connection.
STEP 13: If your PC already has HPLIP installed, the installer will prompt you whether to remove and install or quit installation. If you are upgrading HPLIP or reinstalling HPLIP, you should continue to remove and install.
STEP 14: The installer will automatically compile the package for you and run the commands ‘./configure’ and ‘make’. You don’t need to do anything.
STEP 15: Enter ‘y’ when it prompts to keep HPLIP updated.
STEP 16: Printer drivers and imaging application should be complete by this stage. From next step onward, it’s more of connecting your computer to printer and get things working. Quitting any of below steps won’t break drivers and applications that are already installed.
STEP 15: Your HP printer must now be connected to your PC and switched ON to continue from here in GUI mode. Enter ‘u’ and continue in GUI mode.
STEP 16: Select Printer connection type.
Printer Connection Type
Printer Connection Type
STEP 17: Select the Printer to be configured.
STEP 18: Select the PPD file (or driver) to be used for your Printer. The PPD files which are nothing but drivers which are most similar to your printer are displayed. Select the appropriate PPD file for your printer.
STEP 19: Confirm the Printer Settings and finish the configuration process.
STEP 20: Click  ‘AddPrinter’ to complete the printer setup process.
This application is released by HP as free and open source software (FOSS). You won’t get a official support, but informal support is open in their launchpad website just in case if you happened to have any questions.

SOURCE / SUMBER

Wednesday, March 28, 2018

CARA INSTALL GOOGLE DRIVE DI LINUX MINT - How To mount and use your Googledrive in Linux Mint Cinnamon 18

How To mount and use your Googledrive in Linux Mint Cinnamon 18
and other on Ubuntu based Linux                                  TuX on Gdrive       

This short tutorial was created for Mint newcomers which own a Gmail account and have no idea how to access their Googledrive in Linux Mint.
It was made simple as possible, inspired by the detailed "How to mount Google Drive on Linux" -
all credits goes to Dan Nanni on Xmodulo.com and the developer Allessandro Strada

How To ...
Copy and paste following commands into your terminal,
without the   ~ $  or   #   and the following space,
f.e. for "~ $ sudo apt-get update"  - you just copy and paste   sudo apt-get update

Additional info for the newcomer: Terminal signs and their meaning:
~ $ = you are logged in as user - at your home directory (!)

 #  = you are logged in as root - (with the command pwd you can see, where you are) 

This manual was tested well under different circumstances on several Intel Machines, running Linux Mint 18 Cinnamon 64 bit (Sarah);Kernel 4.40-47 ; Cinnamon Version 3.0.7

Unfortunately this was neccessary because Sarah still lacks a client for Googledrive :-|

So here we are using a ppa, which is not an officially recommended way to add software because of possible security leaks.

If you can still live & sleep with this knowledge, like the author does very well, you can continue from here.
If you are one of these paranoid friends - you have to wait for a better solution -
but if you were paranoid - you would not use Google, don't ya ...

Here we go, don't worry it isn't any complicated,
just follow the instructions and clone the the actions as shown.


NOTE: You have to put your real username in the spaces where you see "username"

Open a terminal:

= username@yourcomputer ~ $
    (next:)
~ $ su
= Password:
(enter your [root] password and hit enter - note - there is no visual effect)
= YourComputer username #
    (next:)
 # apt-add-repository ppa:alessandro-strada/ppa
    (your action: confirm ; next:)
 # apt update
    (next:)
 # apt install google-drive-ocamlfuse
    (your action: confirm ; next:)
 # groupadd fuse
    (next:)
 # usermod -a -G fuse username
    (next:)
 # exit
    then close the terminal-window.
__  

Open a NEW terminal (with your username - not as root !)
= username@yourcomputer ~ $
    (next:)
~ $ exec su -l $USER
= Password:
(enter your password and hit enter - note - there is no visual effect)
    (next:)


At this point quit your browser - Firefox by default;
shut all windows _NOW_ (important!)

    (next:)
~ $ google-drive-ocamlfuse

    Now Firefox (by system default) will open up a window,
    asking you to log in to your Google account.
    Log in with your Google account with name and password.
    After logging in, Google is requesting for permission.
    Click on "Accept".
    Next you have to grant access to your Google account.
    Click on "Allow".
    Then you should see a message saying that google-drive-       ocamlfuse was
    successfully granted access.
    Important:
    Close the Firefox tab / window  NOW  - to finalize the    
procedure.
    After you will see this feedback in your terminal-window:

= Access token retrieved correctly.

    Now a mount point needs to be created,
    for that you can access to your Googledrive as a mounted volume,
    it will appear in the window of your "Files" manager
    (in Cinnamon = Nemo, by default):


~ $ mkdir ~/googledrive
    (no feedback; next:)
~ $ google-drive-ocamlfuse ~/googledrive
    (no feedback; next:)
~ $ mount
= a lot of feedback; the LAST line should look like this:
    "google-drive-ocamlfuse on /home/username/googledrive type fuse.google-drive-ocamlfuse
    (rw,nosuid,nodev,relatime,user_id=1001,group_id=1002)"
    (the handcrafting on the terminal is done for now, and so next:)

~ $ exit
___

Open your File Manager, for Cinnamon it is called "Files" News- the internal name is "Nemo"

Now you should see your "googledrive" - additional attached as a volume in your filemanger,
you can use it like an usual attached device, like an USB stick, f.e.
_
It will be available until you shutdown/restart your system.

If you wish to disconnect your googledrive manually, paste this command in a terminal:
~ $ fusermount -u ~/googledrive

If you wish to connect your googledrive manually, paste this command in a terminal:
~ $  google-drive-ocamlfuse ~/googledrive


 


 
A little comfort: Just double-click a file for mount / unmount :
Optional you can go ahead and create a simple mount
and a simple un-mount script on an easy way:
 
For mounting googledrive by your request:
  1. Create a new document with gedit.
  2. Paste in: google-drive-ocamlfuse ~/googledrive
  3. Safe as f.e: Mount Googledrive  on a certain destination, f.e. desktop
  4. Close gedit.
  5. Locate the file and right-click on it,
     choose properties;
  6. click on access-rights
  7. Mark the field "allow executing as application"
  8. Close the properties window
  9. Double-click your file
 10. Choose  execute  on upcoming window =
     googledrive becomes available / getting mounted
 
For UN-mounting googledrive by your request:
  1. Create a new document with gedit.
  2. Paste in: fusermount -u ~/googledrive
  3. Safe as f.e: Unmount Googledrive  on a certain destination, f.e. desktop
  4. Close gedit.
  5. Locate the file and right-click on it,
     choose properties;
  6. click on access-rights
  7. Mark the field "allow executing as application"
  8. Close the properties window
  9. Double-click your file
 10. Choose  execute  on upcoming window =

     googledrive gets disconnected / unmounted

Note: You can safe/move these both files to any destination
      inside your home directory you like


Note: Known Bug (moderate):
If you are using the 'scripts' from above -
make sure that you have only one Nemo window open -
otherwise the unmount command will fail.

News:
No more issues with Dropbox at the same time with GoogleDrive.


SOURCE / SUMBER