The PHP has more than 150 extensions/modules for various work. However, if you want to install a specific version of PHP, suppose PHP 7.4, then you must replace the command sudo apt install php-cli with sudo apt install php7.4-cli. Using the following command you can install the latest PHP 8.1 on Ubuntu 22.04 server. Add PHP/Ondrej Dependency (Optional) sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common -y sudo add-apt-repository ppa:ondrej/php sudo apt update Step – 2. And you can install the latest PHP on the Linux system using the following steps: Step – 1. PHP is also an integral part of the LAMP and LEMP stack. PHP is a general-purpose scripting language, mostly used for web development. Grant all privileges to the newly created database: GRANT ALL PRIVILEGES ON wordpress.* TO IDENTIFIED BY 'password' įlush older privileges: FLUSH PRIVILEGES Ĭheck databases list: SHOW DATABASES Output:Įxit from MySQL CLI: Exit Installing PHP on Ubuntu 22.04 Set password for the new user: SET PASSWORD FOR = PASSWORD("password") sudo mysql -u root -pĬreate a new database: CREATE DATABASE wordpress Ĭreate a new user: CREATE USER You must also enter the root password which was earlier created when we secured the database in step two. Using the following command you can log in to MariaDB/MySQL command-line interface. MariaDB/MySQL Service status (running) Step – 4. If the output shows that MariaDB is running that means everything is okay. Use the following command to check the MariaDB database service status. You must type Y for every question after entering the root password for the database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |