赞
踩
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-fpm php7.4-bcmath php7.4-curl php7.4-gd php7.4-json php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-xml php7.4-zip php-redis
php -v //查看PHP版本
php -m //查看扩展安装列表
sudo service php7.4-fpm status //查看fpm进程状态
sudo service php7.4-fpm start //启动fpm进程
sudo service php7.4-fpm stop //停止fpm进程
sudo service php7.4-fpm restart //重启fpm进程
sudo apt-get install nginx
sudo service nginx start //启动完成后可在浏览器输入127.0.0.1查看是否进入Nginx欢迎页
sudo service nginx status //查看nginx进程状态
sudo service nginx start //启动nginx进程
sudo service nginx stop //停止nginx进程
sudo service nginx restart //重启nginx进程
sudo apt-get install mysql-server-5.7 //安装Mysql5.7
sudo service mysql start //启动Mysql
sudo mysql_secure_installation //开始安全配置向导
There are three levels of password validation policy //此选项是密码安全级别选项 0为最低
Disallow root login remotely? (Press y|Y for Yes, any other key for No) //此选项为是否允许Root远程登录 选为N
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf //增加两行配置为character-set-server=utf8mb4及skip-grant-tables
//分别是设置字符编码和跳过登录时权限检查(不设置这个跳过权限,在navicat连接这个数据库时无法连接)
sudo service mysql restart //重启Mysql
sudo mysql -uroot -p //登录Mysql
//执行以下SQL
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '150102gzxy' WITH GRANT OPTION; //设置root可远程访问 150102gzxy设置为你的密码
FLUSH PRIVILEGES;
QUIT;
wget https://getcomposer.org/composer.phar
mv composer.phar composer
sudo chmod +x composer
sudo mv composer /usr/local/bin
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。