nvm管理(node版本)软件
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
或者
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
安装完成之后触发配置
source ~/.bashrc
安装composer
全局安装
你可以将此文件放在任何地方。如果你把它放在系统的 PATH 目录中,你就能在全局访问它。 在类Unix系统中,你甚至可以在使用时不加 php 前缀。
你可以执行这些命令让 composer 在你的系统中进行全局调用:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
安装Redis5
wget http://download.redis.io/releases/redis-5.0.5.tar.gz
tar -zxvf redis-5.0.5.tar.gz
#进入解压好的目录并编译Redis
cd redis-5.0.5
make
#编译完成后进入src目录进行安装
cd src
# 如果安装到指定的目录则添加一个参数PREFIX
# make install PREFIX=/usr/local/redis
# 如果默认使用默认安装路径(/usr/local/bin)则直接使用如下命令
make install
设置redis开机启动
#将配置文件放入/etc/redis
mkdir /etc/redis
cp ~/redis-5.0.5/redis.conf /etc/redis
#systemctl添加redis
#在/lib/systemd/system目录下创建一个脚本文件redis.service,里面的内容如下:
[Unit]
Description=Redis
After=network.target
[Service]
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf --daemonize no
ExecStop=/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown
[Install]
WantedBy=multi-user.target
#创建软链接
ln -s /lib/systemd/system/redis.service /etc/systemd/system/multi-user.target.wants/redis.service
#刷新配置
systemctl daemon-reload
#启动、重启、停止
systemctl start redis
systemctl restart redis
systemctl stop redis
#redis服务加入开机启动
systemctl enable redis
#禁止开机启动
systemctl disable redis
查看状态
systemctl status redis
安装supervisor
supervisor:要安装的软件的名称。
supervisord:装好supervisor软件后,supervisord用于启动supervisor服务。
supervisorctl:用于管理supervisor配置文件中program。
yum install epel-release
yum install supervisor
systemctl enable supervisord.service # 开机自启动
systemctl start supervisord.service # 启动supervisord服务
systemctl status supervisord.service # 查看supervisord服务状态
# 开启web服务:修改supervisord.conf ,inet_http_server节点取消注释。
vim /etc/supervisord.conf
supervisorctl reload
[inet_http_server] ; inet (TCP) server disabled by default
port=*:9001 ; (ip_address:port specifier, *:port for all iface)
username=root ; (default is no username (open server))
password=root ; (default is no password (open server))
ps -ef|grep supervisord # 查看是否存在supervisord进程