常用centos应用服务器操作命令

rpm -qa | grep MariaDB

create user dev@localhost identified by 'psw321';
grant all privileges on *.* to dev@'%' identified by 'psw321';

systemctl start mariadb #启动服务
systemctl enable mariadb #设置开机启动
systemctl restart mariadb #重新启动
systemctl stop mariadb.service #停止MariaDB

#安装nginx
wget http://nginx.org/download/nginx-1.16.0.tar.gz
tar zxvf nginx-1.16.0.tar.gz
cd nginx-1.16.0
./configure --prefix=/hq/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install


Nginx启动
nginx -c nginx.conf

systemctl status nginx.service
命令2:netstat -antp | grep :80(查看80端口被哪个服务占用


systemctl start nginx.service    启动nginx
systemctl stop nginx.service    结束nginx
systemctl restart nginx.service    重启nginx

./nginx -s stop    结束nginx
./nginx -t  验证nginx配置文件是否正确

service nginx start
pkill -9 nginx  结束nginx


systemctl start redis.service
密码:psw321
/etc/redis.conf
systemctl restart redis.service
redis-cli -h 127.0.0.1 -p 6379 -a "psw321"

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值