• +86 18940128339
  • 3056844889@qq.com

月度归档 06-22

TP nginx+mysql+php+redis+activemq 服务器原生搭建

TP框架 目录权限

缓存目录 
chmod -R 777 /home/fastadmin/runtime
chmod -R 777 /home/fastadmin/application
chmod -R 777 /home/fastadmin/public

安装nginx

yum list installed | grep nginx

yum -y  install nginx 
systemctl start  nginx
vi /etc/nginx/nginx.conf

systemctl restart nginx
systemctl status nginx
systemctl enable nginx
systemctl stop nginx

安装mysql

yum list installed | grep mysql
ps aux | grep mysql

cd /home && wget http://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
rpm -ivh mysql57-community-release-el7-11.noarch.rpm

yum clean all
yum makecache
yum -y install mysql-community-server

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022


systemctl start mysqld
systemctl status mysqld
systemctl enable mysqld
systemctl restart mysqld

安装php

sudo yum install -y epel-release
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm

sudo yum install -y yum-utils

sudo yum-config-manager --enable remi-php74

sudo yum install -y php php-cli php-fpm php-common php-gd  php-json php-mysqlnd php-pdo php-imagick php-zip

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

yum list installed | grep php
sudo yum remove php*

安装redis

yum list installed | grep redis
ps aux | grep redis-server

cd /home && wget http://download.redis.io/releases/redis-3.2.8.tar.gz
tar xzf redis-3.2.8.tar.gz
cd redis-3.2.8 && make install
make
make install

cp /home/redis.conf /etc/
cp /home/redis.service /etc/systemd/system/redis.service
sudo vi /etc/systemd/system/redis.service

sudo systemctl daemon-reload
sudo systemctl start redis.service
sudo systemctl status redis.service
sudo systemctl enable redis.service
sudo systemctl restart redis.service

安装activemq

cd /usr/local
tar  -xzvf  apache-activemq-5.18.4-bin.tar.gz

cp /home/activemq.service  /etc/systemd/system/
cp /home/activemq.xml  /usr/local/apache-activemq-5.18.4/conf
cp /home/env  /usr/local/apache-activemq-5.18.4/bin
sudo vi  /etc/systemd/system/activemq.service

/usr/local/jdk/jdk-11.0.2

chmod +x /etc/systemd/system/activemq.service

systemctl start activemq.service
systemctl status activemq.service
systemctl enable  activemq.service
systemctl restart activemq.service
systemctl stop activemq.service

/usr/local/apache-activemq-5.18.4/bin/activemq start
/usr/local/apache-activemq-5.18.4/bin/activemq stop