Non-root user installation software

Source: Internet
Author: User
Tags apc mysql download

The following is a brief description of the general process of installing software for non-root users under Linux:

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.

Non-root user installation Apache, PHP, mysqllinux installation software is not the same as Windows, click the mouse can be done, but previously contacted by the software warehouse using Yum or apt tools to install. Recently contacted the server version is older, no Yum and other software, installation software is installed from the source code. Due to security restrictions, the server can not directly access the external network (even two subnets can not be interoperable), wget way to obtain the software source code method is not OK. Because of the isolation of the route, the software can only be downloaded on the machine that can access the extranet, then copied to the test machine using RZ or samba, and then the development machine uses FTP to obtain the installation package from the test machine (both SCP and SSH are blocked). Of course, this is the pre-installation work. First, install Apache

Download the Apache2 installation source from the official website http://httpd.apache.org/download.cgi.

 1. Unzip    TAR-ZXVF  httpd.tar.gz 2.1 Custom installation path    cd /home/work/httpd   ./configure–prefix=/home/work/apache2–enable-mods-shared=most Note: Enable-mods-shared=most means that most modules are loaded (dynamic), using – Enable-mods-shared will automatically compile –enable-so 3. installation    make   make install  Port 80 used by non-root users will not be authorized. You may not be using root to start the apache,1~1024 port but only root bind. Therefore, you need to open/home/work/apache2/conf/httpd.conf to modify the owner, port information.  4. Start apache    /home/work/apache2/bin/apachectl-k start   Second, install MySQL download the compiled installation package from the official website:  http://www.mysql.com/downloads/mysql/, note that after practice 5.6 has a bug, the last choice is the 5.5 version.  0   Install MySQL dependent asynchronous IO Library: libaio.so (optional, if already skipped): Http://libaio.sourcearchive.com/downloads/0.3.104/libaio_ 0.3.104.orig.tar.gz  after decompression, modify the installation path (prefix) in the makefile as needed, then run make && make install.   If you are not installing with the root user, you need to add the liaio.so path to the dynamic link path, run vim ~/.bash_profile, and at the end of the line: Export ld_library_path=/path/to/liaio/ Lib: $LD _library_path 1. Unzip    tar-zxvf mysql-5.5.28.Tar.gz 2. Start mysql  1. Create database   mysql/scripts/mysql_install_db \
–user=mysql \
–basedir=/home/work/mysql \
–datadir=/home/work/mysql/data \
–no-defaults   2. Start the database (run in the background)    mysql/bin/mysqld_safe     3. Set the database user name, password      mysql/bin/mysqladmin-u root password ' 123456 '    4. Go to database   mysql-u root-p MySQL (database name) & nbsp   show database;   (a semicolon is important to view the current database name)     use MySQL;   (Enter the database named MySQL)     show tables; (Show all MySQL table names)      installed, the default is only localhost to access the data, access to MySQL from other places, need to authorize specific users.    //authorized root user access to database from anywhere     way a:    grant all privileges on * * to ' root ' @ '% ' identifie D by ' rootpasswd ' with GRANT option;    mode two:    update user set host = '% ' where user = ' root '; mys Ql>select host, user from user;    requires reload database (can stop database, restart, step 2):     mysqladmin-u root-p Relo ad    Three, install php http://www.php.net/downloads.php, the latest php5 is a bug, and finally selected 5.4.20 version.  1. Unzip    TAR-ZXVF php-5.4.20.tar.gz 2. Custom installation path   VIM  .bash_Profile, add:   mysql_lib= '/home/work/mysql/lib '    export ld_library_path= $MYSQL _lib: $LD _ library_path    cd/home/work/php-5.4.8   ./configure–prefix=/home/work/php–with-apxs2=/ Home/work/apache2/bin/apxs \   –with-mysql=/home/work/mysql  –with-pdo-mysql=/home/work/mysql \  –with-config-file-path=/home/work/php/etc–with-freetype-dir \ –with-jpeg-dir–with-png-dir–with-zlib– Enable-xml–disable-rpath–enable-bcmath \ –enable-shmop–enable-sysvsem–enable-inline-optimization  \  –enable-mbregex–enable-mbstring–with-gd–enable-gd-native-ttf–with-openssl \ –with-mhash– Enable-sockets–with-xmlrpc–enable-zip–enable-soap–enable-exif \ –enable-calendar  –enable-wddx– with-curl–with-mysqli  Note that there is a problem with the latest version of the –with-curl parameter, plus an error occurs. In addition Zend Optimizier is not available, so you need to add –set-opcache=no (there will be a hint, 5.4.20 do not need this option).  3. Installation    make   make Intallmake install may encounter " cannot Stat" ext/phar/phar.phar ': No such file or directory ' error, this is because Ext/phar/phar.phar this folder does not exist. Switch to the ext/phar/phar/directory, copy the phar.php file to ext/phar/, and rename it to Phar.phar (the problem is not 5.4.20).  4. Add apache2 Support for PHP file parsing opens httpd.conf, added: AddType application/x-httpd-php. php
AddType application/x-httpd-php. html
AddType application/x-httpd-php. php. phtml. php3. PhP4
AddType Application/x-httpd-php-source. Phps 5. Copy PHP.ini to etc under 6. Install APC, memcache download the installation package from the official website, and then compile the dynamic link library: Tar xzvf apc-3.0.19.tgz
/usr/local/webserver/php/bin/phpize
./configure–enable-apc–enable-apc-mmap–with-php-config=/usr/local/webserver/php/bin/php-config–prefix=/usr/ Local/apc
Make && make install phpMyAdmin download http://www.phpmyadmin.net/home_page/downloads.php from the official website and upload it to the web directory, After decompression. If necessary, you can set up alias.

Non-root user installation software

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.