docker.io/centos安装phpstudy
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了docker.io/centos安装phpstudy,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2326字,纯文字阅读大概需要4分钟。
内容图文
![docker.io/centos安装phpstudy](/upload/InfoBanner/zyjiaocheng/939/98e01c4856f245d8ace301d136f2724a.jpg)
1.准备工作
1 2 3 4 5 |
yum install vim<br>yum install wget
yum install make
yum? - y install bzip2
yum install m4
yum install gcc gcc - c + + glibc - static? - y?? / / 安装旧的gcc相关的编译工具
|
2.下载gcc 4.8.2源代码
1 |
wget http: / / gcc.gnu.org / pub / gcc / releases / gcc - 4.8 . 2 / gcc - 4.8 . 2.tar .bz2
|
3.解压缩源代码包,进入gcc-4.8.2目录,执行./contrib/download_prerequisities脚本会自动下载三个依赖库别为gmp-4.3.2、mpfr-2.4.2、mpc-0.8.1
4.安装gmp,mpfr,mpc
1 2 3 4 5 |
cd gmp?
mkdir build?
cd build?
.. / configure? - - prefix = / usr / local / gcc / gmp - 4.3 . 2
make && make install
|
1 2 3 4 5 |
cd .. / .. / mpfr?
mkdir build?
cd build?
.. / configure? - - prefix = / usr / local / gcc / mpfr - 2.4 . 2 - - with - gmp = / usr / local / gcc / gmp - 4.3 . 2
make && make install?
|
1 2 3 4 5 |
cd .. / .. / mpc?
mkdir build?
cd build?
.. / configure? - - prefix = / usr / local / gcc / mpc - 0.8 . 1 - - with - mpfr = / usr / local / gcc / mpfr - 2.4 . 2 - - with - gmp = / usr / local / gcc / gmp - 4.3 . 2
make && make install
|
5.添加共享库路径
1 2 3 4 |
vim? / etc / ld.so.conf?????????? / / 添加如下内容
/ usr / local / gcc / gmp - 4.3 . 2 / lib
/ usr / local / gcc / mpfr - 2.4 . 2 / lib
/ usr / local / gcc / mpc - 0.8 . 1 / lib<br> / / 保存退出,执行ldconfig<br>ldconfig
|
6.编译GCC4.8.2
1 2 3 4 5 |
cd .. / ..?
mkdir build?
cd build?
.. / configure? - - prefix = / usr / local / gcc? - - enable - threads = posix? - - disable - checking? - - enable - languages = c,c + + - - disable - multilib
make && make install
|
7.卸载旧版本
1 2 3 |
yum remove gcc?
yum remove gcc - c + +
updatedb
|
8.安装phpstudy
据说在centos-6.5,debian-7.4.,ubuntu-13.10测试成功。(可是也不来个详细步骤,捣鼓了两天,特喵的,成功了赶紧写个博客记录下来)
下载版:http://lamp.phpstudy.net/phpstudy.bin
完整版:http://lamp.phpstudy.net/phpstudy-all.bin
安装:
wget -c http://lamp.phpstudy.net/phpstudy.bin
chmod +x phpstudy.bin #权限设置
./phpstudy.bin #运行安装
经过前七步的铺垫,很顺利安装成功了
如何切换php版:
再次运行./phpstudy.bin
9.配置apache
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<Directory? "/phpstudy/www" >
Options? + Indexes? + FollowSymLinks? + ExecCGI
???? AllowOverride? All
???? Order allow,deny
???? Allow? from all
???? Require? all granted
< / Directory>
<Directory? / >
???? Options? - Indexes? + FollowSymLinks? + ExecCGI
???? AllowOverride? All
???? Order allow,deny
???? Allow? from all
???? Require? all granted
< / Directory>
|
安装完ssh后,启动服务
以特权模式运行容器
创建容器:
# docker run -d -name centos7 --privileged=true centos:7 /usr/sbin/init
进入容器:
# docker exec -it centos7 /bin/bash
这样可以使用systemctl启动服务了。
内容总结
以上是互联网集市为您收集整理的docker.io/centos安装phpstudy全部内容,希望文章能够帮你解决docker.io/centos安装phpstudy所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。