一、安装centos 7
选择Install CentOS 7 进行安装
选择语言,选择中文。如果你英语厉害,那就用英文吧!!
选择进行分区
选择我要配置分区
swap分区,是Linux的一个交换分区,一般是内存的两倍!1g内存就个2048
再分一个boot分区,启动分区。给个1g就足够了
完成确定
接受更改
选择安装图形界面
那些办公的软件,你可以装也可以不要
开始安装
这里一定要给root设置一个密码,之后就是等待安装完成
最后安装完成了就重启
如果出现了这样的问题,
Initial setup of CentOS Linux 7 (core)
1) [x] Creat user 2) [!] License information
(no user will be created) (license not accepted)
Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]:
以下步骤解决:
输入 1,按Enter键
输入 2,按Enter键
输入 q,按Enter键
输入 yes,按Enter键
二、安装phpstorm
##如果wget没有安装,就安装一下。
[root@localhost ~]# yum install -y wget;
##如果链接下载不了,就去官网那里下载
[root@localhost ~]# wget https://download-cf.jetbrains.com/webide/PhpStorm-2017.2.2.tar.gz
##解压压缩包
[root@localhost ~]# tar -zxvf PhpStorm-2017.2.2.tar.gz -C /usr/local/phpstorm
[root@localhost ~]# cd /usr/local/phpstorm/bin
[root@localhost ~]# chmod 777 phpstorm.sh
[root@localhost ~]# ./phpstorm.sh
##windows类似,此时你在桌面应用程序哪里会看到 开发 里面就看到phpstorm
###添加快捷键启动
[root@localhost ~]# vim /usr/share/applications/Phpstorm.desktop
这是我自己的配置,可以复制上去,改为自己的
[Desktop Entry]
Categories=Development;
Comment[zh_CN]=
Comment=
Exec=/root/software/PhpStorm/bin/phpstorm.sh ##换成你自己的软件的路径
GenericName[zh_CN]=IDE
GenericName=IDE
Icon=/root/software/PhpStorm/bin/phpstorm.png ##换成你自己的软件的路径
MimeType=
Name[zh_CN]=eclipse
Name=phpstorm
Path=
StartupNotify=true
Terminal=false
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=owen
三、安装Sublime text3
##下载软件,连接失效就去官网下载
[root@localhost ~]# wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3126_x64.tar.bz2
[root@localhost ~]# tar -jxvf sublime_text_3_build_3126_x64.tar.bz2
[root@localhost ~]# cd /root/software/sublime_text_3
##运行sublime
[root@localhost ~]# ./sublime_text
##创建桌面快捷启动方式
[root@localhost ~]#cp /root/software/sublime_text_3/sublime_text.desktop /usr/share/applications
[root@localhost ~]# vim /usr/share/applications/sublime_text.desktop
这是我自己的配置
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/root/software/sublime_text/sublime_text %F ##改成你自己的
Terminal=false
MimeType=text/plain;
Icon=/root/software/sublime_text/Icon/52x48/sublime-text.png ##改成你自己的
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/root/software/sublime_text/sublime_text -n ##改成你自己的
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/root/software/sublime_text/sublime_text --command new_file ##改成你自己的
OnlyShowIn=Unity;
##应用程序 >开发 > Sublime Text3 右键可以将此启动器添加到桌面,这样就完成
安装控制台
使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令行,粘贴如下代码:
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
手动安装方法
可能由于各种原因,无法使用代码安装,你那可以手动安装Package Control
1.点击Preferences > Browse Packages菜单
2.进入打开的目录的上层目录,然后再进入Installed Packages/目录
# wget https://sublime.wbond.net/Package%20Control.sublime-package
3.下载Package Control.sublime-package并复制到Installed Packages/目录
4.重启Sublime Text。
三、安装phpStudy
这是我另外一篇安装PHPstudy的博客,可以参照来做http://blog.csdn.net/post_mans/article/details/74076555
四、安装composer
如果下载链接失效了,就去composer官网下载composer中国官网
[root@localhost bin]# wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer
[root@localhost bin]# chmod a+x /usr/local/bin/composer
##注意如果composer没有反应,出现以下问题,就是没有把PHP添加到系统环境变量
[root@localhost bin]# composer
/usr/bin/env: php: 没有那个文件或目录
###
###安装你按装的PHP的bin目录,我自己没有用phpstudy!根据实际情况找到PHP的bin目录
##修改/etc/profile文件使其永久性生效,并对所有系统用户生效,在文件末尾加上如下两行代码(后面继续加的要以冒号隔开)
PATH=$PATH:/usr/local/webserver/php/bin:
##最后:执行 命令source /etc/profile 使其修改生效,执行完可通过echo $PATH命令查看是否添加成功。
##然后再输入composer
[root@localhost bin]# composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.6-dev (d9885d5b3bd1b28a6d8c679df848540e565ee818) 2017-08-21 07:16:59
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--profile Display timing and memory usage information
--no-plugins Whether to disable plugins.
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Shows the short information about Composer.
archive Creates an archive of this composer package.
browse Opens the package's repository URL or homepage in your browser.
clear-cache Clears composer's internal package cache.
clearcache Clears composer's internal package cache.
config Sets config options.
create-project Creates new project from a package into given directory.
depends Shows which packages cause the given package to be installed.
diagnose Diagnoses the system to identify common errors.
dump-autoload Dumps the autoloader.