A set of bash commands to streamline setup of a clean Ubuntu 19.10 installation as a PHP development machine, including AMP stack, necessary PHP modules, Composer, NPM/Gulp, some of the most popular IDEs and text editors, and basic every-day apps: clipboard manager, screenshot tool, git client...
To start the setup, run this command in terminal:
bash <(wget -qO- https://raw.githubusercontent.com/djboris88/ubuntu-setup/master/setup.sh)Log will be stored in the ~/ubuntu-setup.log file. You are only allowed to run the script once per
machine, to avoid some duplicate commands being run.
Beside all other goodies, this setup script will create a custom script for creating Apache virtual hosts,
and store it in the /user/bin/vhost file.
To create new virtual host run
vhost createAnd then follow the on-screen instructions. The similar is for the delete command:
vhost deleteBy default, script will offer you the placeholders for the virtual host url and for the project root path, based on the current directory you are calling this script from.
For example, if your terminal location is /var/www/project, it will offer you the project.local
for virtual host url, and /var/www/project for the root path.
After entering or confirming those two parameters, script will create a new .conf file inside
/etc/apache2/sites-available directory and call a2ensite ${vhostUrl}. Also, new entry will be
made in the /etc/hosts file.
When calling vhost delete both of those will be removed. Apache is reloaded in both cases.
- set permissions for
/var/wwwusingsetfacl,rwxfor bothwww-dataand the logged in user - root directory for the default virtual host is set to
/var/www - installed and activated many PHP modules
- reconfigured
php.iniwith some basic settings for local development - added some settings to
opcache.iniandxdebug.ini - changed settings for phpmyadmin to allow login without password
- Composer
- WP-CLI
- NVM, Node.js, Gulp, Yarn
- Git, set up global
user.nameanduser.email
- Sublime Text
- PHPStorm
- Visual Studio Code
- Skype (autostart)
- CopyQ (autostart) - clipboard manager, keyboard shortcut set to
Ctrl + ` - Flameshot (autostart) - screenshot tool, keyboard shortcut set to
Print - Google Chrome
- GitEye - git client