Posts

How to install Let's Encrypt SSL Certificate in Ubuntu 18.04/NGINX?

In this post, we will see, how to install Let's Encrypt SSL Certificate on NGINX webserver. Steps are pretty straight forward and easy. First, add the repository: sudo add-apt-repository ppa:certbot/certbot   You’ll need to press ENTER to accept. Install Certbot’s Nginx package with apt: sudo apt install python-certbot-nginx    Install Let's Encrypt SSL Certificate sudo certbot --nginx -d jenkins.cloudshades.in      Follow the screen and provide the required input. Like email-id, permanent redirection to https etc.

How to reset MySQL root password in Ubuntu in latest Ubuntu versions 18.04 and above

Image
I have forget my MySQL root password and not able to login in phpMyAdmin. I am very bad in MySQL commandline. After long struggle while Googling, I found this solution in Stackoverflow - But this will work only latest Ubuntu version because of enhance security of MySQL.  First, as root, stop the mysql server.  systemctl stop mysql Next, create a /var/run/mysqld directory to be used by MySQL process to store and access socket file:  mkdir -p /var/run/mysqld chown mysql:mysql /var/run/mysqld Check that the newly created directory do exist. Now manually start MySQL with the following linux command and options:  /usr/sbin/mysqld --skip-grant-tables --skip-networking & Confirm that the process is running as expected:  jobs [1]+ Running sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking;  Leave that terminal running and open another terminal, not as root. Now access MySQL database without password:  mysql -u root -p mysql> Using the MySQL ses...

How to use APACHE/NGINX as reverse proxy?

Image
  In this post we will learn, how can we use apache and NGINX webserver as a reserve proxy. Means if we are using an application of different port and we want to use that application on port 80 or 443. For Apache Step 1: Install apache2 webserver sudo apt-get update sudo apt-get install apache2 -y [Check the apache installed or not and apache version] apache2 -v [Start the apache service if not running] sudo systemctl start apache2     [Enable apache service at boot time] sudo systemctl enable apache2 [Restart apache service] sudo systemctl restart apache2 Step 2: Create a configuration file under /etc/apache2/sites-availbale  [Like I have done in previous Jenkins post] cd /etc/apache2/sites-availbale Step 3: Add the following lines in the jenkins.conf file sudo vim jenkins.conf ServerName jenkins.domain ServerAlias www.jenkins.domain ProxyRequests Off ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ ProxyPassReverse / http://jenkins.host/...

How to Setup SFTP Server in CentOS 7

Image
  In this post we will see, how to install Secure FTP Server in CentOS 7 distribution: Image Source - ipswitch.com Step 1: Install FTP Package (Package Name is vsftpd) yum install vsftpd ftp -y The location of ftp folder is /var/ftp/pub Step 2: After installation of vsftpd open the configuration file of vsftpd and make some change given below - vim /etc/vsftpd/vsftpd.conf Edit some line Disable anonymous_enable=YES to NO Un-comment the line  ascii_upload_enable=YES ascii_download_enable=YES If you want, you can add the welcome message to un-comment ftpd_banner=Welcome to blah FTP service And, add a line at the bottom of the file # use_localtime=YES Save and Exit the file Step 3: Enable VSFTP on boot mode and Start the service Allow the ftp port on firewall firewall-cmd —permanent - -add-port=21/tcp firewall-cmd —permanent - -add-service=ftp firewall-cmd - -reload Disable SELinux boolean for FTP Service setsebool -P ftp_home_dir on Finally, Enable the VSFTPD service and boot mo...

WordPress Themes and Plugins Installation Problem

Image
WordPress plugins and themes installation problem Step 1 – Add the following line at the end of wp-config.php file define( 'FS_METHOD' , 'direct' ); Step 2 – Give 777 recursive permission to wp-content folder chmod -R 777 wp-content Most probably, this will fix all the issues of yours. But in case, you have bought and theme and plugins from some website like themeforest of other site and your theme or size is more than the size mentioned in php.in file. Then you need to increase the size of followings – upload_max_size post_max_size max_execution_size etc. and restart the apache service OR Best Solution: Simply give www-data user to user and group onwership to website serving directory

How to reset the Drupal 8 admin user frontend password?

Image
In this post we will know, how can we reset the Drupal 8 frontend admin user password. It is very easy just you have the server access to run the following commands -  Generate a new password  First, you have to generate a password hash that is valid for your site. Execute the following commands from the command line, in the Drupal 8 root directory:  php core/scripts/password-hash.sh 'your-new-pass-here' Output:  password: your-new-pass-here hash: $S$EV4QAYSIc9XNZD9GMNDwMpMJXPJzz1J2dkSH6KIGiAVXvREBy.9E   Be careful not to include more or less characters as the hash. These hashes look somewhat like -   $S$EV4QAYSIc9XNZD9GMNDwMpMJXPJzz1J2dkSH6KIGiAVXvREBy.9E.   We will use the generated password later.  Update the user password.  Now you need to update the user password, in our case we need update the Administrator password, fortunately the UID for Administrator is 1 equal to previous versions of Drupal.   With the new password we nee...

How to deploy Java Springboot application in Ubuntu 16.04/18.04

Image
  Hello Friends Today, I am going to show you how can we deploy a Java Spring-boot application in Ubuntu 16.04/18.04 Step 1: SSH to your server Step 2: Once you logged into server, update the Ubuntu packages sudo apt-get update Step 3: Install the Java package. It is required to run Jenkins. To add the PPA, It contains the Java sudo add-apt-repository ppa:webupd8team/java Press Enter key to continue. It will created the keyring Step 4: Update and Package after keyrings added and Run the Java Installation sudo apt-get update sudo apt install oracle-java8-installer Step 6: Click OK to accept License Agreement Click Yes to accept Oracle Binary Code License terms. Verify the installed Java version java -version javac -version Step 7: Next, we will install the maven, as it is the build tool for Java applications. sudo apt-get install maven -y Step 8: Now as we are going to deploy Java Spring-boot application. For this demo in going to clone a sample Java Spring-boot application from the...