Linux3 Source Code Installation

Source: Internet
Author: User
Tags openssl openssl library syslog

Source Code Installation: There is no dependency through Yum (installing MySQL is installing MySQLServer). RPM Update, if you do not install the software to go back to the installation. Application and system commands are placed in different directories (bin,sbin,usr/bin,usr/sbin), and if Yum cannot be found and there is no RPM package, it will need to be installed after compiling itself. Condition:1-qa | grep gcc: If you find LIBGCC, this is not a compilation environment, just a library. [Email protected]:/# apt-get install gcc2. Application source code. Open the browser to download Nginx source code (development development version is relatively new but unstable, stable is stable version, beta test version)

zip is windows,tar.gz is Linux. [Email protected]:/usr# Find/-name nginx-1.13.8. tar.gz/home/yw1989/downloads/nginx-1.13.8. tar.gz1. Unzip the tarball. [Email protected]:/home/yw1989/downloads# Tar zxf nginx-1.13.8. Tar.gz[email protected]:/home/yw1989/downloads# CD nginx-1.13.8: Enter this directory to [email protected]:/home/yw1989/downloads/nginx-1.13.8# Lsauto changes.ru Configure HTML man srcchanges conf contrib LICENSE readme[email PROTECTE D]:/home/yw1989/downloads/nginx-1.13.8# cd SRC: Go into the source code [email protected]:/home/yw1989/downloads/nginx-1.13.8/src# Lscore Event HTTP Mail misc OS streamcore: Is the core, Linux inside many methods are written in C language. 2. Pre-compilation configuration work (check work) (which directory to install, whether dependent programs are required, etc.).

After entering the nginx-1.13. 8 root directory There will be a config file, or script, the program is compiled based on config, so config is used to complete the pre-compilation configuration work. [Email protected]:/home/yw1989/downloads/nginx-1.13.8#/configure--  help--help this                               message  --prefix=path                      to which directory  to install the software --sbin-path=path                   Which directory  the Nginx execution program installs to --modules-path=path                set modules  path--conf-path=path                   where  to install the configuration file --error-log-path=path              error log set to which   --pid-path=path                    process file PID settings to where   -- Lock-path=path                   where to place locked files
[Email protected]:/home/yw1989/downloads/nginx-1.13.8#./Configure (go to default configuration, do not specify anything) checking forOS+ Linux 4.13.0-32-Generic x86_64checking forC compiler ... found+using GNU C compiler+ gcc version:5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) Checking forGcc-pipeSwitch. .. foundchecking for-wl,-eSwitch. .. foundchecking forGCC builtin atomic operations ... found ./configure:error:the HTTP Rewrite module requires the PCRE library. : Error, missing pcre dependent library can either disable the module by using--without-http_rewrite_module
Ubuntu installation nginx prompt error:the HTTP rewrite module requires the PCRE library needs to install PCRE package. sudo apt-get updatesudo apt-get install libpcre3 libpcre3-Dev You may also need to install sudo apt-get installed OpenSSL Libssl-dev
[Email protected]:/home/yw1989/downloads/nginx-1.13.8#./Configure: Again configure (check whether the current environment meets the compilation requirements, meet to compile,) Configuration summary+using System PCRE Library+OpenSSL Library is not used+The using System zlib libraryconfigure is just a check procedure: Checking forPCRE Library ... found: Find the PCRE gallery checking forzlib Library ... foundchecking forsys/filio.h ... not foundchecking forsys/param.h ... foundchecking forsys/mount.h ... foundchecking forsys/statvfs.h ... foundchecking forcrypt.h found nginx path prefix:"/usr/local/nginx": The path that will be installed is nginx binary file:"/usr/local/nginx/sbin/nginx": The Nginx executable file that will be installed Nginx modules path:"/usr/local/nginx/modules"nginx configuration prefix:"/usr/local/nginx/conf": The configuration file that will be installed Nginx"/usr/local/nginx/conf/nginx.conf"nginx pid File:"/usr/local/nginx/logs/nginx.pid": Will install the PID file nginx error log file:"/usr/local/nginx/logs/error.log": The error file that will be installed is Nginx HTTP access log file:"/usr/local/nginx/logs/access.log"nginx HTTP client request body temporary files:"Client_body_temp"nginx HTTP proxy temporary files:"Proxy_temp"nginx http fastcgi temporary files:"Fastcgi_temp"nginx http Uwsgi temporary files:"Uwsgi_temp"nginx http scgi temporary files:"Scgi_temp"
1. Compile. Make to compile and make install. [Email protected]:/home/yw1989/downloads/nginx-1.13.8-F objs/makefilemake[1]: Entering Directory '/home/yw1989/downloads/nginx-1.13.8 '-c-pipe  -o-w-wall-wpointer-arith- Wno-unused-parameter-werror-g  -I src/core-i src/event-i src/event/modules-i Src/os/unix-I     objso-O BJS/SRC/CORE/NGINX.O \
2. Post-compilation installation. [Email protected]:/home/yw1989/downloads/nginx-1.13.8# make Installmake-F objs/Makefile install[email protected]:/usr/local# CD nginx/[email protected]:/usr/local/nginx# lsconf HTML logs sbin[email protected]:/usr/local/nginx# CD Sbin[email protected]:/usr/local/nginx/sbin# Lsnginx: This is the execution program (EXE main execution program on Windows) [email protected]:/usr/local/nginx/sbin# Ps-ef |grep nginxroot12420 3626 0 21:39 pts/2 00:00:00 grep--color=Auto Nginx: not implemented [email protected]:/usr/local/nginx/sbin#./Nginx: Run up Nginx[email protected]:/usr/local/nginx/sbin# Ps-ef |grep nginxroot12422 2571 0 21:39? 00:00:00 Nginx:master process.Nginx: Run up, master process and worker process two main processes are running nobody12423 12422 0 21:39? 00:00:00Nginx:worker Processroot12425 3626 0 21:39 pts/2 00:00:00 grep--color=Auto Nginx Installation software can be installed via yum,rpm, source code 3. First through Yum installation, Yum can not find the use of rpm,rpm do not use the source code installation. 
management of users and groups:
Linux accounts are divided into 2 types of user accounts and group accounts. User account: Divided into ordinary users and super users, ordinary users can only operate in a specific folder, the Superuser can operate on all folders and control of ordinary users. Group accounts: Groups are collections of users, components are private groups and public groups, and it is recommended that a user who does not specify a group creates a private group with the same name as the user (private groups and user names with the same name and only a user), and the standard group can accommodate multiple users. [Email protected]:/etc# vim passwd: Stores the user information created by the system each row of columns (user name, login name: password, x is ciphertext: ID Number: Group identification number: Description: Log in after the directory: command interpreter, the root user login in the default to use the Bash interpreter ,/usr/sbin/Nologin is a system built-in account, some features, is not able to log on the system root:x:0:0:root:/root:/bin/bashdaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologinbin:x:2:2:bin:/bin:/usr/sbin/nologinsys:x:3:3:sys:/dev:/usr/sbin/nologinsync:x:4:65534:sync:/bin:/bin/syncsystemd-timesync:x:100:102:systemd time synchronization,,,:/run/systemd:/bin/falsesystemd-NETWORK:X:101:103:SYSTEMD Network Management,,,:/run/systemd/netif:/bin/falsesystemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/falsesystemd-BUS-PROXY:X:103:105:SYSTEMD Bus proxy,,,:/run/systemd:/bin/falsesyslog:x:104:108::/home/syslog:/bin/false_apt:x:105:65534::/nonexistent:/bin/falsemessagebus:x:106:110::/var/run/dbus:/bin/falseuuidd:x:107:111::/run/uuidd:/bin/false
(x is the password, in the passwd file is not visible, shadow store is the user password) [email protected]:/etc# Vim Shadow (the second column is the encrypted password,*because it is not possible to login the system, so no password,) root:$6$dnwnw/hb$pvrspit9gcauqvtdiuhryccyondfw6utsfrzco9cxlsqzmql77t9t6ffkibsoes3c3ricta.t2akns3b19zn4/ : 17574:0:99999:7: ::d Aemon:*:17379:0:99999:7::: Bin:*:17379:0:99999:7::: sys:*:17379:0:99999:7:: : Sync:*:17379:0:99999:7:: : Games:*:17379:0:99999:7:: : Man:*:17379:0:99999:7: ::p Roxy:*:17379:0:99999:7::: www-data:*:17379:0:99999:7::: Backup:*:17379:0:99999:7::: List:*:17379:0:99999:7:: : IRC:*:17379:0:99999:7:::
[Email protected]:/etc# VIM Group: View the group's information (the first column is the group name: The second column is the group password: The third column is the representation number of the group: The last column is the user in the group) Root:x:0:d aemon:x: 1: bin:x:2: sys:x: 3: adm:x:4: syslog,yw1989tty:x:5:d isk:x:6  : kmem:x::d ialout:x:£ ºcdrom:x:yw1989floppy:x:tape:x : : sudo:x:27:yw1989
View group Password: (where the group password is saved) [email protected]:/etc# vim gshadowroot:*::d aemon:*:: Bin:* :: sys:*:: adm:*:: syslog,yw1989tty:*::d ISK:*:: LP:*:: Mail:* :: News:*:: UUCP:*:: Man:*::p Roxy:*::
--------------------------------------------------------------------------------------------------------------- ---------more of the passwd and group files are used. Create User: [email protected]:/# Useradd Yw1[email protected]:/# Vim etc/passwdyw1:x:1001:1001::/home/YW1: [email protected]:/# useradd-c "Shushi"yw2: Add user [email protected]:/# Vim etc/passwdyw2:x:1002:1002:shushi:/home/Yw2:[email protected]:/# passwd YW1: add password EnterNewUNIX Password:retypeNewUNIX Password:passwd:password updated successfully[email protected]:/# userdel YW2: Delete User (when deleting the user, the private group is still in) [email protected]:/# Vim etc/passwd creates a private group with the same name when the user is created (only one user can not be added by other users), [email protected]:/# Vim etc/groupyw1:x:1001:: Private group with the same name
[Email protected]:/# Groupadd Yw1group (created is a standard group, other users can add in) yw1group:x:1002: [email protected]:/  # Groupdel  yw1group: Delete Group [email protected]:/# useradd-G yw1group yw4: User yw4 join Yw1group Group (YW4 is non-existent user) [email Protected]:/# vim etc/groupyw1group:x:1002: YW4:YW4 user inside the standard group yw4:x: 1005:: And also creates a private group of YW4 [ Email protected]:/# vim etc/passwdyw4:x:1004:1005::/home/yw4:
Linux System Management
 linux must have a password or not be able to log on to the system.   PASSWD: Modify Current user password [email protected]: /# vim etc/login.defs pass_max_days  99999 0: Minimum password days pass_ Warn_age  7su -root,su- yw1989: Toggle user sudo : is to borrow root account permissions to do what ordinary users cannot do [email protected]:  ~$ ID: View the current user's Uid,gid,groupsuid  =1000 (yw1989) GID  =1000 (yw1989) groups=1000 (yw1989), 4 (ADM), (c Drom), (sudo), (DIP), (Plugdev), 113 (Lpadmin), (Sambashare), 999 (Docker) [email  protected]:  ~$ groups: View the current user in which group yw1989 ADM cdrom sudo dip Plugdev lpadmin Sam Bashare docker[email protected]:  ~$ pwd: View current directory /home/yw1989 

Linux3 Source Code Installation

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.