Last active
January 11, 2019 10:04
-
-
Save marktyers/9d291bc62d542c7668d8 to your computer and use it in GitHub Desktop.
Setting up a web dev machine on Ubuntu 15.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BIOS Settings | |
# If you plan on running virtual machines using virtualbox you need to enable this in the BIOS | |
# on HP machines: ESC, computer setup, security > system security. enable VTx and VTd. | |
# on Lenovo: ENTER, | |
# needs to be run with root privileges | |
# sudo -s | |
# check version of Ubuntu. | |
lsb_release -a | |
# Move close max and min to left | |
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize:' | |
gsettings set org.gnome.desktop.wm.preferences button-layout ':close,maximize,minimize' | |
# Switch close max and min on Chrome to use system settings: | |
# settings: Use system title bar and borders | |
# add repositories | |
add-apt-repository ppa:webupd8team/atom | |
add-apt-repository ppa:webupd8team/brackets | |
add-apt-repository ppa:webupd8team/sublime-text-3 | |
add-apt-repository ppa:ubuntu-desktop/ubuntu-make | |
add-apt-repository ppa:fingerprint/fingerprint-gui | |
sudo apt-add-repository ppa:ansible/ansible | |
add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" | |
add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian vivid contrib" | |
add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" | |
wget -q https://www.virtualbox.org/download/oracle_vbox.asc | |
sudo apt-key add oracle_vbox.asc | |
#wget -q http:/sudo apt-get install virtualbox-5.0/download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - | |
# update repositories | |
apt-get update -y | |
apt-get upgrade -y | |
# install utility apps | |
apt-get install curl git tree xclip ubuntu-make ansible apache2-utils jq chromium-browser rdesktop exfat-utils exfat-fuse software-properties-common -y | |
# Install Java | |
apt-get install default-jdk -y | |
# Install editors | |
apt-get install atom brackets sublime-text-installer -y | |
umake web visual-studio-code | |
# Install Kazam Screen Recorder | |
apt-get install kazam -y | |
# Install VirtualBox | |
#apt-get install virtualbox-5.0 -y | |
apt-get install virtualbox-4.3 -y | |
# Install webstorm Editor | |
cd ~/Downloads | |
wget http://download.jetbrains.com/webstorm/WebStorm-10.0 | |
tar xfz WebStorm-10.0.4.tar.gz.4.tar.gz | |
# need to delete archive file | |
# need to move binaries to appropriate directory (where?) | |
cd cd WebStorm-141.1550/bin/ | |
./webstorm.sh | |
# Light Table Editor | |
# XBMC | |
sudo apt-get install xbmc python-software-properties pkg-config software-properties-common | |
# Installing Docker | |
curl -sSL https://get.docker.com/ | sh | |
usermod -aG docker marktyers | |
docker -v | |
# Installing Docker Compose | |
sudo -s | |
curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
exit | |
docker-compose -v | |
# Installing Docker Machine | |
sudo -s | |
curl -L https://github.com/docker/machine/releases/download/v0.4.0/docker-machine_linux-amd64 > /usr/local/bin/docker-machine | |
chmod +x /usr/local/bin/docker-machine | |
exit | |
docker-machine -v | |
# SSH Keys | |
ssh-keygen -t rsa | |
xclip -sel clip < ~/.ssh/id_rsa.pub | |
# then paste into websites as needed. | |
# Configuring Git | |
git config --global user.email 'marktyers@gmail.com' | |
git config --global user.name 'Mark Tyers' | |
# Remote Desktop | |
rdesktop -u aa7401@coventry.ac.uk -p xxx -fP cu2work.coventry.ac.uk | |
# Fingerprint Scanner | |
apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui | |
# After installation launch “Fingerprint GUI” and enrol your fingerprints | |
# seems to work best when swiping bottom to top... | |
# Disabling single finger right-click | |
nano ~/.synaptics-custom-settings.sh | |
# add: | |
#!/bin/bash | |
synclient RightButtonAreaLeft=0 | |
synclient RightButtonAreaTop=0 | |
chmod a+rx ~/.synaptics-custom-settings.sh | |
# Open the Startup Applications program in Unity and add ~/.synaptics-custom-settings.sh to the list of startup applications. | |
http://askubuntu.com/questions/602193/how-to-disable-right-click-on-the-touchpad | |
# Change Terminal Prompt | |
nano ~/.bashrc | |
# locate PS1 line and edit. note upper-case 'W'. Log out and in to see changes. | |
PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ ' | |
# you can also force a colour prompt, change the PS1 option appropriately. | |
# MongoDB | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
sudo apt-get update | |
sudo apt-get install mongodb-org-shell -y | |
apt-cache search mongo | |
sudo apt-get install mongodb-clients | |
# Notes for Ubuntu 18.4 | |
sudo apt install curl git tree xclip rdesktop exfat-utils exfat-fuse software-properties-common net-tools gdebi-core onedrive mosquitto-clients -y | |
apt-get update -y | |
apt-get upgrade -y | |
# Install the following using the Ubuntu Software GUI | |
# Android Studio, Docker, GitKraken, Postman, Virtualbox, Visual Studio Code Mailspring | |
# Suspend lock screen | |
# https://askubuntu.com/questions/972798/how-to-enable-automatic-login-after-suspend-in-ubuntu-gnome-17-04 | |
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true' | |
# Using iPhone Data Connection | |
# https://makandracards.com/makandra/45166-how-to-use-your-iphone-s-internet-connection-on-your-ubuntu-machine-via-usb | |
# Installing Graphic Card Drivers | |
lspci | grep VGA | |
0f:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K420] (rev a1) | |
sudo apt-get install build-essential gcc-multilib dkms | |
# Download the latest drivers from: http://www.nvidia.com/object/unix.html | |
chmod +x Downloads/NVIDIA-Linux-x86_64-396.45.run | |
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf" | |
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf" | |
cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf | |
sudo update-initramfs -u | |
sudo reboot | |
sudo Downloads/NVIDIA-Linux-x86_64-396.45.run | |
sudo reboot | |
# Installing Steam | |
# https://linuxconfig.org/how-to-install-steam-on-ubuntu-18-04-bionic-beaver-linux | |
# Must have the latest Nvidia drivers installed before installing steam! | |
# Install using the Ubuntu Software Centre or use the instructions below | |
sudo add-apt-repository multiverse | |
sudo apt install steam | |
# Set up OneDrive | |
# https://askubuntu.com/questions/958406/how-to-setup-onedrive-in-ubuntu17-04 | |
# once the program is run it will provide a URL to paste into the browser. | |
# after following prompts you need to copy the URL from the blank page screen. | |
sudo apt-get install onedrive | |
onedrive | |
# Installing Google Chrome | |
# https://linuxconfig.org/how-to-install-google-chrome-web-browser-on-ubuntu-18-04-bionic-beaver-linux | |
sudo apt install gdebi-core | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo gdebi google-chrome-stable_current_amd64.deb | |
# Installing VS Code | |
# https://code.visualstudio.com/docs/setup/linux | |
# Install using the Ubuntu Software Centre | |
# Installing VirtualBox | |
# Install using the Ubuntu Software Centre. | |
# Installing Dropbox | |
# Install using the Ubuntu Software Centre | |
# Installing Git | |
sudo apt install git | |
# Installing Node | |
# https://github.com/creationix/nvm | |
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
command -v nvm | |
nvm install node | |
node -v | |
# Remote Desktop | |
# full screen or windowed | |
rdesktop -u aa7401@coventry.ac.uk -p xxx -fP cu2work.coventry.ac.uk | |
rdesktop -u aa7401@coventry.ac.uk -p xxx -g 1920x1080 cu2work.coventry.ac.uk | |
# Installing PicoScope Software | |
# https://www.picotech.com/downloads/linux | |
sudo bash -c 'echo "deb https://labs.picotech.com/debian/ picoscope main" >/etc/apt/sources.list.d/picoscope.list' | |
wget -O - https://labs.picotech.com/debian/dists/picoscope/Release.gpg.key | sudo apt-key add - | |
sudo apt update | |
sudo apt-cache search picoscope | |
sudo apt-get install picoscope | |
# Picscope Drivers (may not be needed) Install the correct driver based on your hardware | |
apt-cache search libps | |
sudo apt install libps2000a -y | |
# Selae Logic Analyser Software | |
# https://www.saleae.com/downloads/ | |
# Setting Up an MQTT Broker | |
# https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-18-04 | |
# React Native | |
Need to build and install 'watchman' | |
sudo apt install -y autoconf automake build-essential python-dev libtool libssl-dev pkg-config | |
cd /tmp | |
git clone https://github.com/facebook/watchman.git | |
cd watchman/ | |
git checkout v4.9.0 | |
./autogen.sh | |
./configure | |
make | |
sudo make install | |
npm install -g create-react-native-app react-native-cli | |
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches | |
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events | |
echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances | |
watchman shutdown-server | |
cd ~/Documents | |
create-react-native-app my-app | |
watchman watch ~/Documents/my-app/ | |
npm start | |
# prevent screenlock on suspend | |
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true' | |
sudo add-apt-repository ppa:ubuntuhandbook1/sigil | |
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin | |
# Update on how to sync OneDrive | |
sudo apt install build-essential libcurl4-openssl-dev libsqlite3-dev -y | |
curl -fsS https://dlang.org/install.sh | bash -s dmd | |
source ~/dlang/dmd-2.082.0/activate | |
git clone https://github.com/abraunegg/onedrive.git | |
cd onedrive/ | |
make | |
sudo make install | |
onedrive --synchronize | |
# Installing R | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 | |
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' | |
sudo apt update | |
sudo apt install r-base | |
sudo -i R | |
# Installing FreeCAD | |
sudo add-apt-repository ppa:freecad-maintainers/freecad-stable | |
sudo apt update | |
sudo apt-upgrade | |
sudo apt install freecad | |
# Setting up Mosquitto Server | |
sudo apt update | |
sudo apt install mosquitto | |
sudo apt-get install mosquitto-clients | |
sudo mosquitto_passwd -c /etc/mosquitto/passwd mqtt_user_name | |
sudo nano /etc/mosquitto/conf.d/default.conf | |
sudo systemctl restart mosquitto | |
ifconfig | |
sudo apt install net-tools | |
ifconfig | |
mosquitto_sub -t test | |
mosquitto -d | |
sudo systemctl enable mosquitto.service | |
pgrep mosquitto | |
kill -9 6601 | |
# need to pass config file when starting mosquitto! | |
# http://www.steves-internet-guide.com/mqtt-username-password-example/ | |
# config /etc/mosquitto/mosquitto.conf contains the following: | |
allow_anonymous false | |
password_file /etc/mosquitto/passwd | |
# need to start as a background process and pass the config file. | |
sudo mosquitto -d -c /etc/mosquitto/mosquitto.conf | |
mosquitto_sub -u codingcow -P poofymoofy -t test | |
mosquitto_pub -u codingcow -P poofymoofy -t test -m 'hello' | |
# also need to configure SSL | |
# http://www.steves-internet-guide.com/mossquitto-conf-file/ | |
# Setting up Arduino IDE | |
Install from the store | |
ls -l /dev/ttyUSB0 | |
sudo usermod -a -G dialout mtyers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment