Thursday, June 22, 2017

How to install LAMPP on Ubuntu 17

Dear readers want to have LAMPP for work computer with Opensource Operating system, then the following steps can be used and tested.

Stages that must be passed by dear readers are:
1. Install LINUX 17.04
2. Install APACHE 2
3. Install MYSQL 5.7
4. Install PHP Version 7.1
5. Install PhpMyAdmin
Which has been configured and ready to use on Ubuntu 17.04 server (Zesty Zapus).

1. Installing Ubuntu Linux 17.04 (Zesty Zapus)
Ubuntu 17.04 (Zesty Zapus) is recommended for large size downloads.
2017-04-12 03:46  1.5G
Desktop image for 64-bit PC (AMD64)
computers (standard download)

New Ubuntu 17.10 (Artful Aardvark) on October 2017

Then prepare a small USB Flashdisk 4 GB and must be reformatted, as follows:
1. Plugin The USB Flashdisk
2. Login as root:        sudo -i       
3.      fdisk -l      (check the usb position in / dev / sdb or / dev / sdb or sdb2)
4.     umount /dev/sdb1             (off USB access)
5.     mkfs.vfat /dev/sdb1           (for USB format)
6.     mount /dev/sdb1                (on USB access)

Install the Tool for Unetbootin app (creating Live USB drives) to make ISO boot USB Installer Ubuntu 17.04 (Zesty Zapus), as follows:
1. Enable Ubuntu Software Center
or do the command line from
2. Search: Unetbootin then select INSTALL, wait and click LAUNCH
3. Distribution Content: Ubuntu and its version: 17.04_Live_x64
4. DiskImage Contents: ISO continue with click button .... to retrieve ISO file in folder / Download /
Space used to: 0
6. Type: USB Drive
7. Drive: F
8. Then select OK
9. Wait and USB Flashdisk finished ready to be used for installation of another PC with empty hard drive

Formatting and installing Ubuntu 17.04 (Zesty Zapus) on another computer with an empty hard drive, the software installation will be faster.
1. Insert USB
2. Computer ON
3. Then press CTRL + ALT + F12
4. Select USB or EUFI
5. Select Country and language, next dstnya
6. Enter the login access user name and password choose autologin if necessary!
7. Enter the root password
8. Wait until there is REBOOT command button
9. Finish Linux installation

Full Picture for tutorial installation UBuntu 17.10 (ArtfulAardvark)

For New Library or Repository:
         apt-get update && apt-get dist-upgrade && apt-get autoremove       

For activated the printers:
         apt-get install lsb                   

For activated ifconfig cli:
         apt-get install net-tools          

For activated unrar cli:
         apt-get install unrar                            
         mkdir imagegambar/                          

For Ubuntu version 17.10 the Unetbootin isn't working and you can install from Ubuntu Software MultiWriter. It's very ease, just click START COPYING and then search your ISO and begining writing.

2. Install Apache on Ubuntu 17.04 (Zesty Zapus)
First, install Apache first by logging in as root:
sudo -i                                     
apt-get update                        
apt-get install apache2      

Now we change a bit in configuration to fix the error.
        gedit /etc/apache2/apache2.conf        

If necessary, then can add ip_publik ServerName at the top of the file.
Then go to open in browser and type: http: // localhost / to make sure apache2 is active.

Enable Apache2
/etc/init.d/apache2 start          

Enable Networking
/etc/init.d/networking start      

3. How to install MySql 5.7 on Ubuntu
It uses Ubuntu 17.04 64-bit and will install MySql 5.7.
Fist downlaod Mysql Repository mysql-apt-config_0.8.6-1_all.deb or directly download.
Immediately from the terminal type the following command to add a new repository with root access stuff:
sudo -i (input root's password)                            
dpkg -i mysql-apt-config_0.8.6-1_all.deb
or install from uBuntu Software *.deb
apt-get update                                                        
        apt-get install mysql-server 
               and the type your root password: 
        mysql --version                                                        
        service mysql status                                               
        service mysql start                                                  
        apt-get update                                                          

It uses Ubuntu 17.04 64-bit and will install MariaDB. Immediately from the terminal type the following command to add a new repository with root access stuff:
sudo -i (input root's password)                                                    
       apt-get install software-properties-common             
       apt-key adv --recv-keys --keyserver hkp:// 0xF1656F24C74CD1D8                                                   
                add-apt-repository 'deb [arch=amd64,i386] zesty main'                  

Then we just execute the command to install MariaDB:
apt-get update
apt-get install mariadb-server mariadb-client           
systemctl status mysql.service

Later will appear on the screen as follows:
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
The following extra packages will be installed:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libmariadbclient18 libreadline5 libterm-readkey-perl mariadb-client-5.5
  mariadb-client-core-5.5 mariadb-common mariadb-server-5.5
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libplrpc-perl
  libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libmariadbclient18 libreadline5 libterm-readkey-perl mariadb-client-5.5
  mariadb-client-core-5.5 mariadb-common mariadb-server mariadb-server-5.5
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.6 MB of archives.
After this operation, 111 MB of additional disk space will be used.
Do you want to continue? [Y/n]

After this you can use it like MySQL because it is still compatible, the command - the command is still the same kok. In fact you type mysql in the shell will go to the database server. So no need to be confused when you are familiar with MySQL.

Basically apps in Linux use the same standard parameters to view their versions:
mysql -V                                

The result:
 Mysql Ver 15.1 Distrib 10.1.22-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Run and stop MariaDB
/etc/init.d/mysql stop                        
/etc/init.d/mysql start                        

/etc/init.d/apache2 start                  
       /etc/init.d/networking start             

Cara menghapus MariaDB hingga ke config:
    apt-get purge --auto-remove mariadb-server    

Sometimes we can not login to Mysql and always appear the error message the Plugin Mysql error 1524 unix socket not loaded then follow:
        /etc/init.d/mysql stop                               
        mysqld_safe --skip-grant-tables &         
        mysql -uroot                                              

This will completely stop mysql, bypass user authentication (no password needed) and connect to mysql with user "root".
Now, in mysql console, go using mysql administrative db:
        use mysql;                                                 

To reset root password to mynewpassword (change it at your wish), just to be sure of it:
     update user set password=PASSWORD("mynewpassword") where User='root';     

And this one will overwrite authentication method, remove the unix_socket request (and everything else), restoring a normal and working password method:
     update user set plugin="mysql_native_password";                                                        

Exit mysql console:

Stop and start everything related to mysql:
               /etc/init.d/mysql stop                 
               kill -9 $(pgrep mysql)               
               /etc/init.d/mysql start               

Don't forget to exit the su mode.

4. How to Install php7.1 on Ubuntu 17.04 (Zesty Zapus)
The first step is to activate the PPA repository published by Ondřej Surý.
sudo -i (input root's password)            
add-apt-repository ppa:ondrej/php          

Available PHP versions: PHP 5.6, PHP 7.0, PHP 7.1 and later. Not recommended for installing PHP 5.4, PHP 5.5 as it is not supported for security updates and repositories.
For more details about the PHP package please visit:

The second step, continue with installing PHP Version 7.1
     apt-get update                                 
     apt-get install php7.1                             

Install php7.1 modules
       apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached php7.1-imagick php7.1-mcrypt php7.1-xml php7.1-odbc php7.1-soap php7.1-zip php7.1-bcmath php7.0-bcmath

Next step if you want to see the PHP version. If you have installed php7.1-cli, use the command
php -v                                                           

The result:
 PHP 7.1.6 ~ ubuntu17.04.1 + + 1 (cli)
 Copyright (c) 1997-2016 The PHP Group
 Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
 With Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Dear reader for the latest version of Ubuntu 17.04 is a little different in the installation of old scripts that we have created.

This script is usually placed in the folder / var / www / html / imagegambar / folder and is easily accessible through the browser by typing localhost / imagegambar / index.php, then the browser directly displays the main menu or enter the user and password access to the existing System But how Access folder through browser? If it remains accessible via c, then the browser will appear:
  Not found                                     
The requested URL /imagegambar/index.php was not found on this server.      
Apache / 2.4.25 (Ubuntu) Server on localhost Port 80                                           

How do I access all the existing scripts?
The first way: Create a new folder, copy all the scripts and grant permissions.
sudo -i                                                                    
cd /usr/share/                                                        
mkdir imagegambar                                             
cp /home/imagegambar/Documents/imagegambar   imagegambar /      
chmod -Rf 777 imagegambar/                             

The second way: create configure file in apache.
cd /etc/apache2/conf-available /
gedit imagegambar.conf
  Alias ​​/ imagegambar / usr / share / imagegambar /

<Directory "/ usr / share / javascript /">
Options FollowSymLinks MultiViews
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
AllowOverride All
</ Directory>
Then save the file.

The third way: copy imagegambar.conf to the apache activation folder.
cp imagegambar.conf   /etc/apache2/conf-enabled/   
/etc/init.d/apache2 restart                                             
/etc/init.d/mysql restart                                                 
/etc/init.d/networking restart                                        

The fourth way: open the browser and type localhostnya.

Or it can create browser access by creating a phpinfo.php file:
   gedit /usr/share/imagegambar/phpinfo.php                              
            <?php $script_tz = date_default_timezone_get(); date_default_timezone_set($script_tz);
$today = date("l") .", ". date("d-M-Y h:i:sa");
echo "<p align=\"center\">Time zone: ".$script_tz." Today: ".$today."</p>"; $imagegambar=100; echo "<p align=\"center\">Test Nilai= ".$imagegambar."</p>"; echo "<p align=\"center\">Test Perkalian 2 x 333 = ".bcmul(2,333)."</p>"; echo "<p align=\"center\">Test Nilai= ".$imagegambar."</p>"; phpinfo(); ?>
Then save

Access via browser: http: //localhost/phpinfo.php
If it does not appear in the browser screen, then do:
/etc/init.d/apache2 restart                                           
/etc/init.d/mysql restart                                               
/etc/init.d/networking restart                                      
Then do the access again through the browser: http: //localhost/phpinfo.php

5. How to Install and Protect phpMyAdmin on Ubuntu 17.04 (Zesty Zapus)

Lots of users need database management system functions like MySQL, they may not feel comfortable interacting with the system only from the MySQL prompt.

PhpMyAdmin was created so that users can interact with MySQL via the web interface. In this guide, we will discuss how to install and secure phpMyAdmin so you can use it safely to manage your databases from the Ubuntu 17.04 system.
To get started, we can directly install phpMyAdmin from the default Ubuntu repository.

We can do this by updating our local packet index and then using the appropriate packaging system to pull down the file and install it on our system:
sudo -i (input root's password)                                          
apt-get update                                                                           
apt-get install phpmyadmin php-mbstring php-gettext  

For server selection and Budiman Reader select apache2.
Select yes when asked whether to use dbconfig-common to set the database.
It will then be prompted to enter the database administrator password and continue with the password confirmation for the phpMyAdmin application itself.
The installation process actually adds the Apache phpMyAdmin configuration file to the / etc / apache2 / conf-enabled / directory, which is automatically read.

The only thing we need to do is explicitly enable mcrypt PHP and mbstring extensions, which we can do by typing:
phpenmod mcrypt                         
phpenmod mbstring                     

We will edit related files that have been placed in our Apache configuration directory:
gedit /etc/apache2/conf-available/phpmyadmin.conf   
 Then add one AllowOverride All command line below the post
      <Directory / usr / share / phpmyadmin>
      Options FollowSymLinks
      DirectoryIndex index.php
      AllowOverride All
       . . .

To enable Phpmyadmin type in terminal:
  systemctl restart apache2                      

Continue by opening it in the browser:
Isi Username: phpmyadmin and the password: imagegambar

Sometimes we can't login root on phpmyadmin and the warnings message like:
       Login without a password is forbidden by configuration (see AllowNoPassword)          
      #1045 - Access denied for user 'root'@'localhost' (using password: YES)                      
      mysqli_real_connect(): (HY000/1045):                                                                            
      Access denied for user 'root'@'localhost' (using password: YES)                                   

And so dear reader, you reconfigure Mysql Server for change your password or make new password on Ubuntu 17.04 following like these.
sudo -i (masukkan password root)                                          
apt-get update                                                                           

Attention Please and read carefully for answers all the questions when you change on Mysql Server!
Change the root password? [Y/n] y                                        
          New password: imagegambar
          Re-enter new password: imagegambar
          Password updated successfully!
          Reloading privilege tables..
           ... Success!
Remove anonymous users? [Y/n] n                                        
           ... skipping.

Disallow root login remotely? [Y/n] n                                    
           ... skipping.

Remove test database and access to it? [Y/n] n                    
           ... skipping.

Reload privilege tables now? [Y/n] Y                    
           ... Success!
           Cleaning up...
           All done!  If you've completed all of the above steps, your MariaDB
            installation should now be secure.
           Thanks for using MariaDB!

mysql -u root -p                    
           Enter password: imagegambar
           Welcome to the MariaDB monitor.  Commands end with ; or \g.
           Your MariaDB connection id is 33
           Server version: 10.1.22-MariaDB- Ubuntu 17.04

           SELECT User,Host FROM mysql.user;
           |        User        |     Host    |
           | phpmyadmin | localhost |
           | root                | localhost |

Cli for remove all phpmyadmin:
     apt-get purge phpmyadmin  

Finally, now dear reader has  LAMPP:
4. PHP
5. PhpMyAdmin
Which has been configured and ready to use on Ubuntu 17.04 server (Zesty Zapus).

By using this LAMPP interface, it can easily create scripts, databases, users, tables, multiuser applications and perform data manipulation operations, table structure and scripts with ease.

Download free PDF CLI Command to install Linux, Apache, MySQL, and PHP (LAMPP) on Ubuntu 17.04

How to activate the command ifconfig:
        apt-get -y install net-tools      
        apt-get update                       

How to make faster when booting in begining:
           gedit /etc/default/grub        
           Change the value from 10 to GRUB_TIMEOUT=2           



Cara Instal Kdevelop

Pembaca budiman yang terbiasa menggunakan Kdevelop sebagai text editor untuk membuat atau membaca semua script yang dibuat. Berikut ini cara...