服务器为Centos7.4版本;服务器端口要注意打开使用的端口才可访问。
chmod -R 777 /web
systemctl restart mysqld systemctl restart nginx systemctl restart php74-php-fpm
docker ps -a
docker restart 15533ecf9c16
pm2 list pm2 log id(填list > id)
df -h
df -i
pip -V
pip install --upgrade pip yum -y install epel-release yum -y install python-pip pip3 install --upgrade pip
pip3 install cryptography==3.4.8
cd /
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx
systemctl start nginx
systemctl status nginx ps -aux|grep nginx kill -9 4787 systemctl status nginx systemctl start nginx
cd /
curl -sSL https://get.daocloud.io/docker | sh
systemctl enable --now docker
pip3 install docker-compose
docker-compose -version
docker-compose up -d
wget https://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.40-1.el7.x86_64.rpm-bundle.tar
tar xvf mysql-5.7.40-1.el7.x86_64.rpm-bundle.tar
rpm -ivh mysql-community-common-5.7.40-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.40-1.el7.x86_64.rpm --force --nodeps rpm -ivh mysql-community-libs-compat-5.7.40-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.40-1.el7.x86_64.rpm --force --nodeps rpm -ivh mysql-community-server-5.7.40-1.el7.x86_64.rpm --force --nodeps
systemctl start mysqld
grep password /var/log/mysqld.log
mysql -u root -p
musql> use mysql; mysql> set password=password("youpassword"); mysql> exit;
mysql> update user set host='%' where user='root'; mysql> flush privileges; mysql> exit;
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install -y php74-php-fpm php74-php-cli php74-php-bcmath php74-php-gd php74-php-json php74-php-mbstring php74-php-mcrypt php74-php-mysqlnd php74-php-opcache php74-php-pdo php74-php-pecl-crypto php74-php-pecl-mcrypt php74-php-pecl-geoip php74-php-recode php74-php-snmp php74-php-soap php74-php-xml php74-php-imagick php74-php-pecl-zip php74-php-redis php74-php-swoole
systemctl start php74-php-fpm
systemctl enable php74-php-fpm
cp /usr/bin/php74 /usr/bin/php chmod +x /usr/bin/php
systemctl restart php74-php-fpm
wget https://cdn.npm.taobao.org/dist/node/v12.13.1/node-v12.13.1-linux-x64.tar.xz
xz -d node-v12.13.1-linux-x64.tar.xz
tar -xvf node-v12.13.1-linux-x64.tar mv node-v12.13.1-linux-x64 /usr/local/ mv /usr/local/node-v12.13.1-linux-x64/ /usr/local/node
vim /etc/profile # 文件末尾增加内容: export NODE_HOME=/usr/local/node export PATH=$NODE_HOME/bin:$PATH
source /etc/profile
node -v npm -v
npm install yarn -g
npm install pm2 -g
pm2 -V pm2 list
// 启动项目(例子) cd /web/egg/seek-egg/ pm2 start npm --name egg -- run start cd /web/mock_engineering/public/mock_server/ pm2 start npm --name 'mock_server' -- run start
本文作者:seek
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!