sudo apt update
sudo apt upgrade
//sudo apt show php
//sudo apt-cache depends php
//sudo apt-cache policy php7.2-cli
sudo apt install php
//apt search mysql
sudo apt install php-mysql
sudo apt install mysql-server
sudo apt install mysql-client
sudo apt install composer
composer global require laravel/installer
or:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
After running the installer following the Download page instructions you can run this to move composer.phar to a directory that is in your path:
sudo mv composer.phar /usr/local/bin/composer
sudo apt install php7.2-zip
sudo apt install php7.2-mbstring
sudo apt install php7.2-dom
sudo apt install php-intl
sudo apt install php-curl
sudo apt install php-gd
or:
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,common,dom,curl}
php -i | grep enabled
php -m | grep openssl
sudo apt install phpmyadmin
then restart apache2:
sudo systemctl restart apache2
sudo add-apt-repository ppa:ondrej/php
If you are using apache2, you are advised to add ppa:ondrej/apache2
sudo add-apt-repository ppa:ondrej/apache2
sudo apt update
sudo apt search php
sudo apt install php7.4
sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,common,dom,curl}
in .profile
export PATH="$PATH:/home/username/.config/composer/vendor/bin"
or in .bashrc , but it only works with "bash or bash like shells"
Also make sure these file does not exist in your home directory:
~/.bash_profile
~/.bash_login
If you've got these files, the .profile will be ignored.
source .profile
sudo install git
only once:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
?