[toc]
LAMP是指一组通常一起使用来运行动态网站或者服务器的自由软件名称首字母缩写:
1、Linux;操作系统;
2、Apache;网页服务器;
3、MariaDB或MySQL,数据库管理系统(或者数据库服务器);
4、PHP、Perl或Python,脚本语言;
在web服务器方面 | 在对数据进行处理的进程方面 | |
---|---|---|
cgi | fork一个新的进程进行处理 | 读取参数,处理数据,然后就结束生命期 |
fastcgi | 用tcp方式跟远程机子上的进程或本地进程建立连接 | 要开启tcp端口,进入循环,等待数据的到来,处理数据 |
[root@localhost ~]# dnf -y install epel-release vim
[root@localhost ~]# dnf -y groups mark install "Development Tools"
[root@localhost ~]# useradd -r -M -s /sbin/nologin apache
[root@localhost ~]# dnf -y install openssl-devel pcre-devel expat-devel libtool gcc gcc-c++ make
[root@localhost ~]# dnf -y install bzip2
[root@localhost ~]# tar xf apr-1.6.3.tar.bz2
[root@localhost ~]# tar xf apr-util-1.6.1.tar.bz2
[root@localhost ~]# tar xf httpd-2.4.43.tar.bz2
[root@localhost ~]# ls
anaconda-ks.cfg apr-util-1.6.1.tar.bz2
apr-1.6.3 httpd-2.4.43
apr-1.6.3.tar.bz2 httpd-2.4.43.tar.bz2
apr-util-1.6.1
[root@localhost apr-1.6.3]# vim configure
cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
[root@localhost apr-1.6.3]# ./configure --prefix=/usr/local/apr
[root@localhost apr-1.6.3]# make
[root@localhost apr-1.6.3]# make install
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr
[root@localhost apr-util-1.6.1]# make
[root@localhost apr-util-1.6.1]# make install
[root@localhost httpd-2.4.43]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork
[root@localhost httpd-2.4.43]# make
[root@localhost httpd-2.4.43]# make install
[root@localhost ~]# echo ‘export PATH=/usr/local/apache/bin:$PATH‘ > /etc/profile.d/httpd.sh
[root@localhost ~]# source /etc/profile.d/httpd.sh
[root@localhost ~]# ln -s /usr/local/apache/include/ /usr/include/httpd
[root@localhost ~]# vim /etc/man_db.conf
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
MANDATORY_MANPATH /usr/local/apache/man
[root@localhost ~]# apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# yum -y install ncurses-devel openssl-devel openssl cmake mariadb-devel
[root@localhost ~]# useradd -r -M -s /sbin/nologin mysql
[root@localhost ~]# tar xf mysql-5.7.33-linux-glibc2.12-x86_64.tar.gz
[root@localhost ~]# mv mysql-5.7.33-linux-glibc2.12-x86_64 /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls
apache etc lib64 share
apr games libexec src
apr-util include mysql-5.7.33-linux-glibc2.12-x86_64
bin lib sbin
[root@localhost local]# mv mysql-5.7.33-linux-glibc2.12-x86_64/ mysql
[root@localhost local]# ls
apache apr-util etc include lib64 mysql share
apr bin games lib libexec sbin src
[root@localhost local]# chown -R mysql.mysql mysql/
[root@localhost local]# ll
total 0
drwxr-xr-x. 13 root root 152 May 12 21:50 apache
drwxr-xr-x. 6 root root 58 May 12 21:44 apr
drwxr-xr-x. 5 root root 43 May 12 21:45 apr-util
drwxr-xr-x. 2 root root 6 May 19 2020 bin
drwxr-xr-x. 2 root root 6 May 19 2020 etc
drwxr-xr-x. 2 root root 6 May 19 2020 games
drwxr-xr-x. 2 root root 6 May 19 2020 include
drwxr-xr-x. 2 root root 6 May 19 2020 lib
drwxr-xr-x. 3 root root 17 Mar 24 09:08 lib64
drwxr-xr-x. 2 root root 6 May 19 2020 libexec
drwxr-xr-x. 9 mysql mysql 129 May 12 22:08 mysql
drwxr-xr-x. 2 root root 6 May 19 2020 sbin
drwxr-xr-x. 5 root root 49 Mar 24 09:08 share
drwxr-xr-x. 2 root root 6 May 19 2020 src
[root@localhost local]# echo ‘export PATH=/usr/local/mysql/bin:$PATH‘ > /etc/profile.d/mysql.sh
[root@localhost local]# source /etc/profile.d/mysql.sh
[root@localhost local]# ln -s /usr/local/mysql/include/ /usr/include/mysql/
[root@localhost local]# vim /etc/ld.so.conf.d/mysql.conf
[root@localhost local]# cat /etc/ld.so.conf.d/mysql.conf
/usr/local/mysql/lib
[root@localhost local]# ldconfig
[root@localhost local]# vim /etc/man_db.conf
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
MANDATORY_MANPATH /usr/local/apache/man
MANDATORY_MANPATH /usr/local/mysql/man
[root@localhost local]# mkdir /opt/data
[root@localhost local]# chown -R mysql.mysql /opt/data/
[root@localhost local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/opt/data/
qaSU!&qXe9p3
FiE15gq,6XoE
[root@localhost local]# cat > /etc/my.cnf <<EOF
> [mysqld]
> basedir = /usr/local/mysql
> datadir = /opt/data
> socket = /tmp/mysql.sock
> port = 3306
> pid-file = /opt/data/mysql.pid
> user = mysql
> skip-name-resolve
> EOF
[root@localhost local]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@localhost local]# vim /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/opt/data
[root@localhost local]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.33
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> set password=password(‘hzy123‘);
Query OK, 0 rows affected, 1 warning (0.00 sec)
[root@localhost local]# chkconfig --add mysqld
[root@localhost local]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use ‘systemctl list-unit-files‘.
To see services enabled on particular target use
‘systemctl list-dependencies [target]‘.
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost local]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
[root@localhost local]# yum -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libicu-devel libjpeg libjpeg-devel libpng libpng-devel openldap-devel pcre-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel mhash mhash-devel
[root@localhost local]# dnf -y install php*
[root@localhost local]# systemctl start php-fpm
[root@localhost local]# systemctl enable php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
[root@localhost php-fpm]# vim /etc/php-fpm.d/www.conf
;listen = /run/php-fpm/www.sock
listen = 0.0.0.0:9000
[root@localhost php-fpm]# systemctl restart php-fpm
[root@localhost php-fpm]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
[root@localhost ~]# vim /etc/httpd24/httpd.conf
LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
root@localhost ~]# mkdir /usr/local/apache/htdocs/hzy.com
[root@localhost ~]# cd /usr/local/apache/htdocs/hzy.com
[root@localhost hzy.com]# cd ..
[root@localhost htdocs]# ls
hzy.com index.html
[root@localhost htdocs]# vim index.php
[root@localhost htdocs]# cat index.php
<?php
phpinfo();
?>
[root@localhost htdocs]# mv index.php hzy.com/
[root@localhost htdocs]# ls
hzy.com index.html
[root@localhost htdocs]# cd hzy.com/
[root@localhost hzy.com]# ls
index.php
[root@localhost htdocs]# chown -R apache.apache /usr/local/apache/htdocs/
[root@localhost httpd24]# vim httpd.conf
Include /etc/httpd24/extra/vhosts.conf
[root@localhost extra]# vim vhosts.conf
[root@localhost extra]# cat vhosts.conf
lHost *:80>
DocumentRoot "/usr/local/apache/htdocs/hzy.com"
ServerName www.hzy.com
ProxyRequests Off
ProxyPassMatch ^/(.*\.php)$ fcgi://0.0.0.0:9000/usr/local/apache/htdocs/hzy.com/$1
<Directory "/usr/local/apache/htdocs/hzy.com">
Options none
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
[root@localhost httpd24]# vim httpd.conf
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
[root@localhost httpd24]# apachectl stop
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost httpd24]# /usr/local/apache/bin/apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost httpd24]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
[root@localhost ~]# dnf -y install gcc gcc-c++ pcre-devel zlib-devel openssl openssl-devel make expat-devel libtool
[root@localhost ~]# dnf -y install epel-release vim
[root@localhost ~]# dnf -y groups mark install "Development Tools"
[root@localhost ~]# useradd -r -M -s /sbin/nologin apache
[root@localhost httpd-2.4.43]# chown -R apache.apache /usr/local/apache/
[root@localhost ~]# dnf -y install openssl-devel pcre-devel expat-devel libtool gcc gcc-c++ make
[root@localhost ~]# dnf -y install bzip2
[root@localhost ~]# tar xf apr-1.6.3.tar.bz2
[root@localhost ~]# tar xf apr-util-1.6.1.tar.bz2
[root@localhost ~]# tar xf httpd-2.4.43.tar.bz2
[root@localhost ~]# ls
anaconda-ks.cfg apr-util-1.6.1.tar.bz2
apr-1.6.3 httpd-2.4.43
apr-1.6.3.tar.bz2 httpd-2.4.43.tar.bz2
apr-util-1.6.1
[root@localhost apr-1.6.3]# vim configure
cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
[root@localhost apr-1.6.3]# ./configure --prefix=/usr/local/apr
[root@localhost apr-1.6.3]# make
[root@localhost apr-1.6.3]# make install
[root@localhost apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr
[root@localhost apr-util-1.6.1]# make
[root@localhost apr-util-1.6.1]# make install
[root@localhost httpd-2.4.43]# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork
[root@localhost httpd-2.4.43]# make
[root@localhost httpd-2.4.43]# make install
[root@localhost ~]# echo ‘export PATH=/usr/local/apache/bin:$PATH‘ > /etc/profile.d/httpd.sh
[root@localhost ~]# source /etc/profile.d/httpd.sh
[root@localhost ~]# ln -s /usr/local/apache/include/ /usr/include/httpd
[root@localhost ~]# echo ‘MANPATH /usr/local/apache/man‘ >> /etc/man.config
[root@localhost ~]# sed -i ‘/#ServerName/s/#//g‘ /etc/httpd24/httpd.conf
[root@localhost extra]# cat /etc/systemd/system/httpd.service
Description=Start httpd
[Service]
Type=simple
EnvironmentFile=/etc/httpd24/httpd.conf
ExecStart=/usr/local/apache/bin/httpd -k start -DFOREGROUND
ExecReload=/usr/local/apache/bin/httpd -k graceful
ExecStop=/bin/kill -WINCH
[Install]
WantedBy=multi-user.target
[root@localhost ~]# apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# yum -y install ncurses-devel openssl-devel openssl cmake mariadb-devel
[root@localhost ~]# useradd -r -M -s /sbin/nologin mysql
[root@localhost ~]# tar xf mysql-5.7.33-linux-glibc2.12-x86_64.tar.gz
[root@localhost ~]# mv mysql-5.7.33-linux-glibc2.12-x86_64 /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# ls
apache etc lib64 share
apr games libexec src
apr-util include mysql-5.7.33-linux-glibc2.12-x86_64
bin lib sbin
[root@localhost local]# mv mysql-5.7.33-linux-glibc2.12-x86_64/ mysql
[root@localhost local]# ls
apache apr-util etc include lib64 mysql share
apr bin games lib libexec sbin src
[root@localhost local]# chown -R mysql.mysql mysql/
[root@localhost local]# ll
total 0
drwxr-xr-x. 13 root root 152 May 12 21:50 apache
drwxr-xr-x. 6 root root 58 May 12 21:44 apr
drwxr-xr-x. 5 root root 43 May 12 21:45 apr-util
drwxr-xr-x. 2 root root 6 May 19 2020 bin
drwxr-xr-x. 2 root root 6 May 19 2020 etc
drwxr-xr-x. 2 root root 6 May 19 2020 games
drwxr-xr-x. 2 root root 6 May 19 2020 include
drwxr-xr-x. 2 root root 6 May 19 2020 lib
drwxr-xr-x. 3 root root 17 Mar 24 09:08 lib64
drwxr-xr-x. 2 root root 6 May 19 2020 libexec
drwxr-xr-x. 9 mysql mysql 129 May 12 22:08 mysql
drwxr-xr-x. 2 root root 6 May 19 2020 sbin
drwxr-xr-x. 5 root root 49 Mar 24 09:08 share
drwxr-xr-x. 2 root root 6 May 19 2020 src
[root@localhost local]# echo ‘export PATH=/usr/local/mysql/bin:$PATH‘ > /etc/profile.d/mysql.sh
[root@localhost local]# source /etc/profile.d/mysql.sh
[root@localhost local]# ln -s /usr/local/mysql/include/ /usr/include/mysql/
[root@localhost local]# vim /etc/ld.so.conf.d/mysql.conf
[root@localhost local]# cat /etc/ld.so.conf.d/mysql.conf
/usr/local/mysql/lib
[root@localhost local]# ldconfig
[root@localhost local]# vim /etc/man_db.conf
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
MANDATORY_MANPATH /usr/local/apache/man
MANDATORY_MANPATH /usr/local/mysql/man
[root@localhost local]# mkdir /opt/data
[root@localhost local]# chown -R mysql.mysql /opt/data/
[root@localhost local]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/opt/data/
qaSU!&qXe9p3
FiE15gq,6XoE
[root@localhost local]# cat > /etc/my.cnf <<EOF
> [mysqld]
> basedir = /usr/local/mysql
> datadir = /opt/data
> socket = /tmp/mysql.sock
> port = 3306
> pid-file = /opt/data/mysql.pid
> user = mysql
> skip-name-resolve
> EOF
[root@localhost local]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[root@localhost local]# vim /etc/init.d/mysqld
basedir=/usr/local/mysql
datadir=/opt/data
[root@localhost local]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.33
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> set password=password(‘hzy123‘);
Query OK, 0 rows affected, 1 warning (0.00 sec)
[root@localhost local]# chkconfig --add mysqld
[root@localhost local]# chkconfig --list
Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use ‘systemctl list-unit-files‘.
To see services enabled on particular target use
‘systemctl list-dependencies [target]‘.
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost local]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
[root@localhost local]# yum -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libicu-devel libjpeg libjpeg-devel libpng libpng-devel openldap-devel pcre-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel mhash mhash-devel
[root@localhost local]# dnf -y install php*
[root@localhost local]# systemctl start php-fpm
[root@localhost local]# systemctl enable php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/php-fpm.service → /usr/lib/systemd/system/php-fpm.service.
[root@localhost php-fpm]# vim /etc/php-fpm.d/www.conf
;listen = /run/php-fpm/www.sock
listen = 0.0.0.0:9000
[root@localhost php-fpm]# systemctl restart php-fpm
[root@localhost php-fpm]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
[root@localhost ~]# vim /etc/httpd24/httpd.conf
LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
root@localhost ~]# mkdir /usr/local/apache/htdocs/hzy.com
[root@localhost ~]# cd /usr/local/apache/htdocs/hzy.com
[root@localhost hzy.com]# cd ..
[root@localhost htdocs]# ls
hzy.com index.html
[root@localhost htdocs]# vim index.php
[root@localhost htdocs]# cat index.php
<?php
phpinfo();
?>
[root@localhost htdocs]# mv index.php hzy.com/
[root@localhost htdocs]# ls
hzy.com index.html
[root@localhost htdocs]# cd hzy.com/
[root@localhost hzy.com]# ls
index.php
[root@localhost htdocs]# chown -R apache.apache /usr/local/apache/htdocs/
[root@localhost httpd24]# vim httpd.conf
Include /etc/httpd24/extra/vhosts.conf
[root@localhost extra]# vim vhosts.conf
[root@localhost extra]# cat vhosts.conf
lHost *:80>
DocumentRoot "/usr/local/apache/htdocs/hzy.com"
ServerName www.hzy.com
ProxyRequests Off
ProxyPassMatch ^/(.*\.php)$ fcgi://0.0.0.0:9000/usr/local/apache/htdocs/hzy.com/$1
<Directory "/usr/local/apache/htdocs/hzy.com">
Options none
AllowOverride none
Require all granted
</Directory>
</VirtualHost>
[root@localhost httpd24]# vim httpd.conf
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
[root@localhost httpd24]# apachectl stop
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost httpd24]# /usr/local/apache/bin/apachectl start
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain. Set the ‘ServerName‘ directive globally to suppress this message
[root@localhost httpd24]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 [::]:22 [::]:*
原文:https://blog.51cto.com/u_15142777/2773086