Skip to content

Instantly share code, notes, and snippets.

@fanorama
Forked from dinhquochan/install.sh
Created May 22, 2024 04:26
Show Gist options
  • Select an option

  • Save fanorama/436fc9ddeb6bcf6f4dbb794d797cfa6b to your computer and use it in GitHub Desktop.

Select an option

Save fanorama/436fc9ddeb6bcf6f4dbb794d797cfa6b to your computer and use it in GitHub Desktop.

Revisions

  1. @dinhquochan dinhquochan created this gist Jul 24, 2023.
    28 changes: 28 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    ## PHP

    sudo add-apt-repository ppa:ondrej/php
    sudo apt update

    sudo apt install php8.2-cli php8.2-dev php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
    php8.2-curl php8.2-imap php8.2-mysql php8.2-mbstring php8.2-xml php8.2-zip \
    php8.2-bcmath php8.2-soap php8.2-intl php8.2-readline php8.2-ldap php8.2-msgpack \
    php8.2-igbinary php8.2-redis php8.2-memcache php8.2-pcov php8.2-xdebug

    ## Composer

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
    php -r "unlink('composer-setup.php');"

    ## MySQL

    sudo apt instal mysql-server

    sudo mysql -u root

    #> MySQL command
    drop user root@localhost;
    create user root@'%' identified with mysql_native_password by '';
    grant all privileges on *.* to root@'%' with grant option;
    flush privileges;