LNMP,


yum install vim -y

 yum install -y epel-release

yum install nginx -y

 rpm -ql nginx

systemctl start nginx

systemctl status nginx

 systemctl enable nginx

 vim /etc/nginx/nginx.conf

vim /etc/nginx/conf.d/test.actself.me.conf

server {
    ssl on;
    listen 80;
    listen 443 ssl;
    server_name testssl;

    ssl_certificate /etc/ssl/server.crt;
    ssl_certificate_key /etc/ssl/server.key;

    root /var/www/test.actself.me;
    index index.html;

    location \ {
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

vim /etc/nginx/fastcgi_params

systemctl reload nginx

 mkdir -p /var/www/test.actself.me

 ip addr list

getenforce

setenforce 0

systemctl stop firewalld

 

https://rpms.remirepo.net/wizard/

# 安装php7
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install yum-utils
yum install -y php72.x86_64 \
php72-php-cli.x86_64 \
php72-php-fpm.x86_64 \
php72-php-json.x86_64 \
php72-php-mbstring.x86_64 \
php72-php-mysqlnd.x86_64 \
php72-php-opcache.x86_64 \
php72-php-pdo.x86_64 \
php72-php-pecl-amqp.x86_64 \
php72-php-pecl-igbinary.x86_64 \
php72-php-pecl-mcrypt.x86_64 \
php72-php-pecl-memcached.x86_64 \
php72-php-pecl-msgpack.x86_64 \
php72-php-pecl-mysql.x86_64 \
php72-php-pecl-redis.x86_64 \
php72-php-pecl-yac.x86_64 \
php72-php-pear.noarch \
php72-php-pecl-zip.x86_64

# 安装php swoole扩展
yum search php72 | grep swoole
yum install php72-php-pecl-swoole2.x86_64

systemctl start php72-php-fpm

systemctl status php72-php-fpm

systemctl enable php72-php-fpm

rpm -ql php72-php-fpm

 vim /etc/opt/remi/php72/php-fpm.conf

vim  /etc/opt/remi/php72/php-fpm.d/www.conf

 vim /etc/opt/remi/php72/php.ini

# 安装mysql
yum install mariadb-server
systemctl start mariadb
systemctl start mariadb
systemctl status mariadb
systemctl enable mariadb

 

/opt/remi/php72/root/usr/sbin/php-fpm

相关内容

    暂无相关文章