{
  "slug": "Installing-Application-for-web-developer-After-installing-Ubuntu-20-04-LTS-e8114c21044c",
  "title": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
  "subtitle": "one of the nightmare for the developer is changing OS. Always we have a lot of tasks Todo that never finishes! When a new version of the…",
  "excerpt": "one of the nightmare for the developer is changing OS. Always we have a lot of tasks Todo that never finishes! When a new version of the…",
  "date": "2020-09-21",
  "tags": [
    "Linux"
  ],
  "readingTime": "5 min",
  "url": "https://medium.com/@mobinshaterian/installing-application-for-web-developer-after-installing-ubuntu-20-04-lts-e8114c21044c",
  "hero": "https://cdn-images-1.medium.com/max/800/1*nejjtHjXXYU2d1cPA_cMvQ.jpeg",
  "content": [
    {
      "type": "heading",
      "level": 2,
      "text": "Installing Application for web developer After installing Ubuntu 20.04 LTS"
    },
    {
      "type": "paragraph",
      "html": "one of the nightmare for the developer is changing OS. Always we have a lot of tasks Todo that never finishes! When a new version of the ubuntu realizes, that’s annoying us as mental thinking to changing OS."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*nejjtHjXXYU2d1cPA_cMvQ.jpeg",
      "alt": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
      "caption": "",
      "width": 533,
      "height": 300
    },
    {
      "type": "paragraph",
      "html": "in this article, I write a Minumum application needing to back to work."
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*sMKg1_MEVqiB6bIZ7cfUGA.jpeg",
      "alt": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
      "caption": "",
      "width": 800,
      "height": 800
    },
    {
      "type": "paragraph",
      "html": "Be care full before any action it’s necessary backup all project even you using git repository."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Upload and install Ubuntu 20.04"
    },
    {
      "type": "paragraph",
      "html": "after install ubuntu first step is update to get last update."
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get update"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Initial and import install applications"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get install git\nsudo\napt-get install htop\nsudo\napt-get install sshuttle\nsudo\napt-get install iotop\nsudo\napt-get install vim\nsudo\napt-get install curl"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Installing Fonts"
    },
    {
      "type": "paragraph",
      "html": "some Persian font not available on Ubuntu so download them install in ~/.fonts"
    },
    {
      "type": "paragraph",
      "html": "downloading font from these web site and put in ~/.fonts folder"
    },
    {
      "type": "paragraph",
      "html": "cp -ar 384.Font.Farsi ~/.fonts/"
    },
    {
      "type": "paragraph",
      "html": "font google"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://www.fontyab.com/download?id=7782\nhttps://soft98.ir/graphic/font/14282-Font-Collection-Farsi.html"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install chrome"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install ./google-chrome-stable_current_amd64.deb"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Sync Firefox and chromium account"
    },
    {
      "type": "paragraph",
      "html": "Firefox saving all your password and accounts in the web browser and make the helpful thing to migrating new OS."
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install — assume-yes chromium-browser"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Vscode IDE"
    },
    {
      "type": "paragraph",
      "html": "Vscode is compatible with many language such as Php, Python, Docker, Git, Css&nbsp;, Html, Blade, JS and etc."
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo snap install --classic code"
    },
    {
      "type": "paragraph",
      "html": "Extentions: git lens + git graph + git history + prettier +Bracket Pair Colorizer 2"
    },
    {
      "type": "paragraph",
      "html": "press cntl + shift + p and then type setting.json"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "\"workbench.editor.enablePreview\": false,"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "NetBeans Apache"
    },
    {
      "type": "paragraph",
      "html": "if you are an old developer in java you must remember Netbeans and Eclipse. Netbeans has a plugin for Cakephp that extremely helpful."
    },
    {
      "type": "paragraph",
      "html": "first install java:"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "java -version"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt update"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install -y default-jdk"
    },
    {
      "type": "paragraph",
      "html": "download the last version of Netbeans Apache from their website:"
    },
    {
      "type": "paragraph",
      "html": "download it and run as Sudo."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "LAMP Linux Apache Mysql Php and PhpmyAdmin and Composer"
    },
    {
      "type": "paragraph",
      "html": "take a breath, actually in my mind I’m scared to install these things and in my opinion take a lot of time but it takes only 5 minute!"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt update"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install apache2"
    },
    {
      "type": "paragraph",
      "html": "after complete installation check 127.0.0.1 from your browser"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get update"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get install mysql-server"
    },
    {
      "type": "paragraph",
      "html": "after install check version"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "mysql --version\nmysql  Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))"
    },
    {
      "type": "paragraph",
      "html": "install php:"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt update\nsudo\napt-get  install php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd  php-mbstring php-\ncurl php-xml php-pear php-bcmath"
    },
    {
      "type": "paragraph",
      "html": "Confirm PHP version:"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "$ php --versionPHP 7.4.3 (cli) (built: Mar 26 2020 20:24:23) ( NTS )Copyright (c) The PHP GroupZend\nEngine v3.4.0, Copyright (c) Zend Technologies    with Zend OPcache v7.4.3, Copyright (c), by Zend\nTechnologies"
    },
    {
      "type": "paragraph",
      "html": "installing soap:"
    },
    {
      "type": "paragraph",
      "html": "sudo apt-get install php7.4-soap"
    },
    {
      "type": "paragraph",
      "html": "sudo systemctl restart apache2"
    },
    {
      "type": "paragraph",
      "html": "download and install Phpmyadmin:"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt update\nsudo\napt install phpmyadmin"
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*VFkYjhSXDR-O29KS8aqa1Q.png",
      "alt": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
      "caption": "",
      "width": 716,
      "height": 290
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*4cfQunZ3lyOpybLfxxoZvw.png",
      "alt": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
      "caption": "",
      "width": 711,
      "height": 363
    },
    {
      "type": "image",
      "src": "https://cdn-images-1.medium.com/max/800/1*qXDGktSFRaE5mj2NQikVFw.png",
      "alt": "Installing Application for web developer After installing Ubuntu 20.04 LTS",
      "caption": "",
      "width": 711,
      "height": 231
    },
    {
      "type": "code",
      "lang": "sql",
      "code": "show grants for phpmyadmin@localhost;"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "added phpmyadmin to apache configuration"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo vi /etc/apache2/apache2.conf"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "Include /etc/phpmyadmin/apache.conf"
    },
    {
      "type": "paragraph",
      "html": "get permition to directory of apache"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo gedit /etc/apache2/apache2.conf"
    },
    {
      "type": "code",
      "lang": "xml",
      "code": "<Directory /var/www/>        Options Indexes FollowSymLinks        AllowOverride All        Require\nall granted</Directory>"
    },
    {
      "type": "paragraph",
      "html": "restart apache"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo service apache2 restart"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "PRIVILEGES Phpmyadmin user in Mysql"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo mysql -u root -pGRANT ALL PRIVILEGES ON *.* TO phpmyadmin@’localhost’;FLUSH PRIVILEGES;"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Changing php.ini"
    },
    {
      "type": "paragraph",
      "html": "sudo gedit /etc/php/7.4/apache2/php.ini"
    },
    {
      "type": "paragraph",
      "html": "post_max_size = 30M"
    },
    {
      "type": "paragraph",
      "html": "upload_max_filesize = 30M"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Composer installing"
    },
    {
      "type": "paragraph",
      "html": "sudo curl -s <a href=\"https://getcomposer.org/installer\" target=\"_blank\" rel=\"noreferrer noopener\">https://getcomposer.org/installer</a> | php"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Add Language"
    },
    {
      "type": "paragraph",
      "html": "Open the <a href=\"https://help.ubuntu.com/stable/ubuntu-help/shell-introduction.html.en#activities\" target=\"_blank\" rel=\"noreferrer noopener\">Activities</a> overview and start typing Region &amp; Language."
    },
    {
      "type": "paragraph",
      "html": "Click on Region &amp; Language to open the panel."
    },
    {
      "type": "paragraph",
      "html": "Click the Manage Installed Languages button to open Language Support."
    },
    {
      "type": "paragraph",
      "html": "Click Install / Remove Languages…. The Installed Languages window lists all the available languages, with the currently installed languages checked."
    },
    {
      "type": "paragraph",
      "html": "Check the languages you want to install, and uncheck those currently installed languages you want to remove."
    },
    {
      "type": "paragraph",
      "html": "Click Apply Changes."
    },
    {
      "type": "paragraph",
      "html": "<a href=\"https://help.ubuntu.com/stable/ubuntu-help/user-admin-explain.html.en\" target=\"_blank\" rel=\"noreferrer noopener\">Administrative privileges</a> are required. Enter your password, or the password for the requested administrator account."
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Add git key on git repository"
    },
    {
      "type": "paragraph",
      "html": "ssh-keygen"
    },
    {
      "type": "paragraph",
      "html": "ls ~/.ssh/id_rsa.pub"
    },
    {
      "type": "paragraph",
      "html": "cat ~/.ssh/id_rsa.pub"
    },
    {
      "type": "paragraph",
      "html": "added to git repository"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Setup virtual website"
    },
    {
      "type": "paragraph",
      "html": "sudo gedit /etc/apache2/sites-available/000-default.conf"
    },
    {
      "type": "paragraph",
      "html": "added below lines to add new website on 127.0.0.1:8001"
    },
    {
      "type": "code",
      "lang": "xml",
      "code": "<VirtualHost *:8001> ServerAdmin webmaster@localhost DocumentRoot /var/www/html/folder ErrorLog\n/var/www/html/folder/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined</VirtualHost>"
    },
    {
      "type": "paragraph",
      "html": "and add listen to port with apache:"
    },
    {
      "type": "paragraph",
      "html": "sudo gedit /etc/apache2/ports.conf"
    },
    {
      "type": "paragraph",
      "html": "Listen 8001"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Cakephp requirement"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get install php-intl\nsudo\napt-get install php-mbstring\nsudo a2enmod proxy_fcgi setenvif\nsudo a2enconf php7.4-fpm\nsudo service apache2 restart\nsudo\napt install php7.4-intl\nsudo a2enmod rewrite"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Protection on eye and low back pain"
    },
    {
      "type": "paragraph",
      "html": "sudo add-apt-repository ppa:slgobinath/safeeyes"
    },
    {
      "type": "paragraph",
      "html": "sudo apt update"
    },
    {
      "type": "paragraph",
      "html": "sudo apt install safeeyes"
    },
    {
      "type": "paragraph",
      "html": "if you familiar with pomodoro install it<br>sudo apt-get install gnome-shell-pomodoro"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Docker"
    },
    {
      "type": "paragraph",
      "html": "if you have problem with connection to docker use <a href=\"https://shecan.ir/\" target=\"_blank\" rel=\"noreferrer noopener\">shckan</a> proxy."
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get update\nsudo\napt-get install \\\n  apt-transport-https \\\n  ca-certificates \\\n\ncurl \\\n  gnupg-agent \\\n  software-properties-common"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "curl -fsSL https://download.docker.com/linux/ubuntu/gpg |\nsudo apt-key add -"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo apt-key fingerprint 0EBFCD88pub   rsa4096 2017-02-22 [SCEA]      9DC8 5822 9FC7 DD38 854A  E2D8\n8D81 803C 0EBF CD88uid           [ unknown] Docker Release (CE deb) <docker@docker.com>sub   rsa4096\n2017-02-22 [S]"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get update\nsudo\napt-get install docker\nsudo\napt-get install docker.io"
    },
    {
      "type": "paragraph",
      "html": "set docker as sudoer"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo groupadd docker\nsudo gpasswd -a $USER dockernewgrp docker"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "docker --versionDocker version 19.03.8, build afacb8b7f0"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "docker psCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS\nPORTS               NAMES"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install docker-composer"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-\n04"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Conflict Docker with server"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://stackoverflow.com/questions/52225493/change-default-docker0-bridge-ip-address"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "FileZilla"
    },
    {
      "type": "paragraph",
      "html": "sudo apt-get install filezilla"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "GIMP"
    },
    {
      "type": "paragraph",
      "html": "sudo snap install gimp"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Postgre"
    },
    {
      "type": "paragraph",
      "html": "sudo apt-get update<br>sudo apt-get install postgresql-12 pgadmin4"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install postgresql\nsudo\napt install pgadmin3"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install postgresql postgresql-contrib"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "docker pull dpage/pgadmin4\ndocker run -p 80:80 \\\n  -e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \\\n  -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \\\n  -d dpage/pgadmin4"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Driver of php in postgre"
    },
    {
      "type": "paragraph",
      "html": "sudo apt-get install php7.4-pgsql"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Set password in postgre and make db"
    },
    {
      "type": "paragraph",
      "html": "sudo -u postgres psql"
    },
    {
      "type": "paragraph",
      "html": "ALTER USER postgres PASSWORD ‘passwod’;"
    },
    {
      "type": "paragraph",
      "html": "CREATE DATABASE databasename;"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "change background with Bing"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo add-apt-repository ppa:whizzzkid/bingwallpaper"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get update"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt-get install bingwallpaper"
    },
    {
      "type": "paragraph",
      "html": "for changing background need run bingwallpaper in Terminal"
    },
    {
      "type": "paragraph",
      "html": "<a href=\"https://www.howtogeek.com/305974/how-to-use-bings-background-of-the-day-as-your-ubuntu-wallpaper/\" target=\"_blank\" rel=\"noreferrer noopener\">Option Two: Bing Desktop Wallpaper Changer (No Watermark)</a>"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "alias python=python2"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo snap install bing-wall"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "no compatible source was found for this media"
    },
    {
      "type": "paragraph",
      "html": "<code>sudo apt install libavcodec-extra</code>"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install L2tp VPN connection"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install network-manager-l2tp\nsudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp\nsudo\napt -y install network-manager-l2tp\nsudo\napt-get install network-manager-l2tp-gnome\nsudo\napt install --install-suggests network-manager-l2tp-gnome"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://armagankaratosun.github.io/post/2018-09-02-setup-l2tp-vpn-on-ubuntu/"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install Php Storm"
    },
    {
      "type": "paragraph",
      "html": "downloading php storm from <a href=\"https://soft98.ir/software/programming/3845-%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF-%D9%BE%DB%8C-%D8%A7%DA%86-%D9%BE%D9%80%DB%8C-%D8%A7%D8%B3%D9%80%D8%AA%D9%88%D8%B1%D9%85.html\" target=\"_blank\" rel=\"noreferrer noopener\">iran source</a> or get it from <a href=\"https://www.jetbrains.com/phpstorm/download/#section=linux\" target=\"_blank\" rel=\"noreferrer noopener\">original source</a>"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install MongoDB Client"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install mongo-tools"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install Golang"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://go.dev/dl/\nhttps://go.dev/doc/install"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install Postman"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://www.postman.com/downloads/"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo snap install postman"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install Redis"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo\napt install redis-server"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://snapcraft.io/redis-desktop-manager"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo snap install redis-desktop-manager"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install Skype"
    },
    {
      "type": "code",
      "lang": "bash",
      "code": "sudo snap install skype --classic"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Install MongoDB"
    },
    {
      "type": "code",
      "lang": "text",
      "code": "https://linuxhint.com/install_mongodb_ubuntu_20_04/\nhttps://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/"
    },
    {
      "type": "heading",
      "level": 2,
      "text": "Perfect! how long take your time? :)"
    }
  ]
}
