杰网资源 Design By www.escxy.com

一、环境安装
1.安装apache2
sudo apt-get install apache2
安装后在浏览器中打开:http://localhost/或者http://127.0.0.1
如果出现It works!证明apache安装成功。
2.安装PHP
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
测试:
sudo vi /var/www/testphp.php
写入php works!保存退出vi。
然后在浏览器中输入http://127.0.0.1/testphp.php或者http://localhost/testphp.php
如果显示出php works!表示php配置成功。
3.安装MYSQL
sudo apt-get install mysql-server
安装过程中按提示设置root密码即可。
注:修改密码:
mysql -uroot -p
mysql>use mysql;
mysql>update user set password=PASSWORD('new password') WHERE user='root';
mysql>exit
重启mysql,或是刷新权限也行
重启即可: sudo /etc/init.d/mysql restart 或是 restart mysql
4、让apache、php支持mysql
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart
至此Ubuntu+apache2+php 5+mysql的安装完成。
提示:
/etc/apache2/下:
1、apache2.conf 是主配置文件,httpd.conf 用户配置文件
2、虚拟目录在 httpd.conf 中
DocumentRoot “路径”
ServerName 名称
#Listen 127.0.0.1:80 #注意这个文件中不能写上监听,如果必须要写,那就需要先去apache2.conf下将include /etc/apache2/ports.conf 给注释掉,因为ports.conf中已经监听来80端口
3、目录设置在 /etc/apache2/sites-enabled/000-default 可以设置虚拟主机
4、php.ini: /etc/php5/apache2/php.ini
5、mysql.cnf: /etc/mysql/my.cnf
4、重启apache : /etc/init.d/apache2 restart
5、重启mysql: sudo /etc/init.d/mysql restart 或是 restart mysql
6、日志文件: /var/log/apache2/
二、GD库安装
sudo apt-get install php5-gd
sudo /etc/init.d/apache2 restart
三、curl扩展安装
sudo apt-get install php5-curl
sudo /etc/init.d/apache2 restart

标签:
ubuntu,lamp

杰网资源 Design By www.escxy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
杰网资源 Design By www.escxy.com

P70系列延期,华为新旗舰将在下月发布

3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。

而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?

根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。