A few simple scripts to setup a basic dev environment on Ubuntu.
Tested on Ubuntu 18.04, 22.04 LTS
Installs the following:
- docker and docker-compose
- git and git lfs
- git aliases and credential caching
- graphviz
- network tools like: curl, ifconfig
- npm, yarn
- nvm, node 8 (latest)
- Visual Code
Extras can also be installed:
- ftp server to easily transfer files (SCP port 22 - needs ssh login to be setup)
- xrdp (for remote desktop)
- chrome, chrome driver
- useful user scripts
note: probably NOT suitable for a production box!
The 'clever' way:
sudo apt install curl
curl -o- https://raw.githubusercontent.com/mrseanryan/ubuntu-scripts/master/install.sh | bash
note: if you also want docker installed, instead use install-with-docker.sh
OR if that fails:
sudo apt-get update
sudo apt install git
git clone https://github.com/mrseanryan/ubuntu-scripts.git
cd ubuntu-scripts
./go.sh
note: if you also want docker installed, instead use go.sh --docker
To install XRDP to allow Remote Desktop from Windows:
cd ubuntu-scripts
./extra-install-xrdp.sh
./extra-install-ssh-server.sh
sudo ./extra-configure-ssh-server.sh
(only run this once!)
- then setup client side, and test from the client:
https://help.ubuntu.com/community/SSH/OpenSSH/Configuring https://help.ubuntu.com/community/SSH/OpenSSH/Keys
- test login:
ssh -v user@hostname
-
to use a hostname for a VM: for VM hosted on Windows, edit Windows hosts file to map IP to host
-
this line or similar may need to be disabled in
/etc/ssh/sshd_config
Subsystem sftp /usr/lib/openssh/sftp-server
- client side can specify identity file, if more than one key on client:
ssh user@host -i path-to-rsa
./extra-install-ftp-server-NOT-secure.sh
extra-install-ftp-secure-the-ftp-server.sh
Anonymous and plain ftp are disabled, since they are not secure.
FTP over SCP (using ssh) is enabled for local users.
This requires setting up login via ssh (previous section).
Unless you add user name to /etc/vsftpd.chroot_list
(not recommended)
https://help.ubuntu.com/community/SSH/OpenSSH/Configuring http://xmodulo.com/secure-ftp-service-vsftpd-linux.html https://www.krizna.com/ubuntu/setup-ftp-server-on-ubuntu-14-04-vsftpd/ https://www.linode.com/community/questions/485/ssh-service-is-failing-to-start
With ssh
set up, it is possible to use Visual Code remotely:
https://code.visualstudio.com/docs/remote/remote-overview
The Visual Code install script involves some prompts which fail to show when installed via curl
.
To fix, run the script:
cd ubuntu-scripts
./install-visual-code.sh
The scripts will install the latest docker
but not the latest docker-compose
.
You may need to edit the version of docker-compose
in this script, and then run it again:
install-docker-compose.sh
Original work by Sean Ryan - mr.sean.ryan(at gmail.com)
This project is licensed under the MIT License - see the LICENSE file for details