Friday, July 4, 2014

How to install LAMP in Ubuntu

1. Install Apache
To install Apache you must install the Metapackage apache2. This can be done by searching for and installing in the Software Centre, or by running the following command.

sudo apt-get install apache2

2. Install MySQL
To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.

sudo apt-get install mysql-server


3. Install PHP
To install PHP you must install the Metapackages php5 and libapache2-mod-php5. This can be done by searching for and installing in the Software Centre, or by running the following command.

sudo apt-get install php5 libapache2-mod-php5


4. Restart Server
Your server should restart Apache automatically after the installation of both MySQL and PHP. If it doesn't, execute this command.

sudo /etc/init.d/apache2 restart

5. Check Apache
Open a web browser and navigate to http://localhost/. You should see a message saying It works!

6. Check PHP
You can check your PHP by executing any PHP file from within /var/www/. Alternatively you can execute the following command, which will make PHP run the code without the need for creating a file.

php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";''
That's all!! you have now successfully installed LAMP SERVER

I know, I am sarcastic!! But if you follow the instructions and it does not work after the install, try this code below.

sudo apt-get remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 php5-common php5-mysql


Then run the following code below..


sudo apt-get install lamp-server^
 now it's real CONGRATULATIONS!!


Thursday, July 3, 2014

Share files Ubuntu 14.04 and Windows 8 with samba.

In this tutorial we will share ubuntu 14.04 folder to windows 8 and windows 8 folder to ubuntu 14.04

The first thing we should do is to install a Samba server on Ubuntu by running the following commands.

sudo apt-get update && apt-get upgrade
then run..

sudo apt-get install samba samba-common system-config-samba winbind

Now let's configure windbind by running the following command.

sudo gedit /etc/nsswitch.conf
in the nsswitch.conf file look for the following line

hosts:  files mdns4_minimal [NOTFOUND=return] dns mdns4
and replace it with this line below.
hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4
save the changes and reboot your system

sudo reboot
Set settings on samba by running the ff command:

sudo gedit /etc/samba/smb.conf
then set these following values under your Global Settings but replace the your_host_name_here with your hostname.


[global]
; netbios name = your_host_name_here
name resolve order = bcast host

save the text editor and restart samba

sudo restart smbd
adding samba user:
type samba in the ubuntu unity search box and open it.


















1. click preferences -> samba users -> add user

















2. select your username (in my case my username is dustro) for unix username, put value in windows username (in my case i put winuser) and set password.


3. create shared folder by going to File -> add share
4. set the Directory that you would like to share,  description and the permission check boxes.


5. click the access tab and select the user to have access with your shared folder.
6. click ok. you have now succesfully created a shared folder and a user which has an access to it.


Note: workgroup of both windows and ubuntu should be the same.
To change the workgroup of your linux machine...
1. open samba click Preferences -> server settings -> basic.
    (in my case, my workgroup in my windows machine is "samba" so i put samba as my workgroup in my ubuntu's samba server settings)

restart samba after doing this by running the ff. command.

sudo restart smbd

hmmmm... I think we have done setting up samba in our linux machine so it's now time to test if we can connect to this machine from windows.


Wednesday, July 2, 2014

Change Ubuntu hostname permanently.

Change hostname permanently on UBUNTU 14.04

in renaming the hostname, you must edit two files inside of your /etc folder. these files are the hosts and the hostname


sudo gedit /etc/hosts

"the following config will appear and you can now change the hostname of what you prefer"

127.0.0.1 localhost
127.0.1.1 hostname

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

then run..
sudo gedit /etc/hostname

"it will show you a hostname/word which is you current hostname. rename it into a new hostname that you prefer."

the run...
sudo reboot 

How To Fix Duplicate sources.list entry

if the following error occurs..

Duplicate sources.list entry http://dl.google.com/linux/chrome-remote-desktop/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome-remote-desktop_deb_dists_stable_main_binary-i386_Packages

change the name one of your sources list by doing the following commands...

cd /etc/apt/sources.list.d


ls


in my case it displayed this lists


chromeos.list chrome-remote-desktop.list dropbox.list google-chrome.list google-chrome.list~


rename the chrome-remote-desktop..


sudo mv chrome-remote-desktop.list /etc/apt/sources.list.d/chrome-remote-desktop.list.bak


run ls to check if you renamed it successfully

 ls
chromeos.list chrome-remote-desktop.list.bak dropbox.list google-chrome.list google-chrome.list~


then run...

sudo reboot


Sunday, June 8, 2014

how to disable ads in Ubuntu 14.04 Unity desktop search

In this tutorial we will do on how to get rid of amazon ads when you search your Ubuntu unity file/program search.

1.Click the ubuntu search button and type privacy.















2.click the privacy application icon.

3.click the search tab menu.

4.click the switch button into off

5. done!! you will now have an ad free application/file search.







Saturday, June 7, 2014

How to install Google Chrome Remote Desktop on Ubuntu 14.04

open a terminal and invoke the following command.

sudo gedit /etc/apt/sources.list.d/chromeos.list
it will open and editor, on the Editor, add this line below and click save. This will add the repository.

deb http://dl.google.com/linux/chrome-remote-desktop/deb/ stable main


Go back to the terminal and invoke this following commands.
 

sudo apt-get update

sudo apt-get install chrome-remote-desktop





When the installation is finished run this command on the terminal
sudo /etc/init.d/chrome-remote-desktop start