Select Yes when asked whether to use dbconfig-common to set up the database.For the server selection, choose apache2.Hit SPACE, TAB, and then ENTER to select Apache. If you do not hit SPACE to select Apache, the installer will not move the necessary files during installation. Warning: When the prompt appears, “apache2” is highlighted, but not selected. This will ask you a few questions in order to configure your installation correctly. Sudo apt install phpmyadmin php-mbstring php-gettext ![]() This is done by updating your server’s package index and then using the apt packaging system to pull down the files and install them on your system: We will install phpMyAdmin from the default Ubuntu repositories. The last step will be restarting apache2 service Next step will be enabling your new added configs Sudo nano /etc/apache2/sites-available/ your_nfĬustomLog $/access.log combinedĪlso don't forget to create a domain directory in /var/www/ Do this by typing this:Ĭreate a Domain file using command below: Or add yours sudo apt install php-Īfter this, restart the Apache web server in order for your changes to be recognized. Confirm the save by typing Y and then hit ENTER to verify the file save location.Īlso you can install some common used php packages When you are finished, save and close the file by pressing CTRL+X. Remove everything and update with this codeĭirectoryIndex index.php index.html index.cgi index.xhtml index.htm ![]() Sudo nano /etc/apache2/mods-enabled/dir.conf We want to tell the web server to prefer PHP files over others, so make Apache look for an index.php file first. This should install PHP without any problems.Ĭurrently, if a user requests a directory from the server, Apache will first look for a file called index.html. Sudo apt install php libapache2-mod-php php-mysql Then, run FLUSH PRIVILEGES which tells the server to reload the grant tables and put your new changes into effect:Īt this point, your database system is now set up and you can move on to installing PHP, the final component of the LAMP stack. Be sure to change password to a strong password of your choosing:ĪLTER USER IDENTIFIED WITH mysql_native_password BY 'password' To configure the root account to authenticate with a password, run the following ALTER USER command. SELECT user,authentication_string,plugin,host FROM er Next, check which authentication method each of your MySQL user accounts use with the following command: To do this, open up the MySQL prompt from your terminal: If you prefer to use a password when connecting to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. Then you will be asked few more questions in process. ![]() This will ask if you want to configure the VALIDATE PASSWORD PLUGIN. When the installation is complete, run a simple security script that comes pre-installed with MySQL which will remove some dangerous defaults and lock down access to your database system. Press Y and hit ENTER to continue, and the installation will proceed. Once you’ve entered your password, apt will tell you which packages it plans to install and how much extra disk space they’ll take up. It will ask you for your regular user’s password to verify your intentions. ![]() Since this is a sudo command, these operations are executed with root privileges. If you are on this page then probably you already know what is LAMP server, and why you may use it, so we are skipping this step and starting from installation process.
0 Comments
Leave a Reply. |