How to Install LAMP on Ubuntu

LAMP is an open source Web development platform that uses Linux as the operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.

1. Update your system

First we are making sure you are up to date by running:

~$ sudo apt-get update -y && sudo apt-get upgrade -y

2. Installing Apache2

Now that we have the L in place, it’s time to install the A.

~$ sudo apt-get install apache2

You can verify if that worked by entering your server’s IP into a browser, you should see something along those lines:

 

3. Installing MySQL

~$ sudo apt-get install mysql-server

During the installation, you will be prompted to enter the MySQL root password. Make sure to write that down.

Now we are also going to secure our installation:

~$ sudo mysql_secure_installation

Enter the root password you entered before.

Now you get asked a couple of questions, answer as below:

Enter current password for root (enter for none): Enter your root password

Would you like to setup VALIDATE PASSWORD plugin? N

Change the password for root? [Y/n] N

Remove anonymous users? [Y/n] {ENTER}

Disallow root login remotely? [Y/n] {ENTER}

Remove test database and access to it? [Y/n] {ENTER}

Reload privilege tables now? [Y/n] {ENTER}

That’s it. Let’s continue with PHP.

 4. Installing PHP

And last but not least, the P.

For PHP we need to install slightly more, PHP with all it’s dependencies:

~$ sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-intl php-pear php-imagick php-imap php-mcrypt php-memcache php-pspell php-recode php-sqlite3 php-tidy php-xmlrpc php-xsl php-mbstring php-gettext

Let’s restart apache2:

~$ sudo /etc/init.d/apache2 restart

5. Testing the configuration and wrapping up

To test your configuration, we first need to create the phpinfo.php file.

~$ sudo nano /var/www/html/phpinfo.php

Paste the following text into it:

<?php phpinfo(); ?>

Save with CTRL+O and exit with CTRL+X.

If you  now open http://YOURSERVERIP/phpinfo.php in your web browser, you should see the PHP configuration page:

 

Congradulation!

How to Install PostgreSQL on Ubuntu Server 16.04 and Manage

What does PostgreSQL mean?

PostgreSQL is an open-source, object-relational database management system (ORDBMS) that is not owned or controlled by one company or individual. Because PostgreSQL software is open-source, it is managed mostly through a coordinated online effort by an active global community of developers, enthusiasts and other volunteers.

First released in the mid-1990s, postgresSQL is written in C. Its primary competitors include Oracle DB, SQL Server and MySQL.

This term is also known as Postgres.

Installation:

First, let us update the system:

~$ sudo apt-get update && sudo apt-get upgrade

Install PostgreSQL from the Ubuntu package repository:

~$ sudo apt-get install postgresql postgresql-contrib

Change Postgres Linux user’s password
~$ sudo passwd postgres
 To enable remote access you will need to edit two files:
/etc/postgresql/9.5/main/pg_hba.conf
/etc/postgresql/9.5/main/postgresql.conf (9.5 is the version number so it can be various)
~$ sudo nano /etc/postgresql/9.5/main/pg_hba.conf
 Find the below
# IPv4 local connections:
host all all 127.0.0.1/32 md5
and change it as below
# IPv4 local connections:
host all all 0.0.0.0/0 md5
and for second file:
~$ sudo nano /etc/postgresql/9.5/main/postgresql.conf
# listen_addresses=’localhost’ to
listen_addresses=’*’

Switching Over to the postgres Account

The installation procedure created a user account called postgres that is associated with the default Postgres role. In order to use Postgres, we can log into that account.

Switch over to the postgres account on your server by typing:

~$ sudo -i -u postgres
be below command:
~$ psql

You will be logged in and able to interact with the database management system right away.

~$ postgres=#
 Exit out of the PostgreSQL prompt by typing: \q
~$ postgres=# \q
To change the password for a user type below
~$ postgres=# ALTER USER [user_name] with PASSWORD [password];
 Creating a user
~$ sudo -u postgres createuser [user_name]
Create a database
~$ sudo -u postgres createdb [db_name]
Granting a user on a database
~$ postgres=# grant all privileges on database [db_name] to [user_name];

DBeaver – Open source SQL Editor

DBeaver is an open source universal database tool for developers and database administrators that has a low memory footprint. It supports JDBC compliant databases such as MySQL, Oracle, IBM DB2, PostgreSQL, SQL Server, Firebird, SQLite, and Sybase. Its main features include the ability to browse and edit databases, create and execute SQL scripts, export data, transaction management and ER diagrams. Additionally, DBeaver’s functionality can be extended by the use of plugins.

dbeaver

Main page : http://dbeaver.jkiss.org/

You can check other alternatives as DataGrip and Navicat.

WPS Office for Linux – Community Edition

wpsOffice

WPS Office (an acronym for Writer, Presentation and Spreadsheets, previously known as Kingsoft Office) is an office suite for Microsoft Windows, Linux, iOS and Android OS, developed by Zhuhai-based Chinese software developer Kingsoft. WPS Office is a suite of software which is made up of three primary components: WPS Writer, WPS Presentation, and WPS Spreadsheet.wps

The personal basic version is free to use, but a watermark is printed on all printed output after the 30 day trial ends. A fully featured professional-grade version is also available for a subscription fee. The current version of WPS Office is WPS Office 10.

The product has had a long history of development and success in China under the name “WPS” and “WPS Office”. For a time, Kingsoft branded the suite under the “KSOffice” brand in an attempt to gain a foothold in international markets, but has since returned to “WPS Office”. Since WPS Office 2005, the user interface is similar to that of Microsoft Office products, and supports Microsoft document formats besides native Kingsoft formats.

wps-excel

Download Link–> http://wps-community.org/download.html

How To Install Apache2, MySQL, PHP5 on Ubuntu

apach2php5mysql

Apache is the most commonly used Web server on Linux systems. To install apache, open terminal and type in this command:

sudo apt-get install apache2

then
sudo nano /etc/apache2/apache2.conf
add this at the bottom of page –>  ServerName localhost

To install MySQL, open terminal and type in this command:
sudo apt-get install mysql-server php5-mysql

To install PHP, open terminal and type in this command:
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

It may also be useful to add php to the directory index, to serve the relevant php index files:
sudo nano /etc/apache2/mods-enabled/dir.conf

Change this section as like below one.
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
You can run PHP5 scripts from command line. To run PHP5 scripts from command line you should install php5-cli package with this command: sudo apt-get install php5-cli

Restart apache so that all of the changes take effect:

sudo service apache2 restart

create a new file with this command :

sudo nano /var/www/index.php

and this lines:

<?php

phpinfo();

?>

save it with Ctrl + X and Y.

Then type localhost on your browser.