国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 幫助中心 > 正文

centos 7系統下安裝laravel運行環境的步驟詳解

2024-07-09 22:42:04
字體:
來源:轉載
供稿:網友

前言

因為最近在學習linux,而最好的學習就是實踐,學習linux同時安裝LAMP的環境搭配,跑了度娘都沒找到我想要的文章。那我就簡單的寫寫我在centos7下安裝laravel的安裝過程。

網絡設置

ping 114.114.114.144 網絡連接失敗,將虛擬機的網絡適配器改成橋接模式(自動),然后設置開啟啟動

打開 /etc/sysconfig/network-scripts/ifcfg-eno16777736,ifcfg-eno16777736是自己對應的配置文件

將里面的ONBOOT改為yes,重啟網絡服務`systemctl restart network`, 再ping就ok了

升級

//升級所有包同時也升級軟件和系統內核yum -y update

SELinux 寬容模式保證安裝過程不受影響,其次在項目中,也要關閉

setenforce 0

安裝Apache

 //安裝 yum -y install httpd //同時安裝vim yum install vim  //修改Apache配置文件指向路徑 /etc/httpd/conf/httpd.conf  //啟動Apache systemctl start httpd   //停止Apache systemctl stop httpd  //重啟Apache systemctl restart httpd  //查看Apache狀態  systemctl status httpd  // 配置Apache開機啟動項 /*chkconfig --add httpd (在服務清單中添加httpd服務)*/ chkconfig httpd on

安裝MySql

//如果必須要安裝MySQL,首先必須添加mysql社區repo通過輸入命sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm//最后使用像安裝MySQL的常規方法一樣安裝//安裝mysql命令yum -y installmysql mysql-devel mysql-server mysql-libs//創建root用戶密碼mysqladmin -u root password 密碼 //如果要用外部軟件連接數據庫關閉防火墻systemctl stop firewalld //查看防火墻狀態firewall-cmd --state //禁止firewall開機啟動systemctl disable firewalld //設置遠程連接GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;//重啟mysqlsystemctl restart mysqldcd ..// 

安裝PHP5.6

//系統默認安裝的是php5.4,對于使用laravel就不行的,以下是CentOS 7.0的epel及remi源。 yum -y install epel-release rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm//使用yum list命令查看可安裝的包(Packege)。  yum list --enablerepo=remi --enablerepo=remi-php56 | grep php//安裝php5.6及部分擴展 yum -y install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof //查看版本 php-v

安裝redis

//檢查安裝依賴程序yum install gcc-c++yum install -y tcl//獲取安裝文件wget http://download.redis.io/releases/redis-3.2.9.tar.gztar xzf redis-3.2.9.tar.gzmv redis-3.2.9 /usr/local/redis//進入目錄cd /usr/local/redis//編譯安裝make && make install(可能需要 make test 根據提示)//設置配置文件目錄mkdir -p /etc/rediscp redis.conf /etc/redis//修改配置文件vim /etc/redis/redis.confdaemonize yes (no -> yes)//啟動/usr/local/bin/redis-server /etc/redis/redis.conf//查看啟動ps -ef | grep redis//使用客戶端測試 redis-cli set name darry Ok get name 'darry'//關閉客戶端redis-cli shutdown
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 馆陶县| 五原县| 乌兰浩特市| 安仁县| 元江| 布拖县| 连山| 岗巴县| 松滋市| 华蓥市| 萍乡市| 庆阳市| 乐业县| 吴川市| 荣昌县| 佛山市| 阿拉尔市| 内黄县| 湄潭县| 裕民县| 岳西县| 惠来县| 博罗县| 北京市| 紫阳县| 本溪市| 涡阳县| 虞城县| 格尔木市| 龙井市| 钟祥市| 玉林市| 子洲县| 澄江县| 上思县| 民乐县| 无锡市| 宁都县| 邹城市| 廉江市| 九江市|