Install Curl Extension for PHP in Ubuntu

Many times we come across web applications which are written in PHP and require curl extension. PHP curl functions can used through use of libcurl. The libcurl was create by Daniel Sternberg. With the help of libcurl you can connect and communicate with webserver using different protocols. To install curl library on your Ubuntu computer, you need to have LAMP (Linux apache mysql php) set up ready. Once you have Lamp setup ready just type in following command in terminal to install curl library,

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

After installing libcurl you should restart the web server with following command,

sudo /etc/init.d/apache2 restart

If you don’t have LAMP functionality already installed, then please click on the following link to find out how install LAMP on Ubuntu Linux,

Set Ubuntu Server Time through Terminal

Get the current server time by just typing “date” in the terminal.

Install Time Zone
1 $sudo aptitude install tzdata
2 $dpkg-reconfigure tzdata
3 $sudo vim /etc/ntp.conf

Add NTP server
1 driftfile /var/lib/ntp/ntp.drift
2 server 0.pool.ntp.org
3 server 1.pool.ntp.org
4 server 2.pool.ntp.org
5 server pool.ntp.org

Manually update the time by “$sudo ntpdate pool.ntp.org”

changing port tomcat

If you get this message after start tomcat

SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080

Means you will to change tomcat’s port, here is how to do, go to
$CATALINA_HOME/conf/server.xml

change

<connector port:8080

to

<connector port:8083

If you running in multiple catalina services, you should create new shell script and include different $CATALINE_HOME and $CATALINA_BASE into it

First, check on your $CATALINA_HOME/conf/server.xml