• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install LAMP on Popos

{{postValue.id}}

To Install LAMP on PopOS

LAMP Stands for Linux, Apache, MySQL, MariaDB, MongoDB, PHP, PERL, PYTHON, PhpMyAdmin. LAMP is a server configuration for various web applications. It helps in running servers and dynamic websites. It is a web development platform that uses Linux operating system, Apache web server, MySQL relational database management system and PHP scripting language.

Installation

First, let' s install the Apache using the following command.

[email protected]:~# apt-get install apache2 -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 8 newly installed, 0 to remove and 150 not upgraded.
Need to get 1,503 kB of archives.
After this operation, 6,175 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu artful/main amd64 libapr1 amd64 1.6.2-1 [90.9 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1 amd64 1.6.0-2 [84.2 kB]

.
.
.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service ? /lib/systemd/system/apache-htcacheclean.service.
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (234-2ubuntu12.1) ...
Processing triggers for ufw (0.35-5) ...

Start and enable the Apache web server as follows.

[email protected]:~# systemctl start apache2
[email protected]:~# systemctl enable apache2
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2


After installing you can verify the Apache web server by navigating to the following URL http://localhost If you see the following page, Apache has been successfully installed on your machine.

apache_page

After installing Apache web server we are going to install MariaDB database as follows.

[email protected]:~# apt-get install mariadb-server mariadb-client -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  galera-3 gawk libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libjemalloc1 libmysqlclient20
  libsigsegv2 libterm-readkey-perl mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common
  mariadb-server-10.1 mariadb-server-core-10.1 mysql-common socat
Suggested packages:
  gawk-doc libmldbm-perl libnet-daemon-perl libsql-statement-perl libipc-sharedcache-perl mailx mariadb-test
  tinyca
The following NEW packages will be installed:
  galera-3 gawk libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libjemalloc1 libmysqlclient20
  libsigsegv2 libterm-readkey-perl mariadb-client mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common
  mariadb-server mariadb-server-10.1 mariadb-server-core-10.1 mysql-common socat
0 upgraded, 19 newly installed, 0 to remove and 150 not upgraded.
Need to get 25.2 MB of archives.
After this operation, 191 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu artful/main amd64 libsigsegv2 amd64 2.11-1 [13.2 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu artful/main amd64 gawk amd64 1:4.1.4+dfsg-1 [401 kB]
.
.
.
Setting up mariadb-server (10.1.30-0ubuntu0.17.10.1) ...
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (234-2ubuntu12.1) ...

Start and enable MariaDB service as follows.

[email protected]:~# systemctl start mariadb &  systemctl enable mariadb

Next, secure the database by executing mysql_secure_installation.

[email protected]:~# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we' ll need the current
password for the root user.  If you' ve just installed MariaDB, and
you haven' t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
 ... Success!

Normally, root should only be allowed to connect from ' localhost' .  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 ... Success!

By default, MariaDB comes with a database named ' test'  that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 ... 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!
[1]+  Done                    systemctl start mariadb

To verify the functionality of Maria DB database login as follows.

[email protected]:~# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with   or g.
Your MariaDB connection id is 10
Server version: 10.1.30-MariaDB-0ubuntu0.17.10.1 Ubuntu 17.10

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.

MariaDB [(none)]> 
MariaDB [(none)]> 
MariaDB [(none)]>  exit
Bye

After installing MariaDB database, we are going to install PHP as follows

[email protected]:~# apt-get install php php-mysql -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libapache2-mod-php7.1 php-common php7.1 php7.1-cli php7.1-common php7.1-json php7.1-mysql php7.1-opcache
  php7.1-readline
Suggested packages:
  php-pear
The following NEW packages will be installed:
  libapache2-mod-php7.1 php php-common php-mysql php7.1 php7.1-cli php7.1-common php7.1-json php7.1-mysql
  php7.1-opcache php7.1-readline
0 upgraded, 11 newly installed, 0 to remove and 150 not upgraded.
Need to get 3,785 kB of archives.
After this operation, 15.0 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu artful/main amd64 php-common all 1:54ubuntu1 [12.1 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 php7.1-common amd64 7.1.15-0ubuntu0.17.10.1 [839 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu artful-updates/main amd64 php7.1-json amd64 7.1.15-0ubuntu0.17.10.1 [17.5 kB]
.
.
.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.1
Setting up php7.1 (7.1.15-0ubuntu0.17.10.1) ...
Setting up php (1:7.1+54ubuntu1) ...

Let' s test the PHP installation using the following method.

[email protected]:~# nano /var/www/html/phpinfo.php
< ?php
phpinfo() 
?> 

Now restart apache web server to make the changes effect.

[email protected]:~# systemctl restart apache2

After installing you can verify the PHP by navigating to the following URL http://localhost/phpinfo.php If you see the following page, PHP has been successfully installed on your machine.

browser_URL

With this, the method to install lamp stack on pop OS comes to an end

Tags:
cameron
Author: 

Comments ( 1 )

jhonypilcomamani
como instalo la vercion de php 7.3 en popos
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Is there a single command for LAMP installation ?

A

Yes There is ! But Not for openBSD

Q

I have mariadb installed already shall I skip mysql installation

A

Yes you can skip the installation.

Q

how to exit from DB?

A

simply type exit or quit and press enter

Q

Why does we require php my admin?

A

In order to monitor the Database through graphical interface

Q

How do you see the PHP info?

A

The file contains the PHP code that displays the PHP information that installed

Back To Top!
Rank
User
Points

Top Contributers

1
userNamelinuxhelp
30390

Top Contributers

userNamepaniisongsri
15190

Top Contributers

2
userNamejackson
8070

Top Contributers

3
userNamegabriel
3370

Top Contributers

4
userNamemason
3175
Can you help Charles Maynes ?
How To Succeed In Video Production?

Are you a business owner who's looking to up your game in the video production department? Or perhaps you're a freelancer who wants to increase their client base and make more money by offering video production services. As stated by corporate video production agency, there are certain things you can do to make sure that your venture is successful.

Here are some of the top ways to succeed in video production:

1) Get a mentor. Whether you're new to the field or have been around for awhile, having a mentor can be invaluable. They'll help guide you through the process and give you advice on what works best for them so that you can use those same tactics for yourself.

2) Invest in high-quality gear. If you're going to be producing videos for clients, then it's essential that they look good from start to finish—and that means investing in high-quality equipment that will produce high-quality results every time!

3) Create an eye-catching website with lots of information about what services you offer (and why people should hire YOU). The more information you provide online about what kind of work experience/background knowledge/skill set etc., etc., etc.,

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2022 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.