Drupal on Ubuntu is a project that facilitates quick configuration of Ubuntu-based distributions for people who want to work with Drupal 10/11.
To install, clone the repository and run the configuration script:
cd ~
git clone https://github.com/tiagohenriqueferreira/drupal-setup.git
cd drupal-setup
sudo chmod +x install.sh
./install.sh
The script automatically installs and configures:
- Apache2
- PHP + Essential modules
- Composer
- PostgreSQL
- MariaDB
- FFmpeg
- Node.js
- Npm
- SASS
- Automated environment configuration
- Installation of essential packages
- Development environment setup
- Performance optimizations
- Ubuntu 22.04 LTS or newer Ubuntu-based distribution
- Root/sudo access
- Internet connection
- Minimum 4GB RAM recommended
- 20GB disk space
The script automatically configures PHP with the following limits:
- memory_limit = 2048M
- upload_max_filesize = 512M
- post_max_size = 2048M
- max_execution_time = 180
- max_input_time = 180
After installation, you can use the following aliases added to your .bashrc
:
drush
- Shortcut for Drush (./vendor/drush/drush/drush
)sites
- Navigate to/var/www/
vhosts
- Navigate to/etc/apache2/sites-available/
update
- Update packages and upgrade automatically using Nala (sudo nala update && sudo nala list --upgradable && sudo nala upgrade -y
)upgrade
- Install packages listed as upgradable using Nalarap
- Restart Apache2 service (sudo service apache2 restart
)rmdb
- Restart MariaDB service (sudo service mariadb restart
)rpg
- Restart PostgreSQL service (sudo service postgresql restart
)ss1
- Compilesscss/style.scss
tocss/style.css
using SASS in watch modess2
- Compilesscss/ck5style.scss
tocss/ck5style.css
using SASS in watch modelogs
- Tails the Apache2 error log in real time (/var/log/apache2/error.log
)phplog
- Tails the PHP error log in real time (/var/log/php_errors.log
)versions
- Displays installed software versions (function defined in your.bashrc
)
- If Apache doesn't start, check ports with:
sudo netstat -tuln | grep 80
- For permission issues:
sudo chown -R www-data:www-data /var/www/html
- System logs:
sudo journalctl -xe
The script installs and configures:
- Zsh as default shell
- Oh My Zsh with af-magic theme
- Plugins: git, ssh-agent, zsh-autosuggestions, zsh-syntax-highlighting, fzf
Remember to:
- Change default database passwords
- Configure firewalls properly
- Keep the system updated using provided aliases
Contributions are welcome! Please:
- Fork the project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add: new feature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Tiago Henrique Ferreira - [email protected]
Project Link: https://github.com/tiagohenriqueferreira/drupal-setup
This project is under the MIT License. See the LICENSE
file for more information.