Last active
October 10, 2019 16:36
-
-
Save mateo2181/5f44f58e07726196ea6279cd91813292 to your computer and use it in GitHub Desktop.
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
- sudo apt update && sudo apt install apache2 | |
Config firewall to allow ssh connections: | |
- sudo ufw allow OpenSSH | |
- sudo ufw allow in "Apache Full" | |
- sudo ufw enable | |
Install Mysql: | |
- sudo apt update && sudo apt install mysql-server | |
- sudo mysql_secure_installation | |
Install PHP: | |
- sudo apt update && sudo apt install php libapache2-mod-php php-mysql | |
- sudo apt-get install php7.2-intl | |
PHP / Apache: Set Max File Upload and Post Size: | |
- sudo nano /etc/php/7.2/apache2/php.ini | |
Set values: | |
upload_max_filesize = 64M | |
post_max_size = 64M | |
Restart apache: | |
- sudo systemctl restart apache2 | |
Install PHPMyAdmin: | |
- sudo apt update && sudo apt install phpmyadmin | |
Create Mysql User: | |
- sudo mysql -p -u root | |
Mysql commands: | |
- CREATE USER 'pmauser'@'%' IDENTIFIED BY 'password_here'; | |
- GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'%' WITH GRANT OPTION; | |
Install Composer: | |
- curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer | |
Install Redis: | |
- sudo apt-get install redis-server | |
- sudo systemctl enable redis-server.service | |
Install Supervisor following this page: | |
https://pinoylearnpython.com/supervisor-installation-and-configuration-on-ubuntu-18-04-lts/ | |
RUN SUPERVISOR AS A SERVICE: | |
https://cloudwafer.com/blog/how-to-install-and-configure-supervisor-on-ubuntu-16-04/ | |
Try it with: | |
- systemctl status supervisord.service | |
- systemctl start supervisord.service | |
Run supervisorctl: | |
- sudo supervisorctl reload | |
If we are going to work with sockets we have to open ports using: | |
- sudo ufw allow 6001/tcp // to use 6001 port with SocketIo | |
If we are working with laravel-echo-server we ahve to install it globally. | |
To config socket with ssl follow this: | |
https://stackoverflow.com/questions/56866032/configuring-apache-reverse-proxy-for-hosting-laravel-echo-server-on-production/56934080#56934080 | |
We have to enable proxy and proxy_http with: | |
- sudo a2enmod proxy | |
- sudo a2enmod proxy_http | |
- sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment