RedHat7搭建PHP開發環境(Zend Studio)

  • 下載Zend Studio

# wget http://downloads.zend.com/studio-eclipse/13.0.1/ZendStudio-13.0.1-linux.gtk.x86_64.tar.gzphp

  • 解壓Zend Studio

# tar -zxf ZendStudio-13.0.1-linux.gtk.x86_64.tar.gz -C /optmysql

  • 建立菜單項

# vi /usr/share/applications/ZendStudio.desktoplinux

[Desktop Entry]
Name=ZendStudio
Comment=ZendStudio
Exec=/opt/ZendStudio/ZendStudio
Icon=/opt/ZendStudio/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;
  • 運行Zend Studio

點擊Applications -> Programming -> ZendStudiosql

未註冊有30天試用期,選擇Continue with trial, 點擊Continue安全

  • 漢化Zend Studio

點擊Help -> Install New Software...babel

點擊Add... ,填入Name: lanuage packs ,Location:http://download.eclipse.org/technology/babel/update-site/R0.13.0/luna ,點擊OKapp

此時正在加載插件,須要等待幾分鐘,等加載完並出現語言包後,找到「Babel Language Packs in Chinese(Simplified)」一欄打勾,而後一路點擊Nexteclipse

選擇「I accept the terms of the license agreement」,點擊Finish測試

安裝完成後,點擊Yes當即重啓軟件url

  • 安裝MySQL

# wget http://repo.mysql.com/RPM-GPG-KEY-mysql -P /etc/pki/rpm-gpg

# vi /etc/yum.repos.d/mysql-community.repo

[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# yum install mysql-community-server

# systemctl enable mysqld

# systemctl start mysqld

安裝完成會生成一個隨機密碼,查看該密碼

# grep 'temporary password' /var/log/mysqld.log

修改MySQL root密碼

# mysql -uroot -p

# ALTER USER 'root'@'localhost' IDENTIFIED BY 'Mysql-2016';

MySQL安全設置

# mysql_secure_installation

  • 安裝Apache

# yum install httpd

# systemctl enable httpd

# systemctl start httpd

開通http,https端口

# firewall-cmd --permanent --add-service={http,https}

# firewall-cmd --reload

  • 安裝PHP及組件

# yum install php php-mysql

重啓Apache服務

# systemctl restart httpd

  • 配置PHP Server

  • 建立demo項目

點擊File -> New -> Local PHP Project

輸入Project Name:demo,點擊Finish

編輯index.php

點擊Run,測試demo項目

相關文章
相關標籤/搜索