阿里云服务器搭建日记
来源:互联网 发布:淘宝卖家支付宝红包 编辑:程序博客网 时间:2024/06/06 19:41
Centos系统下Lamp环境的快速搭建
更新源:yum update
Lamp整套安装:
yum -y install httpd mysql-server php php-mysql postgresql postgresql-server php-postgresql php-pgsql php-devel
apache服务器配置
启动apache服务:/etc/rc.d/init.d/httpd start
(需要输入绝对路径)
检测启动结果:ps aux | grep httpd
进入网站根目录新建一个phpinfo.php:
cd /var/www/htmlvim phpinfo.php
phpinfo.php:
<?phpecho phpinfo();?>
在外网访问阿里云:IP/phpinfo.php
mysql数据库配置
mysql启动:/etc/rc.d/init.d/mysqld start
(绝对路径)
检查启动结果: netstat -tulnp | grep :3306
修改root密码: mysqladmin -u root password '你想设置的密码'
登陆mysql:mysql -u root -p
开启远程mysql客户端连接:
#将host设置为%表示任何ip都能连接mysql,也可以将host指定为某个update user set host='%' where user='root' and host='localhost';#刷新权限表,使配置生效flush privileges;
然后我们就能远程连接我们的mysql了。
关闭远程mysql客户端连接:
#将host设置为localhost表示只能本地连接mysql update user set host='localhost' where user='root'; #刷新权限表,使配置生效 flush privileges;
备注:您也可以添加一个用户名为yuancheng,密码为123456,权限为%(表示任意ip都能连接)的远程连接用户。命令参考如下:
grant all on *.* to 'yuancheng'@'%' identified by '123456'; flush privileges;
引用:
百度经验http://jingyan.baidu.com/article/3d69c5518e82e3f0cf02d7ea.html
沉默地等奇迹http://www.cnblogs.com/BTMaster/p/4035402.html
0 0
- 阿里云服务器搭建日记
- 阿里云服务器搭建
- 阿里云服务器搭建
- 阿里云服务器搭建
- 阿里云服务器搭建
- 阿里云搭建SVN服务器
- 阿里云搭建SVN服务器
- 阿里云服务器搭建wordpress
- 阿里云git服务器搭建
- 阿里云服务器搭建vpn
- 阿里云服务器搭建discuz3
- 阿里云服务器环境搭建
- 阿里云搭建ngrok服务器
- 阿里云搭建SVN服务器
- linux搭建阿里云服务器
- 阿里云搭建SVN服务器
- 从零开始搭建阿里云服务器
- 阿里云搭建ngrok服务器
- ubuntu 14.04 install python3.4.4 and pyqt5
- 【自分の総括】设计模式之建造者模式(实例分析)
- cross compile go
- vs的当前目录
- Android 添加点击效果(5.0之后水波纹效果)
- 阿里云服务器搭建日记
- 利用git在conding上上传源码
- IP拨号监听去电
- Hibernate关系映射总结(二)
- debug 进 defaultActionInvocation.invokeAction
- jquery中attr属性设置每一个匹配元素的一个或多个属性
- 在ubuntu上Kubernetes集群部署
- 10.Java IO:并发IO和异常处理(Exception Handling)
- Codeforces Round #346 (Div. 2) easy(A-D)