<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bryanisimo on Medium]]></title>
        <description><![CDATA[Stories by Bryanisimo on Medium]]></description>
        <link>https://medium.com/@bryanisimo?source=rss-249a2d0ab5c0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dUKAd8ZOSAbBzavlhgyYVw.jpeg</url>
            <title>Stories by Bryanisimo on Medium</title>
            <link>https://medium.com/@bryanisimo?source=rss-249a2d0ab5c0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 20:28:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bryanisimo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting up an Ubuntu server in Amazon or any other VPC]]></title>
            <link>https://medium.com/@bryanisimo/setting-up-an-ubuntu-server-in-amazon-or-any-other-vpc-a122d341c9c4?source=rss-249a2d0ab5c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a122d341c9c4</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[shell]]></category>
            <dc:creator><![CDATA[Bryanisimo]]></dc:creator>
            <pubDate>Tue, 24 Dec 2019 11:23:47 GMT</pubDate>
            <atom:updated>2019-12-24T11:26:36.892Z</atom:updated>
            <content:encoded><![CDATA[<p>You need to set up your server and get shell access, log into your Ubuntu server as ubuntu user. then let’s update our server.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/75e0d18772ff305c467e71a88d503e12/href">https://medium.com/media/75e0d18772ff305c467e71a88d503e12/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXbTB0cFi4_ODCCyh-6jpw.jpeg" /></figure><p>Then let’s add our client’s user:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6351c66bbdda72c0a5f4b79c8945fc30/href">https://medium.com/media/6351c66bbdda72c0a5f4b79c8945fc30/href</a></iframe><p>Then let’s install LEMP</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/198e19fc70b1d53f49cb790b238dbf21/href">https://medium.com/media/198e19fc70b1d53f49cb790b238dbf21/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a122d341c9c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up a Rockstar  Server ]]></title>
            <link>https://medium.com/@bryanisimo/setting-up-a-rockstar-server-c3ccabc6dd8?source=rss-249a2d0ab5c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3ccabc6dd8</guid>
            <category><![CDATA[debian]]></category>
            <category><![CDATA[php-7-2]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Bryanisimo]]></dc:creator>
            <pubDate>Mon, 02 Apr 2018 21:50:51 GMT</pubDate>
            <atom:updated>2019-08-13T01:15:20.918Z</atom:updated>
            <content:encoded><![CDATA[<h3>Debian 9 working with LEMP and others rockstar tools</h3><p>I’m setting up a brand new server, so I want to share my experience with all of you. Maybe my experience will help you to setup a confortable environment using LEMP (Linux Debian 9 [Stretch], NGINX, MySQL 5.7.18 and PHP72).</p><p>So take a cup of coffee and join me in this journey 🤖.</p><p>I’m assuming:</p><ul><li>You know basic shell like using <strong>vim</strong>, what <strong>sudo</strong> command does an basic stuff</li><li>You know how works and how to use a <strong>deploy key</strong></li><li>You have a brand <strong>new server</strong> and you know how connect to it</li><li><strong>$</strong> means you should execute the following command in your terminal</li><li>I’m using <strong>bry</strong> as my user, but you should replace it with your personal user</li></ul><p>First of all, let’s upgrade our server, so we need to execute:</p><pre>$ sudo apt-get update &amp;&amp; sudo apt-get upgrade -y</pre><p>We need to be sure we have some tools to setup configurations and ensure everything works properly.</p><pre>$ sudo apt-get install curl wget vim gdebi-core zsh git-core fontconfig -y</pre><p>If you want it setup vim as your default editor</p><pre>sudo update-alternatives --config editor</pre><h3>Configuring Local Time</h3><p>I’m from Mexico, so I need to setup my local time at the server. Please be sure you are using your local time, in my case is <strong>America/Mexico_City</strong>.</p><pre>$ sudo mv /etc/localtime /etc/localtime.bak<br>$ sudo ln -sf /usr/share/zoneinfo/America/Mexico_City /etc/localtime<br>$ date # Check date and time</pre><p>Some times you get an error about UTF-8. Just use this routine if you are having this message, otherwise <strong>just skip it</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8455c7c985e0a480339fad0f1636df3f/href">https://medium.com/media/8455c7c985e0a480339fad0f1636df3f/href</a></iframe><h3>Being h4x0r, being nerd 🤓</h3><p>Install Oh My ZSH and Power Level 9k:</p><pre>$ sudo su -<br>$ sh -c &quot;$(wget <a href="https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh">https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh</a> -O -)&quot;<br>$ git clone <a href="https://github.com/bhilburn/powerlevel9k.git">https://github.com/bhilburn/powerlevel9k.git</a> ~/.oh-my-zsh/custom/themes/powerlevel9k</pre><p>We also need to install “Awesome Terminal Fonts”:</p><pre>$ wget <a href="https://github.com/gabrielelana/awesome-terminal-fonts/archive/v1.1.0.tar.gz">https://github.com/gabrielelana/awesome-terminal-fonts/archive/v1.1.0.tar.gz</a><br>$ tar -xzvf v1.1.0.tar.gz<br>$ cd awesome-terminal-fonts-1.1.0 &amp;&amp; ./install.sh<br>$ cd &amp;&amp; rm -Rf awesome-terminal-fonts-1.1.0 v1.1.0.tar.gz<br>$ exit</pre><p>Configure this theme in configuration file~/.zshrc:</p><pre>$ vim ~/.zshrc</pre><p>Change the following lines:</p><pre>ZSH_THEME=&quot;powerlevel9k/powerlevel9k&quot;<br>POWERLEVEL9K_MODE=&quot;nerdfont-complete&quot;</pre><h3>Master User</h3><p>Up to this point we could have worked with <strong>root</strong> user, but for security reasons we are going to configure <em>a </em><strong><em>master user</em></strong> to manage our server. We will disable <strong>root</strong> access and use other users for each client we have. Our master user should be <strong>suoder</strong>, in my case I will name my user <strong>bry</strong> but you can use any name you like.</p><p>Aside I strongly recommend you to create a <strong>not sudoer</strong> user for any client you’ll host in your server, I suggest the same for the database access. In the worst scenario if a hacker takes control of a project this will only affect to a part of the system, keeping safe other projects in the same server.</p><p><strong>Remember</strong>: One user for each client you have and give them access to the corresponding projects, that means you’ll repeat this step every time you have a new client.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6351c66bbdda72c0a5f4b79c8945fc30/href">https://medium.com/media/6351c66bbdda72c0a5f4b79c8945fc30/href</a></iframe><p>As you can see, at the end you are going to get an ssh-key and you can use it as a deploy key in your Github, Gitlab or whatever Git server you are using.</p><p>Let’s make it sudoer, so please <strong>skip this step</strong> if you are configuring a client’s user:</p><pre>sudo visudo</pre><p>Add this line with your user:</p><pre><strong>bry</strong> ALL=(ALL) NOPASSWD: ALL</pre><h3>Configuring SSH</h3><p>We need to secure our server, so we will enable only ssh key access to make it easy, please edit ssh configuration file:</p><pre>$ sudo vim /etc/ssh/sshd_config</pre><p>Change or add the following lines:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/700c8fc621b125f63b29e4f92a4d5ee8/href">https://medium.com/media/700c8fc621b125f63b29e4f92a4d5ee8/href</a></iframe><p>So create your local key <strong>in your personal computer</strong>:</p><pre>$ ssh-keygen -t rsa -b 4096 -C “<a href="/service/mailto:your_email@example.com">your_email@example.com</a>”<br>$ cat .ssh/id_rsa.pub</pre><p>Copy and paste in <strong>authorized_keys</strong> file in the server with your sudoer user as file name:</p><pre>$ sudo mkdir /etc/ssh/authorized-keys<br>$ vim /etc/ssh/authorized-keys/<strong>bry</strong></pre><p>Restart the ssh service in your server:</p><pre>$ sudo service ssh restart</pre><p>Try to connect to your server in a new terminal without closing the current one, if everything is working fine you should connect without any password.</p><pre>$ ssh <strong>bry</strong>@<strong>MyServerIp</strong> # My Server</pre><h3>Setting Up MySQL 5.7.21 from official repositories</h3><p>MySQL is not longer the default “MySQL” option, I need MySQL to support some features like “JSON” fields or other things, if you want to use MariaDB feel free to install default MySQL server, in otherwise follow the next steps.</p><p>From <a href="https://dev.mysql.com/downloads/repo/apt/">MySQL APT repository</a> get the latest version of it, click on “Download” and copy the link “No thanks, just start my download” at the bottom, in my case:</p><pre>$ wget <a href="https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb">https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb</a><br>$ sudo gdebi <a href="https://dev.mysql.com/get/mysql-apt-config_0.8.9-1_all.deb">mysql-apt-config_0.8.9-1_all.deb</a></pre><p><strong>Pro tip:</strong> use “tab” button to use autocomplete function and avoid typos, in the follow example I’ll use [key] as each button you’ll press from your keyboard:</p><blockquote>[ g ] [ d ] [ tab ]</blockquote><p>so you going to got the next result:</p><pre>$ gdebi </pre><p>After that just type the first two letters from the file name an then tab:</p><blockquote>[ m ] [ y ] [ tab ]</blockquote><p>And you will got:</p><pre>$ gdebi mysql-apt-config_0.8.9–1_all.deb</pre><p>So, then press enter to execute the installer.</p><blockquote>Do you want to install the software package? [y/N]:<br><strong>Y</strong></blockquote><p>Then a visual wizard going to appears asking:</p><blockquote>Which MySQL product do you wish to configure?<br><strong>Select Ok option from the list</strong></blockquote><p>Then just update and install:</p><pre>$ sudo apt-get update &amp;&amp; sudo apt-get install mysql-server -y</pre><p>Select your MySQL root’s password and keep it safe (often I use <a href="https://randomkeygen.com/">Random Keygen</a>). After that just check if the latest version of MySQL is installed:</p><pre>$ mysql —-version</pre><p>Now we need to secure our database so please disallow remote login and anonymous users:</p><pre>$ mysql_secure_installation</pre><p>I strongly recommend create a user for each client you have, if this client have many projects you need to give access to this user to the corresponding tables.</p><p>Removing downloaded files</p><pre>rm mysql-apt-config_0.8.9–1_all.deb</pre><h3>Setting Up PHP 7.2</h3><p>From distribution repositories we can use PHP 7.0, but Laravel 5.6 requires 7.1.3, so we will use <a href="https://deb.sury.org/">Debian Sury Org DPA</a> to install a newest version:</p><pre>$ sudo apt-get install apt-transport-https lsb-release ca-certificates -y<br>$ wget -O /etc/apt/trusted.gpg.d/php.gpg <a href="https://packages.sury.org/php/apt.gpg">https://packages.sury.org/php/apt.gpg</a><br>$ sudo sh -c &#39;echo &quot;deb <a href="https://packages.sury.org/php/">https://packages.sury.org/php/</a> $(lsb_release -sc) main&quot; &gt; /etc/apt/sources.list.d/php.list&#39;<br>$ sudo apt-get update</pre><p>Checking if 7.2 version are available:</p><pre>$ sudo apt-cache search php7.2</pre><p>If we got a big list of packages we are ok, after that we need to install common dependencies</p><pre>$ sudo apt-get install php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-mysql php7.2-xml php7.2-curl php7.2-mbstring php7.2-zip php7.2-curl -y</pre><p>To check if we have the correct version just execute and check:</p><pre>$ php --version</pre><h4>Installing Composer:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/85e44f8a6a3b880d8ad64ee7436e3d4c/href">https://medium.com/media/85e44f8a6a3b880d8ad64ee7436e3d4c/href</a></iframe><h4>Preparing our WebServer</h4><p>Once we have all of our working software working properly we need to publish our work on the Web, I’m using NGINX and CERBOT to make it happen.</p><h4>Setting Up NGINX</h4><pre>$ sudo apt-get install nginx</pre><p>I’m strongly recommend you to use a repository to make NGINX changes, because if something wrong happens you can easily go back to a safe configuration or check if someone made some mistake.</p><p>You can use <a href="https://github.com/bryanisimo/nginx-config">this repository</a> as a template.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a47bf2039198d713e6f03155c77d2cfa/href">https://medium.com/media/a47bf2039198d713e6f03155c77d2cfa/href</a></iframe><p>Before anything else just check if everything is working fine:</p><pre>$ sudo nginx -t</pre><p>If this is the case restart it:</p><pre>$ sudo service nginx restart</pre><h4>Setting Up Certbot</h4><p>Just setup your credentials and skip with <strong>C</strong> when Certbot asks for a domain name at the end of the setup.</p><pre>$ sudo su -<br>$ echo &quot;deb <a href="http://ftp.debian.org/debian">http://ftp.debian.org/debian</a> stretch-backports main&quot; &gt; /etc/apt/sources.list.d/backports.list<br>$ exit<br>$ sudo apt-get update<br>$ sudo apt-get install python-certbot-nginx -t stretch-backports -y<br>$ sudo certbot --authenticator webroot --installer nginx</pre><p>Every time you need a certificate you can execute:</p><pre>$ sudo certbot certonly — webroot -w /home/bry/projects/default/public -d bry.com -d www.bry.com</pre><h3>Fail2Ban</h3><pre>$ sudo apt-get install fail2ban -y</pre><p>This is my usual configuration in sudo</p><pre>$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.back<br>$ sudo vim /etc/fail2ban/jail.conf</pre><p>Replace the next values</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4272303a2420241844df2c1463e30ada/href">https://medium.com/media/4272303a2420241844df2c1463e30ada/href</a></iframe><p>Restart service</p><pre>$ sudo service fail2ban restart</pre><h3>Laravel Projects</h3><p>mkdir projects &amp;&amp; cd projects</p><pre>$ git clone git@your-repo.git<br>$ composer update<br>$ chmod -Rf 775 storage bootstrap/cache<br>$ git config --global core.fileMode false</pre><p>I hope you can find this useful, if you have any concern let me know in twitter <a href="https://medium.com/u/249a2d0ab5c0">Bryanisimo</a> 🤓 🤖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3ccabc6dd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>