Posts

Showing posts from March, 2014

php 5.3, 5.4, 5.5 upgrade/downgrade in ubuntu 12.04

The start is from php 5.3.10, a ubuntu 12.04 default version.   Upgrade to 5.4.x  sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/ php5-oldstable sudo apt-get update sudo apt-get install php5 Upgrade to 5.5.x  sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/ php5 sudo apt-get update sudo apt-get install php5 Downgrade to 5.4.x from 5.5.x sudo apt-get install -y ppa-purge sudo add-apt-repository -y ppa:ondrej/php5-oldstable sudo apt-get update sudo ppa-purge ppa:ondrej/php5 sudo apt-get update sudo apt-get upgrade -y  sudo apt-get autoremove -y  sudo apt-get autoclean Downgrade to 5.3.x from 5.5.x sudo apt-get install -y ppa-purge sudo ppa-purge ppa:ondrej/php5 sudo apt-get update sudo apt-get upgrade -y  sudo apt-get autoremove -y  sudo apt-get autoclean Downgrade to 5.3.x from 5.4.x sudo apt-get install -y ppa-purge sudo ppa-purge pp...

sudo without password to write to file that need root right

It is necessary that sometimes you need to write the data  to the root files with "sudo" and "password". But if you need to set auto-run scripts, then it is a problem to enter the password. Here is the way how you do it in Linux system. Change the owner of the file defaultly with root right to the username and group who you are used to write the data: sudo chown -R username:group /path/to/root/directory That is all,  pretty simple. Then you can set a cronjob to write and modify the directory now. 

LInux system structure

reference:  http://slashmedia.wordpress.com/2007/12/23/linux-directory-structure/ The directory structure of Linux/other Unix-like systems is very intimidating for the new user, especially if he/she is migrating from Windows. In Windows, almost all programs install their files (all files) in the directory named: `Program Files.’ Such is not the case in Linux. The directory system categorises all installed files. All configuration files are in /etc, all binary files are in /bin or /usr/bin or /usr/local/bin. Here is the entire directory structure along with what they contain: /  – Root directory that forms the base of the file system. All files and directories are logically contained inside the root directory regardless of their physical locations. /bin  – Contains the executable programs that are part of the Linux operating system. Many Linux commands, such as cat, cp, ls, more, and tar, are locate in /bin /boot  – Contains the Linux kernel and other files...