Skip to content

Instantly share code, notes, and snippets.

@saranemohan
Created February 26, 2021 08:13
Show Gist options
  • Select an option

  • Save saranemohan/63e713501bb83b7a7ff80658e57f6ec2 to your computer and use it in GitHub Desktop.

Select an option

Save saranemohan/63e713501bb83b7a7ff80658e57f6ec2 to your computer and use it in GitHub Desktop.

Revisions

  1. saranemohan created this gist Feb 26, 2021.
    67 changes: 67 additions & 0 deletions lemp.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    sudo apt-get update


    sudo apt-get install nginx
    sudo nginx -t
    sudo systemctl restart nginx



    sudo apt-get install mysql-server
    sudo mysql -u root -p
    CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
    GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
    FLUSH PRIVILEGES;

    sudo apt-get install mysql-client


    sudo systemctl stop mysql
    sudo apt-get remove --purge mysql*
    sudo apt-get autoremove
    sudo apt-get autoclean



    sudo apt-get update
    sudo apt-get install php-fpm php-mysql
    ############wordpress####################
    sudo apt-get install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
    ############magento######################
    sudo apt-get install php-common php-cli php-opcache php-gd php-curl php-intl php-mbstring php-intl php-xsl php-zip php-bcmath php-soap
    sudo update-alternatives --config php


    sudo apt-get -y install openjdk-11-jre
    wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
    echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
    sudo apt-get update && sudo apt-get install elasticsearch
    sudo service elasticsearch start
    systemctl status elasticsearch.service

    curl -XGET 'localhost:9200'



    #############local-ssl##################
    https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04



    sudo apt-get install unzip certbot
    sudo apt-get install python3-certbot-nginx
    sudo certbot --nginx -d pwa.wireandswitch.com



    sudo useradd chrysalis
    sudo passwd chrysalis
    sudo usermod -aG sudo chrysalis
    sudo usermod -aG www-data chrysalis
    su chrysalis

    git config core.fileMode false


    mysqldump -u admin -p waarisart > db_file.sql
    mysql -u admin -p waarisart < waarisart-migrate-20201031075751.sql