For the most of the part these instructions working very well.
Check if the server runs on http://localhost/ and check if the php installation works as well
Apache2
sudo apt install apache2But few things to note:
MYSQL
mysql installation does not prompt for a password hence you have to set in via as described in section 5 of this tutorial.sudo apt update && sudo apt install mysql-serverCheck the version to ensure the installtion is done perfectly.
sudo service mysql status
Run following command to set password and set other secrity measures to the mysql installation as the installtion process doesn't prompt for these.sudo mysql_secure_installation
And follow the instructions
Turns out you can't use the root user in 5.7 anymore without becoming a sudoer. That means you can't just run
That also means that it will no longer work if you're using the root user in a GUI (or supposedly any non-command line application). To make it work you'll have to create a new user with the required privileges and use that instead.
See this answer for more details.
Login to mysql with sudo mysql -u root,
Restart mysql if needed,
Turns out you can't use the root user in 5.7 anymore without becoming a sudoer. That means you can't just run
mysql -u rootanymore and have to do
sudo mysql -u rootinstead.
That also means that it will no longer work if you're using the root user in a GUI (or supposedly any non-command line application). To make it work you'll have to create a new user with the required privileges and use that instead.
See this answer for more details.
Login to mysql with sudo mysql -u root,
CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'some_user'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Restart mysql if needed,
sudo service mysql restart
PHP 7.0 and 7.2
To install php 7.0 or 7.2 follow the instructions on this tutorial.
Instructions for installing PHP 7.2
sudo apt update && apt-get upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2Check the php version
php -vInstall php 7.2 mods
sudo apt install php-pear php7.2-curl php7.2-dev php7.2-gd php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
Finish
Restart the server,sudo /etc/init.d/apache2 restart
Check if the server runs on http://localhost/ and check if the php installation works as well
No comments:
Post a Comment