Showing posts with label centos. Show all posts
Showing posts with label centos. Show all posts

Saturday, February 28, 2015

ImageMagick Installation Error : ImageMagick MagickWand API configuration program... configure: error: not found.

If you get the below error while installing PHP extension imagick. I used the command "pecl install imagick" and got the below error:


To fix this error install the ImageMagick-devel package.

yum install ImageMagick-devel

In Ubuntu, you can resolve this by installing a few extra packages.

sudo apt-get install libmagickwand-dev libmagickcore-dev

Friday, June 8, 2012

rsync Error - connection unexpectedly closed

rsync is a command used to copt files from one location to another. Usually used to migrate files from server to server. Today while trying to rsync i got an error.
----
[root@hari home]# rsync -avz root@192.168.1.23:/var/www/ /home/
root@192.168.1.23's password:
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [receiver=3.0.6]
----

At 1st i thought rsync command was not installed but it was installed and working correctly since i reached till password prompt.
After a few tests I found the solution. rsync was not installed in the target machine. After installing it in target machine the issue was fixed.

Wednesday, May 23, 2012

Failed to load Inline module


Today while going through the error log of a server. The logs were flooding with this error. Actually its not an error its just a warning.
# tail -f /var/log/httpd/error_log
[Tue May 22 21:00:16 2012] [error] [client 78.50.114.80] Failed to load Inline module for best performance. at ./split_dyn.pl line 11., referer: http://domain.com/sblogin/login.shtml/members/

On searching found that  Inline module is a perl module. We can install the Inline module by logging into the server as root and giving the following command.
# perl -MCPAN -e 'install Inline'
The installation will stop a few times for us to manually enter y / yes for a few questions. We can confim that the module is installed when we finally see this line.

Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Inline/.packlist
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
/usr/bin/make install  -- OK

Friday, April 13, 2012

Installing LAMP on Linux --> The easy way

What is LAMP? Its actually a short form the expansion of LAMP is
L --> Linux
A --> Apache
M --> Mysql
P --> Php {{ P can be perl or python too }}
These are the basic things which are needed for a web server to work. The steps for installation are for red hat flavoured Linux systems or servers.
Login as root to the server where LAMP is to be installed.

  • APACHE
# yum install httpd httpd-devel
# /etc/init.d/httpd start
Now the apache will be installed and its running. You can verify the installation by giving the command.
# telnet localhost 80 which should give the output silimilar to this
--------------------------------------------------------------
telnet localhost 80
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
--------------------------------------------------------------
To configure apache you will have to edit the configuration file /etc/httpd/conf/httpd.conf. Please make sure to restart apache after editing configuration file for changes to take effect.
#/etc/init.d/httpd restart
  • MYSQL
# yum install mysql mysql-server mysql-devel
# /etc/init.d/mysqld start
Now Mysql is started. We will perform a quick basic setup of mysql now.
Note: For fedora 16/17 users
systemctl start mysqld.service
systemctl enable mysqld.service
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 349034 to server version: 4.1.22-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Set the mysql root password now:
mysql>USE mysql;
(Replace 'yourpass with your required password' in the command below)
mysql> UPDATE user SET Password=PASSWORD('yourpass') WHERE user='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
Bye
Now to login with new details:
mysql -u root -p
Enter Password:

  • PHP
# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
# /etc/init.d/httpd restart
To verify the php installation type the command below:
# php -v
We can also create a php info page to test this.

Friday, September 17, 2010

List top 10 Files or Directories Size Wise

Type the command below to see the files listed size wise from higher size files to lower size files.

-----------------
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done
-----------------

Tuesday, September 14, 2010

Adding an IP range


Create a file named ifcfg-eth0-range0 in the /etc/sysconfig/network-scripts. Inside this file enter the following:
-----------
IPADDR_START=192.168.0.10
IPADDR_END=192.168.0.110
CLONENUM_START=0

-----------
IPADDR_START: This is the first IP from the address range you want to bind to your ethernet device.
IPADDR_END: This is, of course, the last IP from that address range.
CLONENUM_START: This is the number that will be assigned to the first IP alias interface. For instance, if your Internet interface is eth0 and CLONENUM_START is 0, then this config file will create 100 interfaces starting with eth0:0 (eth0:0, eth0:1, eth0:2 etc) and ending with eth0:100.

NOTE! Be careful if you need to add more ranges of IPs. You'll have to use a proper value for CLONENUM_START. For instance, if you need to add a second range with 100 IPs besides the one above, create a new file called ifcfg-eth0-range1 and set the CLONENUM_START to 101 so an overwrite will be avoided. Also please backup the existing files before editing this.

AFTER THIS DONT FORGET TO RESTART NETWORK
=> service network restart

Friday, September 10, 2010

Installing Local RPMs


To install an RPM file that you downloaded outside of yum, open up a terminal, and as root do:

rpm -Uvh filename.rpm

If you have Internet access, you can also install local files by doing:

yum --nogpgcheck install filename.rpm

Setting Up Package Installation RPMFORGE

After successful installation of Linux OS, many of the commonly used applications cannot be installed using yum. We have to configure the repositories or set-up packages. The easiest way to do it.

To configure your system so that you can install packages from rpmforge, follow these instructions:

   1. Open a Terminal.

   2. Become root:
      su -

   3. Run the following command:
      yum --nogpgcheck install http://rpm.livna.org/livna-release.rpm http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Note: Tested in Fedora and Cent OS

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews