Archives For November 30, 1999

This simple and brief tutorial is going to show you how to disable ping response on Ubuntu Server to make it more secure.

To get started, run command below to get the root privilege:

sudo su

Then you can disable ping via one of below commands:

    echo  1  > /proc/sys/net/ipv4/icmp_echo_ignore_all

    or

    iptables  -I  INPUT  -i  ech0  -p   icmp  -s  0/0  -d  0/0   -j  DROP

To re-enable ping:

    echo  0  > /proc/sys/net/ipv4/icmp_echo_ignore_all

    or

    iptables  -I  INPUT  -i  ech0  -p   icmp  -s  0/0  -d  0/0   -j  ACCEPT

To make it permanently, edit the “/etc/sysctl.conf” file so that the setting gets picked up at boot time.

net.ipv4.icmp_echo_ignore_all=1

Change Date and Time on Ubuntu 12.04 Server

Last updated: July 3, 2013

time

This simple tutorial is going to show Ubuntu beginners how to display and change date and time on Ubuntu Linux both Server and Desktop.

To display data and time, use date command:

date

Sample output:

Wed Jul 3 20:59:28 CST 2013

To display calendar, use cal command:

cal

Sample output:

July 2013
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

To change date and time:

sudo date -s "4 June 2020 18:00:00"

cinelerra

There’re two version of Cinelerra, the official source code is developed by Heroine Virtual, Ltd (HV). HV shares its code base with a community version of Cinelerra (Cinelerra-CV), the community adds new enhancements to the HV source.

To install Cinelerra Community Version:

Hit Ctrl+Alt+T to open a terminal window, copy and paste below command to add the ppa repository:

sudo add-apt-repository ppa:cinelerra-ppa/ppa

Then update:

sudo apt-get update

Install Latest Cinelerra-CV:

sudo apt-get install cinelerra-cv

The ppa support Ubuntu 8.04, 10.04, 12.04, 12.10, and 13.04. Also works on Linux Mint 15, 14, 13.

To install Cinelerra 4.4 (HV version):

Press Ctrl+Alt+T to open terminal, copy and paste below command to download the Debs.

  • For 32-bit:
    wget http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra-data_4.4-dmo1_all.deb http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra_4.4-dmo1_i386.deb
  • For 64-bit:
    wget http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra-data_4.4-dmo1_all.deb http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra_4.4-dmo1_amd64.deb

Then install them (both 32-bit & 64bit):

sudo dpkg -i cinelerra_4.4-*.deb

For first time launching cinelerra by typing command in terminal, then lock to Unity Launcher.

cinelerra

Enjoy!

How to Install WordPress on Ubuntu 13.04 Server

Last updated: November 3, 2013

Wordpress
Already installed LAMP or LEMP (Nginx with PHP, Mysql) on your Ubuntu Server? This time I’m going to show you how to install WordPress CMS.

WordPress is a popular blogging tool and a content management system (CMS) based on PHP and MySQL. It’s free and open-source.

To install WordPress, first login your Ubuntu Server as root, then follow the steps below:

1.) Create Mysql Database and User for WordPress.

  • First log into Mysql as root user:
    mysql -u root -p
  • Type in the root password to get past.

  • Create a database. Change database-name in code to whatever you want.
    CREATE DATABASE database-name;
  • Create an user. Change database-user in code to whatever you want.
    CREATE USER database-user@localhost;
  • Give a password to the user just created. Change password-here in code.
    SET PASSWORD FOR database-user@localhost= PASSWORD("password-here");
  • Grant all privileges to the new user.
    GRANT ALL PRIVILEGES ON database-name.* TO database-user@localhost IDENTIFIED BY 'password-here';
  • f.) Finally, refresh Mysql:
    FLUSH PRIVILEGES;
  • g.) Exit Mysql sell
    exit

2.) Download WordPress and setup the configuration.

  • Download the latest wordpress:
    wget http://wordpress.org/latest.tar.gz

    Then extract:

    tar -xzvf latest.tar.gz
  • Copy the sample configuration file to make a backup.
    cd wordpress && cp wp-config-sample.php wp-config.php
  • Edit the configuration file:
    vi wp-config.php

    Press I to start editing, Esc to stop editing. Press :, then type wq to save and exit, type q! to exit without save.

    Then change the section of database-name, database-user, password-here.

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘database-name’);

    /** MySQL database username */
    define(‘DB_USER’, ‘database-user’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘password-here’);

3.) Setup the permissions.

    Give ownership of the directory to the apache or nginx user by running following commands one by one:

    sudo rsync -avP ~/wordpress/ /var/www/
    cd /var/www/
    sudo chown www-data:www-data * -R 
    sudo usermod -a -G www-data username

4.) Finally in your browser go to IP or domain/wp-admin/install.php and start installing.

Enjoy!

Want to build a website? Then you need to setup a web server! Here I’ll show you how to install and setup LAMP pack on Ubuntu 12.04 LTS Server.

LAMP is a combination of Linux (OS), Apache HTTP Server, PHP (open-source scripting language), and MySQL (database software).

In this tutorial I use the hostname www.example.com with the IP address 192.168.0.100 as example.

1.) Login or Remote access your server as root, or run command to get root privileges.

sudo su

2.) Install Mysql 5:

apt-get install mysql-server mysql-client

You’ll be asked to set a password for root user of Mysql.

3.) Install Apache2:

apt-get install apache2

After installed, test if it works by going to http://192.168.0.100 in your web browser. Remember change the IP to yours.

apache-wellcome-page

The default default document root is /var/www/, and the configuration file is /etc/apache2/apache2.conf.

4.) Install PHP5:

apt-get install php5 libapache2-mod-php5

Restart Apache2 service to get it works with PHP5:

/etc/init.d/apache2 restart

5.) To test if PHP5 works, create info.php in the root directory “/var/www/”:

vi /var/www/info.php

press I to insert following codes:

<?php
phpinfo();
?>

then press Esc -> Shif+: type in wq and hit enter to save. Then in browser go to http://192.168.0.100:info.php

Phpinfo

6.) To get Mysql support in PHP5, install following packages:

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Then restart Apache2 service:

/etc/init.d/apache2 restart

Go to or reload http://192.168.0.100/info.php in your browser:

Mysql-support-in-php5

7.) (Optional) Install phpMyAdmin, a web interface to manage Mysql Databases:

apt-get install phpmyadmin

After installed, go to http://192.168.0.100/phpmyadmin/, login with root and password you set in step 2.