In this tutorial, How to Monitor the Nginx using Netdata on Centos 7. Netdata is a free open source. It is very easy to install and configure for real-time monitoring.
In this tutorial, How to Monitor the MariaDB database using Netdata on Centos 7. Netdata is a free open source. It is very easy to install and configure for real-time monitoring.
By default, the MySQL installation is unsecure and you need to secure it, as follows
[root@DevopsRoles ~]# mysql_secure_installation
To create this user MariaDB
MariaDB [(none)]> create user 'netdata'@'localhost';
MariaDB [(none)]> grant usage on *.* to 'netdata'@'localhost';
MariaDB [(none)]> flush privileges;
If you are running a firewall. You need to open the port 3306 for MariaDB Database
In this tutorial, How to Monitor Apache Performance using Netdata on Centos 7. Netdata is a free open source. It is very easy to install and configure for real-time monitoring.
MariaDB is free and Open-source. It is the famous fork of the MySQL database. In this tutorial, How to Reset MariaDB root password. Forgetting the root password of your MariaDB database can be a frustrating experience, especially when you need to make critical updates or changes.
However, resetting the MariaDB root password on CentOS is a manageable task if you follow the right steps. This guide will take you through a straightforward, step-by-step process to reset your MariaDB root password, ensuring you regain access to your database quickly and securely. Let’s get started and resolve this issue efficiently.
Check the version of the MariaDB server.
mysql --version
How to reset MariaDB root password
Step by step to reset your MySQL/MariaDB root password.
Stop MySQL/MairaDB service
For MySQL:
sudo systemctl stop mysql
For MariaDB:
sudo systemctl stop mariadb
Start the database server without loading the grant tables
sudo mysqld_safe --skip-grant-tables &
Log in to the MySQL shell
mysql -u root
Set a new root password
For MySQL 5.7.6 and later or MariaDB 10.1.20 and later
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MY_NEW_PASSWORD';
mysql> FLUSH PRIVILEGES;
If ALTER USER statement doesn’t work for you, Try the command below
mysql> USE mysql;
mysql> UPDATE user SET password=PASSWORD('MY_NEW_PASSWORD') WHERE User='root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
For MySQL 5.7.5 and earlier or MariaDB 10.1.20 and earlier:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MY_NEW_PASSWORD');
mysql> FLUSH PRIVILEGES;
Stop and Start MySQL/MariaDB
For MySQL:
sudo systemctl stop mysql sudo systemctl start mysql
You have Reset MariaDB root password on Centos. By following the steps outlined in this guide, you should now have successfully reset your password and regained control over your MariaDB database. Remember, maintaining secure and up-to-date records of your credentials is essential to avoid similar issues in the future. If you encounter any problems or need further assistance, don’t hesitate to reach out for support. I hope will this your helpful. Thank you for reading the DevopsRoles page!
In this tutorial, we’ll walk through the process of Install Tomcat7 , Java 1.8, and Solr on CentOS 7. First, ensure your system is up to date by running the necessary updates. Then, proceed to download and install Java 1.8, configuring the environment variables accordingly. Next, set up Tomcat 7, adjusting the necessary configurations for optimal performance.
Finally, integrate Solr into Tomcat to leverage its powerful search capabilities. Throughout the tutorial, I’ll provide step-by-step instructions to guide you seamlessly through each installation process. By the end, you’ll have a fully functional and efficient setup of Tomcat 7, Java 1.8, and Solr on your CentOS 7 system.
vi /var/lib/solr/home/test/conf/solrconfig.xml
vi /var/lib/solr/home/test/conf/schema.xml
Conclusion
In this guide, we have successfully installed and configured Tomcat7, Java 1.8, and Solr on CentOS 7. By following the detailed steps outlined above, you should now have a fully functional setup that is ready for web application deployment and advanced search capabilities.
This combination of technologies provides a robust foundation for developing and managing enterprise-level applications. Remember to regularly update your software to ensure security and performance enhancements. If you encounter any issues or have further questions, don’t hesitate to consult the official documentation or seek help from the community. I hope will this your helpful. Thank you for reading the DevopsRoles page!
In this guide, we’ll explore how to use the rev command in Linux, a powerful tool for reversing the characters in each line of text. Essential for many DevOps roles, the rev command enhances file manipulation and helps in reversing outputs from other commands. Let’s dive into how this simple yet effective command can streamline your text-processing tasks in Linux environments.
The syntax rev command in Linux
rev [option] [file...]
Some common options for the “rev” command include:
-V: Displays the version information for the command.
-h: Shows the help information.
-c: Treats input as single characters instead of entire lines.
In the manual page, the rev command is described succinctly as a utility to “reverse lines character-wise.” For comprehensive information about the rev command, including its options and examples, refer to the man page by entering man rev in the terminal. This will provide detailed insights into its functionality and usage.
For example rev command
Using the rev command reverses the output of the hostname command as below
Throughout this article, you’ve seen how to utilize the rev command to Reverse characters Linux command. It’s important to remember that the rev command does not alter the original file; it merely displays the reversed output in the terminal or saves it to a new file. I hope you find these examples helpful for mastering the rev command. Thank you for reading at DevopsRoles!
Setting up Active Directory (AD) on Windows Server 2012 R2 is a crucial task for any organization aiming to manage users, groups, and computers efficiently. Active Directory provides a centralized and standardized system that automates network management, enhancing security and ease of access. In this guide, we will walk you through the step-by-step process of How to Install Active Directory Windows Server 2012 R2, ensuring that your infrastructure is robust, secure, and ready to handle your organizational needs.
I. Prepare
To get started, ensure that you have Windows Server 2012 R2 installed on VirtualBox. If you haven’t done this yet, you can follow VirtualBox’s installation guide to set up your virtual machine with Windows Server 2012 R2. Once your server is ready, proceed with the following steps to Install Active Directory Windows Server 2012 R2.
II. Install
1. Run [Start] – [Server Manager].
2. Click [Add roles and features].
3. Click the [Next] button.
4. Select [Role-based or feature-based installation].
5. Select a Host to which you’d like to add services.
6. Check a box [Active Directory Domain Services].
7. Additional features are required to add AD DS. Click the [Add Features] button.
8. Click the [Next] button.
9. Click the [Next] button.
10. Click the [Next] button.
11. Click [Install] button.
12. Installation is started.
13. After finishing Installation, click [Close] button.
III. Configure New DC (Domain Controler).
1. Run [Server Manager] and click [AD DS].
2. Click the [More…] link which is upper-right.
3. Click the [Promote this server to domain...] link.
4. Check a box [Add a new forest] and input any Domain name you’d like to set for the [Root domain name] field.
5. Select [Forest functional level] and [Domain functional level].
Set any password for Directory Services Restore Mode.
6. Click the [Next] button.
7. Set NetBIOS name.
8. Specify the Database folder or Log folder and so on. It’s Ok to keep default if you don’t have specific requirements.
9. Check the contents you configured and click the [Next] button.
10. Click the [Install] button. After finishing installation, the System will restart.
11. After restarting the System, the logon name is changed to [Domain name]\[User name].
Conclusion
By following this guide, you have successfully installed and configured Active Directory on your Windows Server 2012 R2. This setup not only streamlines user and resource management but also strengthens your network security. With AD in place, you can now leverage its full capabilities to enhance your organization’s IT infrastructure, ensuring efficient and secure operations. As your organization grows, Active Directory will continue to provide the scalability and reliability needed to manage complex network environments. The end! Happy with Windows Server. Thank you for reading the DevopsRoles page!
How to hide the password in Jenkins console output? some build Jobs may require a username and the password is hidden for security. I use Jenkins mask password plugin to hide the password in Jenkins console output.
Jenkins Mask Passwords plugin
This plugin allows masking passwords that may appear in the console.
You need to install the Mask passwords plugin in Jenkins.
For example
I will Mask_Passwords_Before job as a picture below
As picture top. Password will show in console. it is dangerous.
Now, I use the mask password plugin for the hidden passwords in console output Jenkins.
Create Mask_Passwords_After job
The result, Passwords have hidden in console output Jenkins.
Link Youtube Hide password in Jenkins console
❓ Frequently Asked Questions (FAQ)
Q1: Is it safe to echo environment variables in Jenkins?
No, especially if they contain secrets. Even if Jenkins masks values, certain command structures can cause secrets to leak.
Q2: How do I ensure a password is masked in Jenkins console?
Use the credentials() method or the withCredentials block. Additionally, avoid echoing secrets and use the Mask Passwords Plugin for extra safety.
Q3: Can secrets leak through error logs?
Yes, poorly written scripts or verbose debug logs can expose secrets. Always sanitize error output and avoid set -x in shell scripts.
Q4: Do all Jenkins plugins respect credential masking?
Not always. Some third-party or community plugins may inadvertently expose secrets. Stick to trusted plugins and test thoroughly.
Q5: Can I revoke access to a leaked credential?
Yes. Rotate the secret immediately and update Jenkins with the new credential. Audit logs to assess impact.
sqlplus admin/admin12345@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCPS)(HOST=orcl12.xxxxxxxxx.ap-northeast-1.rds.amazonaws.com)(PORT=2484))(CONNECT_DATA=(SID=SSLLAB)))
or with TNS name service
sqlplus admin/admin12345@ORCL12
SELECT SYS_CONTEXT('USERENV', 'network_protocol') FROM DUAL;
tcps
Copy the output file to C:\app\client\Administrator\product\12.1.0\client_1\jdk\jre\lib\security\clientkeystore
4. Import the certificate into the key store using the following command.
C:\app\client\Administrator\product\12.1.0\client_1\jdk\bin\keytool -import -alias rds-root -keystore C:\app\client\Administrator\product\12.1.0\client_1\jdk\jre\lib\security\clientkeystore -file C:\app\client\Administrator\product\12.1.0\client_1\ssl_wallet\rds-ca-2019-root.der
Input pass of clientkeystore and confirm yes at below question , to import cert.
Trust this certificate? [no]: yes
Certificate was added to keystore
5. Confirm that the key store was updated successfully.
6. Down the new version of JCE for JDK6, and remove the old jar file, copy the new jar file to under directory C:\app\client\Administrator\product\12.1.0\client_1\jdk\jre\lib\security\
Note: If you using other versions of jdk, please refer to the following link and download the correct version of JCE.
In this tutorial, I demonstrate how to use Docker for hands-on Ansible automation. Learn how to leverage Docker in a DevOps workflow and streamline configuration management with Ansible. A practical guide for DevOps professionals and beginners.
DevOps Use Docker
My Laptop Setup:
Operating System: Windows 10
Tools: Docker and Docker Compose
By using Docker to create one Ansible container and Server01 and Server02 containers. From Ansible command is executed in Ansible container to Two target container.
# Centos image latest
FROM centos:latest
# Install OpenSSh server with yum
RUN yum -y install openssh-server openssh-clients
# Created because public key is required when starting sshd
RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
RUN ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
# Allow login as root
RUN sed -ri 's/^#PermitEmptyPasswords no/PermitEmptyPasswords yes/' /etc/ssh/sshd_config
# Specify root password
RUN echo "root:" | chpasswd
EXPOSE 22
# Start sshd
CMD ["/usr/sbin/sshd", "-D"]
Start Ansible and two target containers.
docker-compose up -d
Connect to Ansible container
docker exec -it ansible /bin/bash
SSH connection without password from Ansible container to Two target container.
ssh server01
exit
ssh server02
exit
Run the Ansible command.
ansible-playbook -i hosts playbook.yml
Execution result of Ansible
Link Youtube
Conclusion
Using Docker with Ansible in DevOps simplifies automation and improves efficiency. By integrating these powerful tools, you can streamline your deployment and configuration management processes. Thank you for visiting the DevOpsRoles.com page.