§ä¹ï·h®a¤½¥q
·h¹B¤£¦Aªá¤j¿ú¶O¤O®ð¡A¥þ¬Ù¦^ÀY¨®ªA°È
²M¼ä±M·~¨t²ÎÃoÂd¡B¨t²Î®a¨ãª½Àç¤u¼t
³]­p³W¹º¨ì©²¤V¶q¡A³d¥ô¬I¤u¡AÅwªï»Y¼t°ÑÆ[

­º­¶  ¡E  j2h ½×¾Â ¡E ·s¤â°Q½×     ¡E 

centos 8 ³]©w

©ÐªF¡G123
µoªí®É¶¡¡G2019-07-24


https://segmentfault.com/a/1190000021909457
https://www.schlix.com/documentation/v2/configuration/centos-8-lamp-linux-apache-2-4-mysql-8-0-php-7-2-server-setup.html


https://www.opencli.com/linux/redhat-centos-8-setup-apache-mariadb-php
https://www.footmark.info/linux/centos/centos8-installation-lemp/


mysql8
https://www.schlix.com/documentation/v2/configuration/centos-8-lamp-linux-apache-2-4-mysql-8-0-php-7-2-server-setup.html

https://www.linuxrumen.com/rmxx/1490.html



centos8 ¦w¸Ë apache
$ sudo yum install httpd
$ sudo systemctl enable httpd
$ sudo systemctl start httpd
$ sudo systemctl status httpd


sudo yum install httpd mod_ssl openssl


Ãö³¬¨¾¤õÀð ºô­¶¤~¯à¥¿±`¶i¤J
/etc/sysconfig/selinux
#sestatus
SELinux status: disabled

­n­«·srestart SElinux
sudo setenforce 0


¦w¸Ë mysql
yum -y install @mysql
¶}±Òmysql
systemctl start mysqld
systemctl enable mysqld

­n检¬dMySQLªA务¾¹¬O§_¥¿¦b运¦æ¡A请输¤J¡G
sudo systemctl status mysqld


yum install php php-fpm php-mysqlnd php-opcache php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel


¸ò¥H©¹¤£¦P, ¦b RHEL 8 / CentOS 8 ªº Apache, ¹w³]¤£·|¨Ï¥Î mod_php °õ¦æ PHP, ¦Ó·|¹w³]¨Ï¥Î PHP-FPM °õ¦æ PHP, ©Ò¥H»Ý­n±Ò°Ê PHP-FPM:

# systemctl start php-fpm
# systemctl enable php-fpm
¦w¸Ë¤Î³]©w¦n PHP «á»Ý­n­«·s±Ò°Ê Apache ¤~·|¥Í®Ä:


download webmin
need install
yum install perl-Net-SSLeay perl-Encode-Detect



yum install -y vsftpd


¦w¸Ë®M¥ó±Ð¾Ç
1.¥ý¨ìj2h¸ê®Æ§¨ cd /j2h/
2. rpm -ivh ³nÅé®M¥ó¦WºÙ

§R°£ ³nÅé®M¥ó
rpm -e ³nÅé®M¥ó¦WºÙ


½T»{php ª©¥»
rpm -qa |grep php
½T»{mcrypt ª©¥»
rpm -qa |grep MariaDB


§ó·s®M¥ó¡G
# yum update mcrypt

¦w¸Ë Openssl ¤Î§ó·s¨ì³Ì·sª©¥»
yum install openssl -y


³o¬O¦w¸Ë Apache ¤Î SSL ¼Ò²Õ
yum install httpd mod_ssl -y



  • ÃÙ§Uºô¯¸       

    ¯²«Îºô
    ´£¨Ñ¯²«Î¸ê°T¡B¯²«Î¼s§i¥Zµn¡B©Ð«Î°U¯²¡B©Ð«È´M«Î¡B¯²«Î°t¹ï¡B¹q¤l¦a¹Ï¡B©Ð«Î¸ê®Æ¤W¶Ç
    ·h®a¤½¥q
    ¥»¤½¥q¬°¬F©²¥ß®×±M·~·h®a¤½¥q¡A§Ú­ÌªÃ«ù«È¤á¦Ü¤W¡A¥¿¬£¸gÀç²z©À¡A¦b¤j¥x¥_¿¤¥«¤@ª½¦³¤f¸O
    ©ú¤é¶Àª÷«Î
    ¶R«Î¡B½æ«Î¡B¯²«Î¡B¥X¯²¡B©ÐªF¯²«Î¥Zµn¡B¨Ã´£¨Ñ¯²«Î¡B³Ì±M·~ªºªA°È¡B³Ì¦w¥þ¿Ë¤Áªº¥æ©ö¡C

  • 1 ¼Ó¦í¤á¡Gwe
    µoªí®É¶¡¡G2020-01-26

    CentOs8.0关闭¨¾¤õ墙
    systemctl stop firewalld.service 关闭¨¾¤õ墙
    systemctl disable firewall.servei 关闭¨¾¤õ墙开Éó¦ÛûD
    systemctl status firewalld.service ¬d¬Ý¨¾¤õ墙状态




    [root@test-centos8 ~]# firewall-cmd --permanent --add-service=http
    [root@test-centos8 ~]# firewall-cmd --permanent --add-service=https
    [root@test-centos8 ~]# firewall-cmd --reload
    Enable the services:

    [root@test-centos8 ~]# systemctl enable mysqld.service
    [root@test-centos8 ~]# systemctl enable php-fpm.service
    [root@test-centos8 ~]# systemctl enable httpd.service
    Then start the services:

    [root@test-centos8 ~]# systemctl start mysqld.service
    [root@test-centos8 ~]# systemctl start php-fpm.service
    [root@test-centos8 ~]# systemctl start httpd.service

    2 ¼Ó¦í¤á¡Grrw
    µoªí®É¶¡¡G2020-01-27

    https://www.brilliantcode.net/1955/centos-8-apache24-php73-installation-settings/

    3 ¼Ó¦í¤á¡Grrw
    µoªí®É¶¡¡G2020-01-27

    yum install php php-fpm php-mysqlnd php-opcache php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

    «Ü¦h¥D¾÷°ò©ó«O¦w²z¥Ñ, ±N PHP °õ¦æ®Éªº¿ù»~°T®§ÁôÂÃ, ·í PHP µ{¦¡°õ¦æ®É¹J¨ì¿ù»~, §Y¨Ï¬O run time error ³oÃþ¿ù»~, ³£¥u·|Åã¥ÜªÅ¥Õ¤º®e¡C

    ­ì¦]¬O¦b php.ini ³]©w¤F³o¨â¦æ:

    display_errors = Off
    error_reporting = Off

    4 ¼Ó¦í¤á¡Grrw
    µoªí®É¶¡¡G2020-01-27

    ¦w¸Ë webmin
    https://www.howtoforge.com/tutorial/how-to-install-webmin-on-centos-8/

    https://ywnz.com/linuxjc/3970.html

    https://www.errorhat.com/how-to-install-webmin-on-rhel-8-centos-8/

    https://computingforgeeks.com/how-to-install-webmin-on-rhel-8-centos-8/?amp



    http://www.webmin.com/rpm.html

    yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect

    yum install perl-Net-SSLeay
    yum install perl-Net-SSLeay perl-Encode-Detect

    ¥»¤å§Ú们¤¶绍¦bRHEL 8/CentOS 8¨t统¤W¦w装Webminªº两Ïú¤èªk¡A¤£ºÞ¨Ï¥Î­þÏú¤èªk¡A³£±o­n¦w装Perl©M©Ò»Ýªº¨Ì赖项¡A¦b终ºÝ¤¤运¦æsudo yum -y install @perl©R¥O§Y¥i


    5 ¼Ó¦í¤á¡Grrw
    µoªí®É¶¡¡G2020-01-27

    ¥H¤U«ü¥O±Ò°Ê MySQL ¥H¤Î¶}¾÷¦Û°Ê°õ¦æ:
    sudo dnf install @mysql
    yum -y install @mysql

    $ sudo systemctl enable ¡Vnow mysqld
    sudo systemctl enable --now httpd


    ­n检¬dMySQLªA务¾¹¬O§_¥¿¦b运¦æ¡A请输¤J¡G
    sudo systemctl status mysqld
    https://www.myfreax.com/how-to-install-mysql-on-centos-8/
    https://www.mf8.biz/rhel8-centos8-install-mysql-8-0/
    https://www.linuxbabe.com/redhat/install-lamp-stack-centos-8-rhel-8

    systemctl start mysqld
    systemctl enable mysqld

    yum install @mysql:8.0 -y


    php³s½u¤£¤Wmysql
    MariaDB

    6 ¼Ó¦í¤á¡G34r34
    µoªí®É¶¡¡G2020-01-27

    ½Ðª`·Ncentos 8 ¥H«áª½±µ¦w¸Ë php-mysqlnd ¡A¦pªG¤w¸g¦w¸Ëphp-mysql ­n²¾°£

    ¡B¦³´N¨ø载httpd¡C
    yum remove -y "httpd*"


    ±Ò°Ê httpd
    systemctl start httpd
    ±Ò°Ê ¸ê®Æ®w
    systemctl start mariadb
    §ó§ï ±K½X
    mysql_secure_installation

    ¶}±Ò¨¾¤õÀð
    firewall-cmd --add-service=http --permanent
    firewall-cmd --reload
    firewall-cmd --list-all

    ¦w¸Ëwebmin (ÁöµMcentos8 ¤w¸g¤º«Øºô­¶ª©ªººÞ²z¨t²Î cockpit¡A¦ý¬OºÞ²zªA°Èªº¥\¯à¤£¨¬)
    wget http://163.30.200.26/uf/webmin/webmin-1.930-1.noarch.rpm
    rpm -ihv webmin-1.930-1.noarch.rpm

    ±Ò¥Î«e¥ý¶}±Ò¨¾¤õÀð
    firewall-cmd --add-port=10000 --permanent
    firewall-cmd --reload
    firewall-cmd --list-all

    7 ¼Ó¦í¤á¡GTtt
    µoªí®É¶¡¡G2020-01-27

    When that installation completes, start and enable PHP with the commands:

    sudo systemctl start php-fpm
    sudo systemctl enable php-fpm


    https://www.opencli.com/linux/redhat-centos-8-setup-apache-mariadb-php

    https://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-linux-apache-mariadb-php-lamp-stack-on-rhel-8.html



    ¸ò¥H©¹¤£¦P, ¦b RHEL 8 / CentOS 8 ªº Apache, ¹w³]¤£·|¨Ï¥Î mod_php °õ¦æ PHP, ¦Ó·|¹w³]¨Ï¥Î PHP-FPM °õ¦æ PHP, ©Ò¥H»Ý­n±Ò°Ê PHP-FPM:

    # systemctl start php-fpm
    # systemctl enable php-fpm
    ¦w¸Ë¤Î³]©w¦n PHP «á»Ý­n­«·s±Ò°Ê Apache ¤~·|¥Í®Ä:

    # systemctl restart httpd
    ¥t¥~¤]»Ý­n°õ¦æ¥H¤U«ü¥O, Åý SELinux ¤¹³\ Apache ³z¹L PHP-FPM °õ¦æ PHP µ{¦¡½X:

    # setsebool -P httpd_execmem 1
    ­n´ú¸Õ PHP, ¥i¥H©ñ¤@­Ó²³æªº PHP Script ¨ì Apache DocumentRoot ¥Ø¿ý, ¹w³]¬O /var/www/html/, °õ¦æ¥H¤U«ü¥O:

    # vi /var/www/html/info.php
    µM«á¿é¤J¥H¤U´X¦æµ{¦¡½X:

    phpinfo();
    ?>
    https://www.opencli.com/linux/redhat-centos-8-setup-apache-mariadb-php

    8 ¼Ó¦í¤á¡Gtest
    µoªí®É¶¡¡G2020-01-27

    systemctl start mysqld
    # systemctl enable --now mysqld
    # systemctl status mysqld

    https://www.tecmint.com/install-mysql-on-centos-8/

    9 ¼Ó¦í¤á¡Gyyyy
    µoªí®É¶¡¡G2020-02-07

    https://blog.csdn.net/renfeigui0/article/details/102813376

    10 ¼Ó¦í¤á¡Gffff
    µoªí®É¶¡¡G2020-02-16

    CentOS 8 ¤w¸g¶}©l¨Ï¥Î dnf, ¥Î dnf ¦w¸Ë mysql:

    $ sudo dnf install @mysql
    ¦w¸Ë§¹¦¨«á, °õ¦æ¥H¤U«ü¥O±Ò°Ê MySQL ¥H¤Î¶}¾÷¦Û°Ê°õ¦æ:

    $ sudo systemctl enable ¡Vnow mysqld

    11 ¼Ó¦í¤á¡Gwww
    µoªí®É¶¡¡G2020-02-25


    https://www.osyunwei.com/archives/10312.html

    1¡B关闭firewall¡G

    systemctl stop firewalld.service #°±¤îfirewall

    systemctl disable firewalld.service #¸T¤îfirewall开ÉóûD动

    systemctl mask firewalld

    systemctl stop firewalld

    yum remove firewalld


    2¡B¦w装iptables¨¾¤õ墙

    yum install iptables-services #¦w装

    vi /etc/sysconfig/iptables #编辑¨¾¤õ墙°t¸m¤å¥ó¡A开发mysqlÀq认ºÝ¤f3306

    # sample configuration for iptables service

    # you can edit this manually or use system-config-firewall

    # please do not ask us to add additional ports/services to this default configuration

    *filter

    :INPUT ACCEPT [0:0]

    :FORWARD ACCEPT [0:0]

    :OUTPUT ACCEPT [0:0]

    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

    -A INPUT -p icmp -j ACCEPT

    -A INPUT -i lo -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

    -A INPUT -j REJECT --reject-with icmp-host-prohibited

    -A FORWARD -j REJECT --reject-with icmp-host-prohibited

    COMMIT

    :wq! #«O¦s°h¥X

    systemctl restart iptables.service #³Ì¦Z­«ûD¨¾¤õ墙¨Ï°t¸m¥Í®Ä

    systemctl enable iptables.service #设¸m¨¾¤õ墙开ÉóûD动

    /usr/libexec/iptables/iptables.init restart #­«ûD¨¾¤õ墙

    ¤G¡B关闭SELINUX

    vi /etc/selinux/config

    #SELINUX=enforcing #ª`释±¼

    #SELINUXTYPE=targeted #ª`释±¼

    SELINUX=disabled #¼W¥[

    :wq! #«O¦s°h¥X

    setenforce 0 #¨Ï°t¸m¥ß§Y¥Í®Ä

    12 ¼Ó¦í¤á¡Gggg
    µoªí®É¶¡¡G2020-02-25

    mysql8©Mphp7¤£¯à连±µ
    https://www.php.cn/php-ask-432285.html
    default_authentication_plugin=mysql_native_password

    13 ¼Ó¦í¤á¡GSSS
    µoªí®É¶¡¡G2020-02-25

    Centos8] ¦w¸ËphpMyAdmin
    http://n.sfs.tw/content/index/14380

    14 ¼Ó¦í¤á¡G5555
    µoªí®É¶¡¡G2020-03-02


    ­×§ï /etc/mysql/my.cnf
    [mysqld]
    default_authentication_plugin= mysql_native_password




    ¶}±Ò MySQL ³]©wÀÉ (my.cnf ©Î my.ini)¡A­×§ï default_authentication_plugin Äæ¦ì­È¬° mysql_native_password¡C
    ­ì¥ýªº³]¸m
    1
    default_authentication_plugin=caching_sha2_password
    ­×§ï«á

    1
    default_authentication_plugin=mysql_native_password
    ¤§«á±N¨Ï¥ÎªÌªº±K½XÅçÃҤ覡­×§ï¬° MySQL Native Password ´N¥i¥H³s½u¤F

    15 ¼Ó¦í¤á¡G5555
    µoªí®É¶¡¡G2020-03-02

    https://www.opencli.com/linux/redhat-centos-8-setup-apache-mariadb-php

    https://www.schlix.com/documentation/v2/configuration/centos-8-lamp-linux-apache-2-4-mysql-8-0-php-7-2-server-setup.html

    16 ¼Ó¦í¤á¡G2223
    µoªí®É¶¡¡G2020-03-11

    centos8 ¦w装php
    ¦w装php
    yum install php
    ¦w装php©Ý®i库
    yum install php-json php-xml php-mysqlnd php-mbstring php-common php-gd
    ûD动php
    systemctl start php-fpm
    ¬d¬Ýphpª©¥»
    php -V
    设¸mphp开ÉóûD动
    systemctl enable php-fpm
    centos8¦w装mysql
    ¬d¬Ý¬O§_¦w装MySQL
    rpm -qa | grep mysql
    ¤U载¦w装¥]¤å¥ó
    wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    ¦w装mysql-community-release-el7-5.noarch.rpm¥]
    rpm -ivh mysql-community-release-el7-5.noarch.rpm
    ¬d¬Ý¥i¥Î¦w装¥]
    yum repolist all | grep mysql
    ¦w装mysql
    yum install mysql-server
    检¬dmysql¬O§_¦w装¦¨¥\¡C
    rpm -qa | grep mysql
    ûD动 mysql ªA务
    systemctl start mysqld.service

    17 ¼Ó¦í¤á¡Gffff
    µoªí®É¶¡¡G2020-03-11

    https://www.cnblogs.com/roggeyue/p/9191884.html

    18 ¼Ó¦í¤á¡G544
    µoªí®É¶¡¡G2020-08-27

    # ûD动ApacheªA务
    systemctl start httpd

    # 关闭ApacheªA务
    systemctl stop httpd

    # ¬d¬ÝApacheªA务状态
    systemctl status httpd

    # ­«ûDApacheªA务
    systemctl restart httpd


    # ûD动 MariaDB ªA务
    systemctl start mariadb

    # 关闭 MariaDB ªA务
    systemctl stop mariadb

    # ¬d¬Ý MariaDB ªA务状态
    systemctl status mariadb

    # ­«ûD MariaDB ªA务
    systemctl restart mariadb



    # ûD动 PHP-FPM ªA务
    systemctl start php-fpm

    # 关闭 PHP-FPM ªA务
    systemctl stop php-fpm

    # ¬d¬Ý PHP-FPM ªA务状态
    systemctl status php-fpm

    # ­«ûD PHP-FPM ªA务
    systemctl restart php-fpm



    ¡@¦@ 18 ¤H¦^À³¡@¡@¿ï¾Ü­¶¼Æ ¡i²Ä1 ­¶¡j 

    ©m¦W¡G
    §G§i¤º®e¡G
    ¨ä¥L¿ï¶µ: