Linux Centos7.4 下安装lnmp(php7) 和 laravel

7 篇文章 0 订阅

不多说直接把我安装的命令贴给大家

    7  yum install nginx
    8  systemctl start nginx
    9  systemctl enable nginx.service
   10  systemctl status firewalld
   11  systemctl enable nginx
   12  yum localinstall http://dev.mysql.com/get/mysql57-community-release-e17-7.noarch.rpm
   13  yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
   14  yum repolist enabled|grep "mysql.*-community.*"
   15  yum -y install mysql-community-server install mysql-community-devel
   16  service mysqld start
   17  systemctl start mysqld.service
   18  service mysqld status
   19  systemctl enable mysqld.service
   20  systemctl list-dependencies|grep mysqld
   21  grep 'temporary password' /var/log/mysqld.log
   22  mysql -u root -p
   23  grep 'temporary password' /var/log/mysqld.log
   24  mysql -u root -p
   25  grep 'temporary password' /var/log/mysqld.log
   26  mysql -u root -p
   27  grep 'temporary password' /var/log/mysqld.log
   28  mysql -u root -p
   29  mysql -u root -p '7NCd<q)ri+f;'
   30  mysql -u root -p 'Mysql@123my'
   31  /etc/ini.d/mysql stop
   32  killall -term mysqld
   33  mysqld -skip-grant-tables &
   34  mysql -u root
   35  mysqld -skip-grant-tables &
   36  mysql -u root
   37  mysqld -skip-grant-tables &
   38  service mysqld restart
   39  systemctl restart mysqld.service
   40  mysql -u root -p
   41  sudo services mysql stop
   42  mysql -u root -p
   43  systemctl restart mysqld.service
   44  mysql -u root -p
   45  rpm -Uvn https://dl.fedorapoject.org/pub/epel/epel-release-latest-7.noarch.rpm
   46  rpm -Uvh https://dl.fedorapoject.org/pub/epel/epel-release-latest-7.noarch.rpm
   47  yum install gcc-c++
   48  rpm -Uvh https://dl.fedorapoject.org/pub/epel/epel-release-latest-7.noarch.rpm
   49  rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
   50  rpm --import /etc/pki/rpm-gpg/RPM* //解决rpm报错:job.... 依赖关系错误,不报错可以忽略
   51  rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
   52  rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
   53  rpm --import /etc/pki/rpm-gpg/RPM*
   54  rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
   55  yum repolist enabled | grep "webtatic*"
   56  yum -y install php71w php71w-fpm
   57  yum -y install php71w-mbstring php71w-common php71w-gd php71w-mcrypt
   58  yum -y install php71w-mysql php71w-xml php71w-cli php71w-devel
   59  yum -y install php71w-pecl-memcached php71w-pecl-redis php71w-opcache
   60  php -v
   61  php -m
   62  service php-fpm start
   63  systemctl start php-fpm.service
   64  service php-fpm status
   65  systemctl enable php-fpm.service
   66  systemctl list-dependencies | grep php-fpm ps-ef | grep php-fpm
   67  systemctl list-dependencies | grep php-fpm ps -ef | grep php-fpm
   68  systemctl list-dependencies | grep php-fpm
   69  ps -ef | grep php-fpm
   70  cd /etc/nginx && ls
   71  cd conf.d && cp -p default.conf 47.14.180.93.conf
   72  ll
   73  whereid default.conf
   74  whereis default.conf
   75  ls
   76  ll
   77  whereis conf.d
   78  cd ../
   79  cd default.d
   80  ll
   81  ls
   82  whereis default.conf
   83  history 999
   84  whereis nginx
   85  whereis conf
   86  whereis default.conf
   87  cd ../
   88  cd conf.d
   89  nginx -t
   90  vim /etc/nginx/nginx.conf 
   91  service nginx restart
   92  systemctl restart nginx.service


安装laravel:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

composer global require "laravel/installer=~1.1"

echo $path

export PATH=$PATH:/root/.config/composer/vendor/bin

source /etc/profile

cd /usr/share/nginx/html/

laravel new laravel

秉承着尽量将简洁的宗旨,一上是我搭建的全过程,我的设备是阿里云Centos7.4系统,如果你搭建过程有别的错误欢迎下方留言。希望你生活愉快,工作顺利

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值