Article Directory
- One, linux application basics
- Two, RPM package
- Three, source code compilation overview
- Four, apache installation and testing
-
- 4.1 Package files and programs required for installation
- 4.2 apache installation process
- Five, yum installation
One, linux application basics
1.1 The relationship between application and system commands
1.2 Directory structure of a typical application
1.3 Common package types
Two, RPM package
2.1 RPM package management tool
The full name is Red-Hat Package Manager
proposed by Red-Hat company and adopted by many Linux distributions;
establish a unified database file;
record in detail software package installation, uninstallation and other change information;
automatically analyze package dependencies, only analysis Dependency, but the dependency cannot be resolved.
2.2 RPM package
Software material reference: http://www.rpm.org
General command format:
2.3 rpm command format
The rpm command can realize almost all management functions of the RPM software package;
execute the "man rpm" command to get detailed help information of the rpm command
2.4 rpm command function
Query and verify the relevant information of the RPM software package
Install, upgrade, uninstall the RPM software package,
maintain RPM database information and other comprehensive management operations
2.5 Query RPM Software Package Information
2.5.1 Query information about installed RPM software
Code format
rpm -q[suboption] [software name]
Common options
2.5.2 Query the information in the RPM package file that is not installed
Code format
rpm -qp[suboption] RPM package file
Common options
2.6 Query rpm package information
2.7 Resolving software package dependencies
2.7.1 When installing multiple software with dependencies
Dependent software packages need to be installed first;
multiple .rpm package files can be specified for installation at the same time
2.7.2 When uninstalling multiple software with dependencies
Software packages that depend on other programs need to be uninstalled first;
multiple software names can be specified at the same time to uninstall
2.7.3 Ignore dependencies
Combined with "-nodeps" option, but may cause software abnormalities
Three, source code compilation overview
3.1 Advantages of installing software using source code
Get the latest goose software version, fix bugs in time;
customize software functions flexibly according to user needs
3.2 Examples of applications
When installing a new version of the application; when the
currently installed program cannot meet your needs; when you
need to add new features to the application
3.3 Tarball packet
".Tar.gz" and ".tar.bz2" formats are mostly
Software material reference: http://sourceforge.net
3.4 Confirm the source code compilation environment
Need to install a compiler that supports C/C++ programming language
such as: gcc, gcc-c++, make......
3.5 Compile and install process
Four, apache installation and testing
4.1 Package files and programs required for installation
4.1.1 apache dependent packages
4.1.2 apache supporting package
4.2 apache installation process
first step:
Use "tar command" to decompress the compressed package first
[root@server1 ~]#tar zxvf apr-1.6.2.tar.gz
[root@server1 ~]#tar zxvf apr-util-1.6.0.tar.gz
[root@server1 ~]#tar jxvf httpd-2.4.29.tar.bz2
Then move the unzipped package to the corresponding directory
[root@server1 ~]#mv apr-1.6.2 httpd-2.4.29/srclib/apr
[root@server1 ~]#mv apr-util-1.6.0 tttpd-2.4.29/srclib/apr-util
Use yum to configure dependent programs
yum -y install gcc gcc-c++ make pcre-devel zlib-devel expat-devel perl
Among them, gcc, gcc-c++ and make are installed at the beginning of the shell, so it does not matter if they are not installed.
Step 2: ./configure configuration
[root@server1 ~]#cd httpd-2.4.29/
[root@server1 ~]#./configure
Step 3: Compile and install
[root@server1 ~]#make && make install
Step 4: Start the service
[root@server1 ~]# /usr/local/apache2/bin/apachectl
Step 5: The server verifies whether the service is enabled
[root@server1 ~]#netstat -anpt | grep httpd
If enabled, the service name and port 80 will be displayed, as shown below:
Step 6: Local test
Open the browser http://192.168.10.11 or http://localhost to display the following result indicating that the service has been enabled.
Step Seven: Microsoft Client Test
Open the browser http://192.168.10.11 and press Enter to display the following result for the service to start.
Five, yum installation
5.1 yum installation
[root@server1 ~]#yum -y install xxx
5.2 yum uninstall
[root@server1 ~]#yum -y remove xxx
5.3 yum clear cache
[root@server1 ~]#yum clean all
5.4 yum build cache
[root@server1 ~]#yum makecache