1. Get the source code, usually the wget way, Ubuntu can use apt-get source to get the code.
2. Extract the source code, general use TAR-ZXVF xxx.tar.gz can
3. Switch to the extracted directory and run the./configure. Its options can be obtained through the./configure–help, the most important thing under the non-root user is to define the installation directory, which should be defined./configure–prefix=/path/to/bin, for some dependent libraries, may also need to be used. Configure–prefix=xxx–with-xx-dir=xxx this form.
4. Then compile the source code and install the software: Make && make install. These two commands can be separated, because the compiler can specify the parameter-j to compile in parallel, which can speed up the compilation progress.
5. Update the path PATH. Using export Path=/path/to/bin: $PATH, this phrase runs in the shell window only valid in this session and can be written to. bashrc or. Bash_profile to make it valid for the current user.
6. If you are installing a dynamic-link library, you need to update the dynamic-link library path: Export ld_library_path=/path/to/library: $LD _library_path, also the Export command, It is best to write it under the. bashrc file for automatic invocation at the time of login.
Examples can be found in: http://www.tlanyan.me/install-apache2-php-mysql-with-none-root/
General procedures for installing software under Linux for non-root users: