Ads

Showing posts with label UBUNTU. Show all posts
Showing posts with label UBUNTU. Show all posts

Friday, 31 March 2017



I installed DNSMasq and added localhost to the listen-address in the conf file. However, when I try to start it, I get this:

Code:
brandon@ubuntu-server:~$ sudo /etc/init.d/dnsmasq start
 * Starting DNS forwarder and DHCP server dnsmasq
dnsmasq: failed to create listening socket: Address already in use
 * failed
                                                             [fail]






Read More

Sunday, 20 November 2016

This tutorial will describes how to upgrade Ubuntu Server 12.04.x to Ubuntu Server 14.04 LTS. As we know, Ubuntu Server 14.04 is the latest version of ubuntu server edition that released by canonical few month ago.

NOTE : Before starting upgrade to latest version of ubuntu server, make sure you have full backups you data and everything important on your ubuntu server to other remote system or backup drive. If you are using Ubuntu on VPS make sure take a server snapshot at your provider before upgrading. And we do not grantees the following tutorial will work for you properly.


Step 1: 

Updating Ubuntu Repository and Install Update Manager

Make sure your current ubuntu server  is fully up to date, doing it with the following command:
sudo apt-get update
Install update manager core package with these command:
sudo apt-get install update-manager-core

Step 2: 

Check Current Version of Ubuntu Server and Kernel Version

Run the following command to check current version of ubuntu server and kernel information that used ubuntu server
lsb_release -a
lsb-release ubuntu server 12-04
uname -a
kernel version of ubuntu server 12.04
On this case, we are using Ubuntu Server 12.04.4 and kernel 3.8.0-29-generic

Step 3: Upgrade to Ubuntu Server 14.04 LTS

Type the following command to upgrade the Ubuntu server 12.04.4 to Ubuntu Server 14.04 LTS :
sudo do-release-upgrade -d
After execute command do-release-upgrade, it will showing the upgrade tool like the screenshot on below. Answer ” Y ” to upgrade.
checking package manager and starting additional SSH
During the upgrade prosess, you may be asked “Disable SSH password authentication for root?” answer “No” if you want to disable SSH password authentication after the upgrading finish
disable ssh password
Next, you may be asked “Restart services during package upgrades without asking?” answer yes if you won’t be asked on each library update.
restarting service during upgrade
The end of the installation you will be prompted to remove any obsolete packages, Answer ‘y’ to continue and remove. Hit ‘d’ to see details of these packages.
remove obsolete packages
Once remove obsolete packages is complete, you will get message “System upgrade is complete”. Congratulations, your Ubuntu Server 12.04 has now been upgraded to the Ubuntu Server 14.04 LTS. To complete the upgrade, reboot your Ubuntu Server by answering ‘Y’.
system upgrade is complete

Step 4 : Checking Version of Ubuntu Server and Kernel Version After Upgrade

Once your Ubuntu Server has been rebooted successfully, you need to check the version of ubuntu server and kernel version with the command “lsb_release -a” and “uname -r”.
lsb_release -a
lsb-release ubuntu server 14.04
uname -r
check kernel version ubuntu server 14.04
The commands will confirm the Ubuntu Server that you are using is Ubuntu Server 14.04 LTS.
Optional: If you get information “No LSB modules are available ” after execute the command “lsb_release -a” . Fix this problem by installing “lsb_core” package:
sudo apt-get update
sudo apt-get install lsb-core
install lsb core ubuntu server 14.04
Now run again the command lsb_release -a to check for LSB modules. You should get information of LSB version like the following screenshot.
lsb_release a
checking lsb release
On this tutorial we also included video step by step upgrading ubuntu server 12.04 to ubuntu server 14.04. The following video created by LinuxScoop, original video can found here
Link Reference:
















Read More
Upgrade Ubuntu 12.04 LTS to Ubuntu 14.04 LTS



First things first: make sure that you are fully up-to-date. Double check by opening the Update Manager application from the dash and installing all updates listed.
When that’s done, open the Dash again and launch the Terminal application. When it opens click inside the window and type the following command carefully:
sudo update-manager -d
Hit the return/enter key and, if prompted, enter your user password.
The Update Manager application will open after a few seconds with a prompt to upgrade. Click this button to begin the process.
I tested this just now.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04 Codename: precise
Then:
$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,156 kB]
Fetched 1,156 kB in 0s (0 B/s)
authenticate 'trusty.tar.gz' against 'trusty.tar.gz.gpg' extracting 'trusty.tar.gz'

Also, while an LTS-to-LTS upgrade should preserve all your files it would be prudent to make a backup of any important documents, folders and photos before you begin. It’s rare for ‘direct upgrades’ to go wrong, but never say never.












Read More

Upgrade Guide UBUNTU 12.04 To 14.04 Trusty

Backups
Make sure you have full backups of everything on your server that is important to you. At the very least, you should generate full backups of all your Virtual Servers. You may also want to make a backup of everything in /etc.
Package Updates
Make sure your system is fully up to date by running these commands:
sudo apt-get update
sudo apt-get upgrade
Reset Dependency Flags
These packages are already installed, but the following command will tell apt not include them anytime "apt-get autoremove" is run:
apt-get install bind9 spamassassin spamc procmail libnet-ssleay-perl libpg-perl libdbd-pg-perl libdbd-mysql-perl quota iptables openssl python mailman subversion ruby irb rdoc ri mysql-server mysql-client mysql-common postgresql postgresql-client awstats webalizer dovecot-common dovecot-imapd dovecot-pop3d proftpd webmin usermin webmin-virtual-server libcrypt-ssleay-perl webmin-virtual-server-theme webmin-virtualmin-dav webmin-virtualmin-svn webmin-virtualmin-awstats webmin-virtualmin-mailman webmin-virtualmin-htpasswd clamav-base clamav-daemon clamav clamav-data clamav-freshclam clamav-docs clamav-testfiles libapache2-mod-fcgid scponly apache2 apache2-doc libapache2-svn libsasl2-2 libsasl2-modules sasl2-bin usermin-virtual-server-theme procmail-wrapper php-pear php5 php5-cgi webmin-security-updates
Update Manager
Make sure you have the update manager core by running this command:
sudo apt-get install update-manager-core
Begin Upgrade
Run the following command to begin the upgrade process. Ubuntu suggests running this from the console, though it should also work from SSH:
do-release-upgrade -d
And then follow the on-screen instructions.
In general, if you are prompted about whether to replace a config file with a new one, or keep your existing one -- we would suggest keeping your existing config.
Coffee
Now is an excellent time to go get some coffee or another beverage of choice, while the packages are downloaded and installed :-)
Reboot
When the upgrade completes, it will prompt you to reboot your system. Perform the reboot, and when your system comes back online, there's just a few more things to change.
Change apt config
Edit /etc/apt/sources.list, and uncomment the Virtualmin repositories. Then change any references of "precise" in those repositories to "trusty".
Run this command, and make sure the new apt config works properly:
apt-get update
Apache Config
There were some significant changes made to Apache. You'll need to make the following updates to /etc/apache2/apache2.conf:
Comment out the following lines that appear in the apache2.conf:
Include httpd.conf
Include conf.d
LockFile ${APACHE_LOCK_DIR}/accept.lock
Re-enable Apache modules:
a2enmod suexec
a2enmod actions
Now enable some Apache modules:
a2enmod suexec
a2enmod rewrite
Then restart Apache:
service apache2 restart
Verify DNS Config
Edit /etc/resolv.conf, and verify that the nameserver line is configured to use 127.0.0.1 as a nameserver.
Test
That's it for configuring your updated system. Now it's time to test your services and websites!
Read More
This article will help you to upgrade Ubuntu 12.04 LTS to Ubuntu 14.04 LTS. Read more about Ubuntu 14.04 LTS.
Note: Before starting release upgrade on Ubuntu, We recommend to take backup of impotent data to other remote system or backup drive. We do not grantees that below steps will work for you properly. The commands use in this article has been taken from here.
To download Ubuntu 12.04 Trusty Tahr ISO images, Visit to http://releases.ubuntu.com/trusty/

Step 1: Install Ubuntu Core Update Mamanger

Generally update-manager-core was installed on system by default, but in case you do not have it, You can install it using following commands.
$ sudo apt-get update
$ sudo apt-get install update-manager-core

Step 2: Check Current Version and Available Upgrade

To check your current running version use lsb_release command.
$ lsb_release -a

LSB Version:    core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:.....
Distributor ID: Ubuntu
Description:    Ubuntu 12.04 LTS
Release:    12.04
Codename:   precise

Now check for new Ubuntu release available to update
$ sudo do-release-upgrade --check-dist-upgrade-only --devel-release

Checking for a new Ubuntu release
New release '14.04' available.
Run 'do-release-upgrade' to upgrade to it.

The above output showing that newer release 14.04 is available to upgrade

Step 3: Upgrade to Ubuntu 14.04 LTS

Lets execute following command to upgrade ubuntu release to Ubuntu 14.04 LTS (Trusty Tahr).
$ sudo do-release-upgrade --devel-release
The above command will take long time to execute depends on your system configuration and internet speed. This will also ask for confirmation to proceed. Using –devel-release will upgrade to development (Unstable) release





Read More

Friday, 26 August 2016


Sometimes in ubuntu, rc.local does not execute , specially in fresh installation.
So if you encounter this issue , you can solve it by using two methods.
I have used these methods several time with success. Also make sure you command entries are above ‘exit 0‘ line
Also adding 10 seconds delay helps in few cases.

Method # 1 , By Using WEBMIN
Method # 2 , By Removing -e from /etc/rc.loacl file [and add 10 seconds delay]

Method # 1 , By Using WEBMIN

Install webmin from http://www.webmin.com/deb.html
After installati0n is done, open webmin and goto
SYSTEM > BOOTUP & SHUTDOWN
Scroll down and and Click on rc.localSelect YES on Start at boot time?
As shown in the image below.

Method # 2 , By Removing -e from /etc/rc.loacl file

Edit rc.local file by
nano /etc/rc.local
at first line remove -e  for example
Change from
#!/bin/sh -e
to
#!/bin/sh
Save & Exit, then Reboot and see, hopefully rc.local will execute on the boot.
Also adding following sleep 10 directive before any script in rc.local will help. e.g:
Example of rc.local

root@ahmad-desktop:~# cat /etc/rc.local
#!/bin/sh -e
rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
# Add 10 seconds delay …
sleep 10
#Followign command will run my script for internet sharing etc / zaib
/etc/fw.sh
exit 0


Read More

Saturday, 2 July 2016

About Wordpress

Wordpress is a free and open source website and blogging tool that uses php and MySQL. It was created in 2003 and has since then expanded to manage 22% of all the new websites created and has over 20,000 plugins to customize its functionality.

Setup

The steps in this tutorial require the user to have root privileges. You can see how to set that up in the Initial Server Setup.

Before working with wordpress, you need to have LAMP installed on your virtual private server. If you don't have the Linux, Apache, MySQL, PHP stack on your VPS, you can find the tutorial for setting it up in the Ubuntu LAMP tutorial.

Step One—Download WordPress

We can download Wordpress straight from their website:

wget http://wordpress.org/latest.tar.gz

This command will download the zipped wordpress package straight to your user's home directory. You can unzip it the the next line:

tar -xzvf latest.tar.gz


Step Two—Create the WordPress Database and User

After we unzip the wordpress files, they will be in a directory called wordpress in the home directory.

Now we need to switch gears for a moment and create a new MySQL directory for wordpress.

Go ahead and log into the MySQL Shell:

mysql -u root -p

Login using your MySQL root password, and then we need to create a wordpress database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.

First, let's make the database (I'm calling mine wordpress for simplicity's sake; feel free to give it whatever name you choose):

CREATE DATABASE wordpress;
Query OK, 1 row affected (0.00 sec)

Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:

CREATE USER wordpressuser@localhost;
Query OK, 0 rows affected (0.00 sec)

Set the password for your new user:

SET PASSWORD FOR wordpressuser@localhost= PASSWORD("password");
Query OK, 0 rows affected (0.00 sec)

Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:

GRANT ALL PRIVILEGES ON wordpress.* TO wordpressuser@localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:

FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit out of the MySQL shell:

exit


Step Three—Setup the WordPress Configuration

The first step to is to copy the sample wordpress configuration file, located in the wordpress directory, into a new file which we will edit, creating a new usable wordpress config:

cp ~/wordpress/wp-config-sample.php ~/wordpress/wp-config.php

Then open the wordpress config:

sudo nano ~/wordpress/wp-config.php

Find the section that contains the field below and substitute in the correct name for your database, username, and password:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'wordpressuser');
/** MySQL database password */
define('DB_PASSWORD', 'password');

Save and Exit.

Step Four—Copy the Files

We are almost done uploading Wordpress to the virtual private server. The final move that remains is to transfer the unzipped WordPress files to the website's root directory.

sudo rsync -avP ~/wordpress/ /var/www/

Finally we need to set the permissions on the installation. First, switch in to the web directory:

cd /var/www/

Give ownership of the directory to the apache user.

sudo chown username:www-data /var/www -R 
sudo chmod g+w /var/www -R 

From here, WordPress has its own easy to follow installation form online.

However, the form does require a specific php module to run. If it is not yet installed on your server, download php-gd:

sudo apt-get install php5-gd

Step Five—RESULTS: Access the WordPress Installation

Once that is all done, the wordpress online installation page is up and waiting for you:

Access the page by adding /wp-admin/install.php to your site's domain or IP address (eg. example.com/wp-admin/install.php) and fill out the short online form (it should look like this)
Read More

Recent News