Today I am going to follow up the procedures to setup standard LAMP stack on CentOS 7. For the latest version of phpMyAdmin: 1rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* 2yum -y install epel-release For MariaDB: 1yum -y install mariadb-server mariadb 2systemctl enable --now mariadb 3mysql_secure_installation For Apache: …
Read MoreSimply follow this script below: 1yum install epel-release -y 2yum install certbot python-certbot-apache mod_ssl -y 3certbot --apache Create a cron job which renews certification once a week. 1crontab -e 10 0,12 * * * python -C 'import random; import time; time.sleep(random.random() * 3600)' && certbot …
Read MoreFirst off, install nginx on the server machine. 1yum update 2yum install epel-release 3yum install nginx Edit the nginx config file then. 1cd /etc/nginx/nginx.conf 2vim nginx.conf Edit the file like this: 1server_name domain.com; If you are not going to use domain name, a public ip address would also work instead of …
Read MorePM2 is a process manager for nodejs apps. It daemonizes apps built with nodejs, which means run-as-service. Let’s install PM2 using npm. 1npm install -g pm2@latest Now you can start your app using pm2 like so: 1pm2 start app.js Next, register the app as startup process. 1pm2 startup systemd 2pm2 save You can check the …
Read MorePrerequisites for a vhost setup: 1chown -R apache:apache /path_to/site_root Set the permission of the root directory to 755, you may already know. 🙂 Well, let’s create a vhost config file before you edit it. 1cd /etc/httpd/conf.d 2vim domain_name.conf Now, grab this content to your config file: 1<VirtualHost …
Read MoreI recently came up with this error on one of my OpenVPN servers. "OpenVPN - Socket bind failed on local address [AF_INET] IP:#portnum: Cannot assign requested address" Let me share how I did fix it. First off, check this openvpn’s default init script : [email protected] 1sudo grep After …
Read MoreThis is a manual version of ssh-copy-id command. Let’s say that we are logging in to server named B from a local machine named A. First off, generate authentication key pair without passphrase on the local machine A: 1ssh-keygen -t rsa Now you got a public key of your local machine, of which path is: 1cd ~/.ssh 2cat …
Read MoreIn some situations, you are given only a ppk file for access to a cloud server. You know, however, it's for Putty on windows, not for OpenSSH client which might be the most familiar to you.🤔 I am gonna introduce a method to convert a ppk file into a pem file so that you can login to the linux server with ssh command …
Read MoreThanks to Stan's great work, it became so delightful to run your own secure and stable private VPN server. It's never been so easy. 👍 Download the installation script like this: 1wget https://raw.githubusercontent.com/Angristan/openvpn-install/master/openvpn-install.sh Change file permission to executable like this: …
Read MoreCI/CD Build History You might have ever been stuck in continuous deployment with codeship. Hacking principle of CI/CD is all the same in other platforms like CircleCI, Codefresh, TeamCity, etc. Okay, let’s get started. First off, connect your version control app such as github, gitlab or bitbucket to the Codeship.\ …
Read More