Saturday, 19 May 2018

Mount FTP share locally in Linux using ftpfs

Mount FTP share locally in Linux using ftpfs

 To mount a remote FTP account to locally on Linux system- 

1)Install required Packages
2)Mounting system with remote details
3)Testing

1) - Install fuse-curlftpfs package on you Linux system.

2)- After package installation need to create a mount point(directory) and mount ftp server data using curlftpfs command, to do this you must have ftp details. 

Consider below details.
 
 ftp User: altmish
 ftp Password: tech2smooth
 ftp Host:- ftp.tech2smooth.in
 Mount Directory:-  /usr/ftp_data

Create the mount point and mount ftp account data.
[root@localhost /]#mkdir /usr/ftp_data
[root@localhost /]#curlftpfs -o altmish:tech2smooth@ftp.tech2smooth.in /usr/ftp_data

Note: Above mounted data will be accessible only for the user who mounted the system. To make it public-ally accessible use below.


[root@localhost /]#curlftpfs -o allow_other altmish:tech2smooth@ftp.tech2smooth.in /usr/ftp_data

 3)- Go to ftp data directory

[root@localhost /]#cd /usr/ftp_data

[root@localhost /]#ls -ltrh

Saturday, 5 May 2018

Memory Leak in tomcat

To prevent this particular memory leak you should edit your tomcat/conf/server.xml and change

<Listener  lassName="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
to

<Listener 
className="org.apache.catalina.core.JreMemoryLeakPreventionListener"
classesToInitialize="com.mysql.jdbc.NonRegisteringDriver" />

Error parsing HTTP request header- Invalid character found in the request target.



Http11Processor.service Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
 java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986


Solution

Edit catalina.properties add below line in end of the file.

tomcat.util.http.parser.HttpParser.requestTargetAllow=|{}

 
 

Monday, 30 April 2018

Unable to Start MySQL Linux - Please read "Security" section of the manual....

ISSUE- [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root


Solution- Start mysql using below command.

/usr/sbin/mysqld --user=root --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Thursday, 31 August 2017

Grep Temp Password from MySQL

As of now for latest MySQL version there is a default password. To get this password tail mysql.log file and restart MySQL instance, and you will found MySQL temporary password.

              grep 'temporary password' /var/log/mysqld.log

Restart MySQL instance

# /etc/init.d/mysqld restart

OR

# /etc/init.d/mysql restart

Your Boot Partition is on a Disk Using GTP

1. At the partitioning screen, press Ctrl + Alt + F2 to get to a shell prompt.

2. Overwrite the GPT partition label with an MSDOS label.

[root@host ~]# parted /dev/sda -s mklabel msdos

3. Press Ctrl + Alt + F6 to return to the partitioning screen, and continue installation, it may be needed to back one step up in order for the installer to see the new changes.

Root Cause
  • The GRand Unifed Bootloader (GRUB) is not compiled with the ability to utilize GPT partitions in RHEL5.
  • The MSDOS partition label will allow GRUB to boot correctly, but has a physical limitation of 2 TB.
  • This above error was a check added in RHEL 5.2.
  • In 5.0 and 5.1, the installation would continue but the ending install will not boot.
#Source- RHEL

Install RPM From Linux CD

1- Create a directory for you local repository, e.g.
/home/user/repo
.
2- Move the RPMs into that directory.
3-Fix some ownership and file system permissions:
# chown -R root.root /home/user/repo
4- Install the createrepo package if not installed yet, and run
# createrepo /home/user/repo
# chmod -R o-w+r /home/user/repo
5- Create a repository configuration file, e.g. /etc/yum.repos.d/myrepo.repo containing
[local]
name=My Awesome Repo
baseurl=file:///home/user/repo
enabled=1
gpgcheck=0
6- Install your package using
# yum install packagename

Enable 'HTML Manager'- Apache Tomcat

 Enable 'HTML Manager'- Apache Tomcat Go to Apache-tomcat's home directory and edit the tomcat-users.xml ${apache_home}/conf/tom...