Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Friday, September 16, 2016

Installing phpMyAdmin in Ubuntu 16.04

Installing phpMyAdmin in Ubuntu 16.04


phpMyAdmin is an open source tool used for the administration/management of MySQL or MariaDB with the use of a web browser. In addition to offering the capability to perform administration tasks such as creating, editing, or deleting databases, and managing users and permissions, phpMyAdmin provides a graphical user interface to do all of these tasks and more. Here, we are going to see how to install, up and run phpMyAdmin on Ubuntu 16.04.

Install phpMyAdmin

Before you start installing phpmyadmin, install PHP, apache and MySql or similar Db..

Then.. Run following command .. to install phpMyadmin on your Ubuntu installation...

sudo apt -y update && sudo apt install phpmyadmin

Continue with typing Y once the installation prompts you with Do you want to continue [Y/n]? Like in the image below.


Now we are prompted with dialog selecting our web server, in our case we are selecting apache2 like shown below.


Select <Yes> as we just want a basic installation like shown below.


Now provide a password for phpMyAdmin to use. So that it can register with the MySQL database itself. (Need not to be the same as the MySQL root user)


Enter in the phpMyAdmin password you created in last step to confirm it as follows.


phpMyAdmin is now installed, but, still we have a few more things to do.

Testing phpMyAdmin

Now we will test phpMyAdmin! Open your favorite Web Browser..
and Navigate to http://localhost/phpmyadmin/

If you end up with a page that looks like one shown below... means, phpMyadmin was installed successfully on your system..


Now lets login, the default username for phpMyAdmin is root and the password is what you have entered while installing phpMyadmin... Enter as follows.

Username: root

Password: What you selected earlier

Select Go to login.

When you log in, you'll see the user interface, which will look something like this:


Hi friends, If you found any issue or typo error, please feel free to report it.. You can report it on our Facebook Page via message (www.fb.com/opensourceinside) .

Sunday, July 3, 2016

How To Install PHP on Linux

How To Install PHP on Linux


PHP is one of the popular opensource server side scripting language mostly used in web development. PHP originally stood for "Personal Home Page", but it now stands for the recursive backronym PHP: Hypertext Preprocessor.
Today I'm going to show you how to install PHP on Linux

First things first, You need to install apache web server first.. Because often we use PHP incombination with Apache.. See, How To Install Apache On Different Linux Distros...

After installing the Apache web server successfully... start to install PHP..

Installing PHP On Ubuntu

Following command will install PHP and libapache2-mod-php5, php5-mcrypt modules.. which are useful for web developers..

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql

Or, On Newer systems (Ubuntu 16.04 and later versions..)

sudo apt install php libapache2-mod-php php-mcrypt php-mysql

PHP has a variety of useful libraries and modules that you can add onto your virtual server. You can see the libraries that are available.

Run, apt-cache search php- (For Ubuntu 16.04) or apt-cache search php5- (For Ubuntu 14.04) to see the list of possible/available modules.

shivaraj@shivaraj-A14RM0E:~$ apt-cache search php5- php5-cgi - server-side, HTML-embedded scripting language (CGI binary) php5-cli - command-line interpreter for the php5 scripting language php5-common - Common files for packages built from the php5 source php5-curl - CURL module for php5 php5-dbg - Debug symbols for PHP5 php5-dev - Files for PHP5 module development php5-gd - GD module for php5 php5-gmp - GMP module for php5 php5-json - JSON module for php5 php5-ldap - LDAP module for php5 php5-mysql - MySQL module for php5 php5-odbc - ODBC module for php5 php5-pgsql - PostgreSQL module for php5 php5-pspell - pspell module for php5 php5-readline - Readline module for php5 php5-recode - recode module for php5 php5-snmp - SNMP module for php5 php5-sqlite - SQLite module for php5 php5-tidy - tidy module for php5 php5-xmlrpc - XML-RPC module for php5 php5-xsl - XSL module for php5 libphp5-embed - HTML-embedded scripting language (Embedded SAPI library) php5-adodb - Extension optimising the ADOdb database abstraction library php5-apcu - APC User Cache for PHP 5 php5-enchant - Enchant module for php5 php5-exactimage - fast image manipulation library (PHP bindings) php5-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php5-gdcm - Grassroots DICOM PHP5 bindings php5-gearman - PHP wrapper to libgearman php5-geoip - GeoIP module for php5 php5-gnupg - wrapper around the gpgme library php5-imagick - ImageMagick module for php5 php5-imap - IMAP module for php5 php5-interbase - interbase/firebird module for php5 php5-intl - internationalisation module for php5 php5-lasso - Library for Liberty Alliance and SAML protocols - PHP 5 bindings php5-librdf - PHP5 language bindings for the Redland RDF library php5-mapscript - php5-cgi module for MapServer php5-mcrypt - MCrypt module for php5 php5-memcache - memcache extension module for PHP5 php5-memcached - memcached extension module for PHP5, uses libmemcached php5-midgard2 - Midgard2 Content Repository - PHP5 language bindings and module php5-ming - Ming module for php5 php5-mongo - MongoDB database driver php5-msgpack - PHP extension for interfacing with MessagePack php5-mysqlnd - MySQL module for php5 (Native Driver) php5-mysqlnd-ms - MySQL replication and load balancing module for PHP php5-oauth - OAuth 1.0 consumer and provider extension php5-pinba - Pinba module for PHP 5 php5-ps - ps module for PHP 5 php5-radius - PECL radius module for PHP 5 php5-redis - PHP extension for interfacing with Redis php5-remctl - PECL module for Kerberos-authenticated command execution php5-rrd - PHP bindings to rrd tool system php5-sasl - Cyrus SASL Extension php5-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP 5 php5-svn - PHP Bindings for the Subversion Revision control system php5-sybase - Sybase / MS SQL Server module for php5 php5-tokyo-tyrant - PHP interface to Tokyo Cabinet's network interface, Tokyo Tyrant php5-vtkgdcm - Grassroots DICOM VTK PHP bindings php5-xcache - Fast, stable PHP opcode cacher php5-xdebug - Xdebug Module for PHP 5 php5-xhprof - Hierarchical Profiler for PHP5 shivaraj@shivaraj-A14RM0E:~$

If you would like to install one of the available modules.. Run command like one shown below..

sudo apt-get install name_of_the_module

or

sudo apt install name_of_the_module

Installing PHP On CentOS, RHEL and Fedora Linux

For Fedora 22 and later versions..

sudo dnf -y install php php-mysql

For CentOS, RHEL, Fedora 21 and earlier..

sudo yum -y install php php-mysql

To list available modules for PHP, Run the following command..

dnf search php-

Or (For CentOS, RHEL and older Fedora systems..)

yum search php-

If you would like to install one of the available modules.. Run command like one shown below..

sudo dnf name_of_the_module

or

sudo yum name_of_the_module

Installing PHP On Arch Linux

First, make sure that your Arch Linux System is up-to-date by running following command

sudo pacman -Syu

Now Install PHP with following command..

sudo pacman -S php

Installing PHP On SUSE Linux

Run following command to install PHP on SUSE Linux..

sudo zypper install php5 apache2-mod_php5

Installing PHP On Gentoo Linux

Run the following command to ensure that your Gentoo Linux System is up-to-date..

sudo emerge --sync && sudo emerge --update world

Now run the following command to install PHP on Gentoo..

sudo emerge -pv php

That's it..


Saturday, July 2, 2016

How To Install Apache Web Server On Linux

How To Install
Apache Web Server
On Linux



Apache is an open source Web server developed by a loosely-knit group of programmers released under Apache License. The first version of Apache, based on the NCSA httpd Web server, was developed in 1995.

The original version of Apache was written for UNIX, but there are now versions that run under OS/2, Windows and other platforms.
According to wikipedia and FAQ, The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. A common misunderstanding is that it was called Apache because it was developed from existing NCSA code plus various patches, hence the name a patchy server, or Apache server.

Apache Web Servers are often used in combination with the MySQL database engine, the HyperText Preprocessor (PHP) scripting language, and other popular scripting languages such as Python and Perl. This configuration is termed LAMP (Linux, Apache, MySQL and Perl/Python/PHP) and forms a powerful and robust platform for the development and deployment of Web-based applications.

Here, I'm going to show you how to install Apache web server on different Linux systems..

Install Apache Web Server On Ubuntu Linux

Open terminal and run the following command..

sudo apt-get install apache2

Or, On Newer systems (Ubuntu 16.04 and later versions..)

sudo apt install apache2

You can find information about configuring Apache webserver on Ubuntu wikipage

Install Apache Web Server On CentOS, RHEL and Fedora Linux

For Fedora 22 and Later Releases..

sudo dnf -y install httpd

For CentOS, RHEL, Fedora 21 and earlier versions..

sudo yum -y install httpd

Install Apache Web Server on Arch Linux

First, make sure that your Arch Linux System is up-to-date by running following command

sudo pacman -Syu

Now Install Apache web server..

sudo pacman -S apache

Install Apache Web Server on SUSE Linux

sudo zypper install apache2

Install Apache Web Server on Gentoo Linux

Run the following command to ensure that your Gentoo Linux System is up-to-date..

sudo emerge --sync && sudo emerge --update world

Now run the following command to install apache on Gentoo..

sudo emerge -pv apache

Enabling/starting and testing the apache installation..

Enable the httpd service to start automatically on every reboot and start the service with systemd ...

sudo systemctl enable httpd && sudo systemctl start httpd

After successful installation of Apache web server check whether it's working properly or not.. To do so.. Just visit localhost in your web browser. You should see an Apache Test Page, like one shown in following image...