Menu Close

Author: Luca

How to change the root password in Ubuntu

As default Ubuntu has no password set for the root user.

To gain root access you have to type in your own user password.

This is the password you set for the first user while installing Ubuntu.

 

To manually set a password for the root user, type in the following in the shell:

sudo passwd 

After that you are asked to type in the new root password twice.

 

Finally, your root user has its own password.

Setting up SSL: Ubuntu and Apache 2

 

Important Note!This steps were verified with Ubuntu 10.04 LTS, but this will be my last Ubuntu SSL how-to. I’ve switched to Debian — Ubuntu’s Unity interface is just plain silly on the desktop. So please refer to my Debian document in the future.This document requires that you’ve got a signed server.crt and a server.key file available. You may have just gone through my page Creating Certificate Authorities and self-signed SSL certificates. If not, go there first and follow the instructions.

The remaining steps involve Apache and other tweaks detailed step-by-step below. This file was originally written for Ubuntu 6.06, but has been kept current and verified with 10.04 Lucid Lynx. It should work with most/all releases in between — and probably Debian-based distros in general, with little or no modification.

Installing Apache2 With PHP5 And MySQL Support On Ubuntu 12.04 LTS (LAMP)

by howtoforge.com

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 12.04 LTS server with PHP5 support (mod_php) and MySQL support.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

I’m running all the steps in this tutorial with root privileges, so make sure you’re logged in as root: 

sudo su 

Install VMWare Tools on a Debian / Ubuntu Guest Virtual Machine

by electrictoolbox.com

Just over a year I posted how to install VMWare Tools on a Linux Guest Virtual Machine which specifically looks at installing VMWare Tools for Red Hat / CentOS. I recently set up a Debian 5 Lenny virtual machine using VMWare Server and installed the VMWare Tools and the process is fairly similar but I had a couple of issues due to it being a base install with no compiler so thought it a good idea to post how to install VMWare Tools on a Debian 5 Virtual Machine.

Note that the instructions here should work for any version of VMWare Workstation or Server, but I am only currently able to use the VMWare Server 1.0 console. The first instruction below where you select the install vmware tools option may be in a different location for different versions.

Note also that these instructions should also work for Debian derived Linux distros such as Ubuntu, Kubuntu, Xubuntu, Mepis, Knoppix etc.

 

Apache2 returns Internal Server Error serving HTTPS pages

Sometime configuring Apache2 for SSL it could return Internal Server Error.

If we look at error.log we have:

.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

This message tell us that we don’t have the module Rewrite or the module is not enabled.

For solve this issue, we can simple do:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Set domain name and port on MAGENTO

 

I manage a magento site where a live shop is running on one server on port 80 and a dev site is running on another server on port 3000. When copying the site from live to dev all I need to do is change two rows in the core_config_data table, having:

  • path=”web/unsecure/base_url”
  • path=”web/secure/base_url”

You need to add your port number at the end of the url and that is all. In my case those two rows look like this:

(config_id, scope, scope_id, path, value)
(default, 0, web/unsecure/base_url, ,http://www.dev-server.com:3000/)
(default, 0, web/secure/base_url, ,http://www.dev-server.com:3000/)

Note that I don’t have a certificate on my dev server so I am not using https as the secure base_url. If you wish to use https this setting should be changed to https and you should omitt the custom port at the end.

Modification of the standard .htaccess file is not needed, and should probably be avoided.

Ubuntu and static IP

By Andrea Corso

If you want set a static ip on your Ubuntu servers you can do:


# nano /etc/network/interfaces

set your eth0 interface as same:


auto eth0
iface eth0 inet static
 address 192.168.0.100
 netmask 255.255.255.0
 network 192.168.0.0
 broadcast 192.168.0.255
 gateway 192.168.0.1

Save and exit. Now launch:


# /etc/init.d/networking restart
# nano /etc/resolv.conf

and put this: nameserver 192.168.0.1. NOTE: the address after nameserver will be the same of gateway!

Automatically Adjust the Process Priority

by ghacks.net

There is no automatic way to adjust the priority of a process in Windows using the default tools supplied by Microsoft. It is possible to adjust the current process priority but this setting is only valid for the current setting. Once the process gets killed, for example by closing the application or rebooting, it reverts the priority back to the default one.

But what if you want to do it automatically ? Say you happen to transcode videos every now and then and want that process to be below normal to continue working with your computer during the process. Or you would like to assign a higher process priority to a game that you like to play and that needs all the cpu cycles that it can get.

I can tell from personal experience that there are many applications where an automatic adjustment of the process priority would come in handy.

process priority

 

Accesso a pannello amministrativo magento e magento connect

Il percorso per accedere al pannello amministrativo di magento è:

http://nomesito/magento/index.php/admin/

 

Provando ad utilizzare magento connect è possibile che esca il messaggio:

Warning: Your Magento folder does not have sufficient write permissions.

If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) or set up FTP Connection on the Magento Connect Manager Settings tab.

apache/php, serving php files for download instead of executing them

I have seen a couple of threads like this, but they were not very helpful.

My problem is: When I try to execute my php files in my browser from my ubuntu hardy server, the browser offers to download the files instead of the server proccessing them.

whats worse the file it allows me to download is not the proccessed output but the “code” file. these files could have database name, password and what not. Not so good!!!

For some reason though, my webmin works. (probably because its https and not http)

First off all, it has worked before. I haven’t used it for quite a while, but resently i updated webmin to version 1.500 (dont know if this is the reason for my problems), but I just noticed problems after the update.