In this article, we have seen how our support engineers install Apache, MariaDB, PHP, and phpMyAdmin in Ubuntu 18.04 server. Now, we can log in to phpMyAdmin using the admin user. MariaDB > GRANT ALL PRIVILEGES ON *.* TO WITH GRANT OPTION To create a new user, login into MariaDB using the following command: We need to create a new user and grant all privileges to that user. Once everything installed, you can now restart the apache2 service to effect the recent changes. Next, enter the password for the MySQL/MariaDB administrative user so the installer can create a database for phpmyadmin. Through the package installation process, you will be asked to choose the web server that should be automatically configured to run phpMyAdmin, select apache by pressing the space bar and press Enter. You can install phpMyAdmin for administrating MySQL/MariaDB databases from the comfort of a web browser using the following command: Now, let’s access it from the web browser: # echo “” | sudo tee /var/www/html/info.php Once PHP installed, for testing purpose, create a simple info.php page using following command: # apt install php php-common php-mysql php-gd php-cli -y Here we are installing the default PHP version 7.2 and other modules for web deployments using the following command: Remove test database and access to it? : y Then enter yes/y to the following security questions: Most Debian and Ubuntu versions include a phpMyAdmin package, but be aware that the configuration file is maintained in /etc/phpmyadmin and may differ in some ways from the official phpMyAdmin documentation. It will ask you to enter the current password for root (enter for none): Once the script gets executed, it will ask multiple questions. Let’s secured the installation using the following command: The default configuration of the MariaDB will not be secured. # apt install mariadb-server mariadb-client -y Now, let’s verify the Apache installation. In case, you enabled firewall and firewall block requests of the apache web server, open a port in the firewall. It is known as LAMP and installs on the Linux system environment. Restart Apache again and test if everything works.In this article, we will learn to install Apache, MariaDB, PHP, and PHPMyAdmin in Ubuntu 18.04 server.Īpache, MySQL/MariaDB, and PHP are composed of packages. This process adds phpmyadmin to /etc/apache2/conf-enabled/, you can verify it with: ls /etc/apache2/conf-enabled/Įnable PHP mcrypt and mbstring: sudo phpenmod mcrypt Install phpmyadmin: sudo apt install phpmyadmin php-mbstring php-gettextĭuring the installation you will be asked to choose your web server (apache2) and if you want to use dbconfig-common to configure the db, finally the password for phpmyadmin will be requested. Now go to and you should see something like the image below: Test if PHP works, create an info.php: sudo nano /var/www/html/info.php Restart Apache and check its status: sudo systemctl restart apache2Īfter this step if you want to install PHP modules, you can search for them using: apt-cache search php- | less Install PHP: sudo apt install php libapache2-mod-php php-mcrypt php-mysqlĮdit the file /etc/apache2/mods-enabled/dir.conf, after editing it should look like this:ĭirectoryIndex index.php index.html index.cgi index.xhtml index.htm Secure your MySQL installation executing: sudo mysql_secure_installationĬhoose the options that you prefer in this step. Install MySQL: sudo apt install mysql-serverĭuring this installation you will be asked to enter the MySQL password. Verify if Apache is working, open you browser and go to: you should see somehing like the following image: Restart Apache to implement changes: sudo systemctl restart apache2 The output should be like this: Syntax OK In Ubuntu 16.04.3 LTS you can follow these steps to install Apache2, MySQL, PHP7 and phpmyadmin, I tested this today and it shouln't give you any kind of problems, maybe you missed one of these steps, so please check them out:Įdit the file /etc/apache2/nf, add the following line at the end: ServerName Ĭheck if your config is OK: sudo apache2ctl configtest
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |